Unmanned aerial vehicle adaptive route reorganization method and system for power special inspection

CN122281937BActive Publication Date: 2026-09-18STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610746241.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-09-18
Estimated Expiration
2046-05-28

AI Technical Summary

Technical Problem

[0004]本发明提供了面向电力专项巡视的无人机自适应航线重组方法及系统,目的在于解决现有技术中无人机电力巡检航线自适应性不足的技术问题

Benefits of technology

本发明提供了面向电力专项巡视的无人机自适应航线重组方法及系统,通过识别任务类型加载对应的参数模板,在飞行中实时感知多源数据,动态调整安全距离阈值与相机焦距,生成初步航线后结合数字孪生模型进行碰撞检测与覆盖度评估,最终输出修正后的自适应航线,实现了航线自适应重组,能够适配不同电力专项巡视策略,提升电力专项巡视的适应性与可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122281937B_ABST
    Figure CN122281937B_ABST
Patent Text Reader

Abstract

The application discloses a UAV adaptive route reorganization method and system for power special inspection, and relates to the technical field of UAV control. The method comprises the following steps: obtaining the task type identifier of the current inspection task, and loading the corresponding task parameter template from the pre-constructed power special inspection task parameter template library; driving the UAV to fly according to the task parameter template, and collecting multi-source sensing data in real time; calculating a dynamic safety distance threshold value, adjusting the position or flight height of the current waypoint, and obtaining an adjusted safety waypoint sequence; based on the safety waypoint sequence and the multi-source sensing data, adjusting the camera focal length, combining the safety waypoint sequence with the adjusted camera focal length, and generating a preliminary inspection route; calling a power facility digital twin model, performing collision detection and coverage evaluation on the preliminary inspection route, correcting the preliminary inspection route, and outputting an adaptive inspection route. The application improves the adaptability of the UAV power inspection route.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) control technology, specifically to an adaptive flight path reconfiguration method and system for UAVs used in power grid inspections. Background Technology

[0002] With the continuous expansion of smart grids and transmission lines, drones have become core equipment for power grid inspections, widely used in differentiated operation scenarios such as tree obstruction checks and pole component inspections. Current drone inspection technologies mostly employ preset fixed flight paths, relying on manually set uniform safety distances and camera focal length parameters, and using pre-configured task templates to drive drones to perform routine inspections.

[0003] However, the operational requirements and environmental characteristics of power-specific inspections, such as tree obstruction counting and pole component inspection, differ significantly. Existing solutions with fixed safety distances and fixed camera focal lengths cannot match the characteristics of the mission. Dynamic disturbances such as wind speed, electric field strength, and positioning errors during flight can change the actual safety boundaries and easily lead to collision risks. At the same time, fixed focal lengths make it difficult to balance component imaging resolution and inspection efficiency, resulting in prominent issues of flight path collision hazards and missing target coverage, and insufficient reliability and adaptability of inspections. Summary of the Invention

[0004] This invention provides a method and system for adaptive flight path reconfiguration of unmanned aerial vehicles (UAVs) for power grid inspection, aiming to solve the technical problem of insufficient adaptability of UAV flight path in existing technologies.

[0005] In view of the above problems, the present invention provides an adaptive flight path reconfiguration method and system for UAVs for power grid special inspections.

[0006] In a first aspect, the present invention provides an adaptive flight path reconfiguration method for unmanned aerial vehicles (UAVs) for power grid-specific inspections, comprising: Obtain the task type identifier of the current inspection task, and load the corresponding task parameter template from the pre-built power special inspection task parameter template library according to the task type identifier; The drone is driven to fly according to the mission parameter template, and multi-source sensing data is collected in real time during the flight of the drone. Based on the multi-source sensing data, a dynamic safe distance threshold is calculated, and the position or flight altitude of the current waypoint is adjusted according to the dynamic safe distance threshold to obtain an adjusted safe waypoint sequence. Based on the safe waypoint sequence and the multi-source sensing data, the camera focal length is adjusted to obtain the adjusted camera focal length, and the safe waypoint sequence is combined with the adjusted camera focal length to generate a preliminary inspection route. The pre-built digital twin model of the power facility is invoked to perform collision detection and coverage assessment on the preliminary inspection route, and the preliminary inspection route is corrected based on the assessment results to obtain the corrected inspection route. The revised inspection route is output as an adaptive inspection route.

[0007] Secondly, this invention provides an adaptive flight path reconfiguration system for unmanned aerial vehicles (UAVs) for specialized power grid inspections, comprising: The task parameter template loading module is used to obtain the task type identifier of the current inspection task and load the corresponding task parameter template from the pre-built power special inspection task parameter template library according to the task type identifier. The multi-source sensing data acquisition module is used to drive the UAV to fly according to the mission parameter template and to acquire multi-source sensing data in real time during the flight of the UAV. The safe waypoint sequence adjustment module is used to calculate a dynamic safe distance threshold based on the multi-source sensing data, and adjust the position or flight altitude of the current waypoint according to the dynamic safe distance threshold to obtain the adjusted safe waypoint sequence. The preliminary inspection route generation module is used to adjust the camera focal length based on the safe waypoint sequence and the multi-source sensing data to obtain the adjusted camera focal length, and combine the safe waypoint sequence with the adjusted camera focal length to generate a preliminary inspection route. The inspection route correction module is used to call a pre-built digital twin model of power facilities, perform collision detection and coverage assessment on the preliminary inspection route, and correct the preliminary inspection route based on the assessment results to obtain the corrected inspection route. The adaptive inspection route output is used to output the modified inspection route as the adaptive inspection route.

[0008] One or more technical solutions provided in this invention have at least the following technical effects or advantages: This invention provides an adaptive flight path reconfiguration method and system for UAVs used in power grid inspections. By identifying the task type and loading the corresponding parameter template, the system can perceive multi-source data in real time during flight, dynamically adjust the safety distance threshold and camera focal length, generate a preliminary flight path, and then combine it with a digital twin model for collision detection and coverage assessment. Finally, the system outputs a corrected adaptive flight path, realizing adaptive flight path reconfiguration. This system can adapt to different power grid inspection strategies and improve the adaptability and reliability of power grid inspections. Attached Figure Description

[0009] Figure 1 A flowchart illustrating the UAV adaptive route reconfiguration method for power grid inspection provided in this embodiment of the invention; Figure 2This is a schematic diagram of the structure of an UAV adaptive route reconfiguration system for power grid special inspection provided in an embodiment of the present invention; The components represented by each number in the attached diagram are explained below: Task parameter template loading module 11, multi-source sensing data acquisition module 12, safe waypoint sequence adjustment module 13, preliminary inspection route generation module 14, inspection route correction module 15, adaptive inspection route output 16. Detailed Implementation

[0010] This invention provides a method and system for adaptive flight path reconfiguration of unmanned aerial vehicles (UAVs) for power grid inspection, which addresses the technical problem of insufficient adaptability of UAV flight paths in existing technologies.

[0011] Example 1, as Figure 1 As shown, this invention provides an adaptive flight path reconfiguration method for unmanned aerial vehicles (UAVs) for power grid inspections, the method comprising: S100: Obtain the task type identifier of the current inspection task, and load the corresponding task parameter template from the pre-built power special inspection task parameter template library according to the task type identifier.

[0012] In this embodiment of the invention, the task type identifier of the current inspection task is obtained, and the corresponding task parameter template is loaded from a pre-built power-specific inspection task parameter template library based on the task type identifier. The task type identifier includes at least one of the following: tree obstruction counting, pole and tower component inspection, insulator detection, or corridor inspection. Different power-specific inspection tasks have different work objects, inspection accuracy, and safety requirements. The optimal values ​​for camera focal length and safety distance vary greatly among different tasks: pole and tower component inspection requires a long focal length and a close safety distance; tree obstruction counting requires a short focal length and a long safety distance; insulator detection requires a high-resolution long focal length; and corridor inspection requires a wide-angle lens and a medium-to-long safety distance. If uniform fixed parameters are used, it is easy to have unclear imaging, insufficient inspection coverage, or the risk of flight collisions. Therefore, it is necessary to construct a task-specific parameter template library based on historical inspection data by extracting typical camera focal length base values ​​and typical safety distance base values ​​for each type of task, so as to realize automatic loading of matching parameters according to task type and provide a benchmark for subsequent dynamic adjustments.

[0013] Step S100 in the method provided in this embodiment of the invention includes: The construction process of the power special inspection task parameter template library includes: Collect historical flight data of drones for various types of power-specific inspection missions. The historical flight data for each mission type should include at least camera focal length records and safe distance records. For each task type, the camera focal length and safe distance records are processed by box plots to obtain the cleaned focal length dataset and the cleaned safe distance dataset. Pair the cleaned focal length dataset with the cleaned safe distance dataset to form a two-dimensional sample point set; In the two-dimensional space spanned by the set of two-dimensional sample points, the local density value of each sample point is calculated using a kernel density estimation algorithm, and the area covered by the top preset percentage of sample points with the highest local density value is determined as the area with the highest density. Within the region of maximum density, the weighted arithmetic mean of all sample points is calculated using the local density value of each sample point as the weight, and the coordinate point corresponding to the weighted arithmetic mean is taken as the center point of the region of maximum density. The horizontal and vertical coordinates of the center point are used as the base values ​​of the camera focal length and the safety distance for the task type, respectively, and are associated with and stored with the corresponding task type identifier to construct a template library of power special inspection task parameters.

[0014] First, historical flight data of drones for various power grid inspection missions were collected. The historical flight data for each mission type included at least camera focal length records and safe distance records. The historical flight data is a set of operational parameters actually used and recorded by drones when performing similar power grid inspections.

[0015] Specifically, historical inspection data was collected multiple times for various task types, including tree obstruction inventory, pole and tower component inspection, insulator testing, and passageway patrol. Each data entry contained at least two parameters: camera focal length and safe distance. For example, 100 historical data entries were collected for the pole and tower component inspection type, with camera focal length values ​​ranging from 24mm to 120mm and safe distance values ​​ranging from 3m to 15m.

[0016] Secondly, for the camera focal length and safe distance records under each task type, boxplot processing was performed to obtain cleaned focal length and safe distance datasets. Boxplot processing is a data cleaning method based on quartiles to identify and remove outliers that deviate excessively from the overall dataset, ensuring data validity.

[0017] Specifically, box plot analysis was performed independently on camera focal length sequences and safety distance sequences for a single task type. Outlier data exceeding the upper and lower limits were removed, and valid data was retained to form cleaned focal length and safety distance datasets. For example, box plot cleaning was performed on the focal length and safety distance data from pole component inspections to remove outlier records with excessively short focal lengths (24mm), excessively long focal lengths (120mm), excessively close safety distances (3m), and excessively far safety distances (15m), retaining valid data with focal lengths of 35mm and 85mm and safety distances of 5m and 10m.

[0018] Next, the cleaned focal length dataset and the cleaned safety distance dataset are paired to form a two-dimensional sample point set. This two-dimensional sample point set is a discrete set of (x, y) points formed by the camera focal length as the x-axis and the safety distance as the y-axis, constituting a two-dimensional data space. Each cleaned focal length data point with the same index is paired with a safety distance data point to form a two-dimensional sample point set in the form of (x-focal length, y-safety distance). All these points together constitute the two-dimensional sample point set. For example, the cleaned focal length data and safety distance data from the tower component inspection are paired one-to-one to form two-dimensional sample point sets such as (40mm, 6m), (45mm, 7m), (50mm, 7m), and (60mm, 8m).

[0019] Furthermore, within the two-dimensional space spanned by the set of two-dimensional sample points, a kernel density estimation algorithm is used to calculate the local density value of each sample point, and the region covered by the top preset percentage of sample points with the highest local density values ​​is determined as the region with the highest density. The kernel density estimation algorithm is used to estimate the local density values ​​of sample points in the two-dimensional space, reflecting the density of points around a certain location. The larger the local density value, the more concentrated the sample points in that region, indicating that the parameter combination is more commonly used and more typical.

[0020] Specifically, within the xy two-dimensional plane, the local density value of each sample point is calculated. The sample points are then sorted from highest to lowest density, and the continuous area covered by the top 30% of sample points is defined as the region with the highest density, i.e., the typical region where the parameters are most concentrated. For example, when calculating the local density of sample points for tower components, the top 30% of the points with the highest density are concentrated in... The region is designated as the area with the highest density.

[0021] Subsequently, within the region of maximum density, a weighted arithmetic mean is calculated for all sample points, using the local density value of each sample point as the weight. The coordinate point corresponding to this weighted arithmetic mean is then used as the center point of the region of maximum density. The weighted arithmetic mean is the average value weighted by local density; higher density results in a greater weight, making the center point more closely resemble the optimal typical parameters. Within the region of maximum density, a weighted average is calculated for the x and y coordinates of all points, using the local density value of each sample point as the weight. This is the center point of the area with the highest density. For example, in the area with the highest density during the inspection of tower components, the center point coordinates are calculated as (50mm, 7m) by using a weighted average with density as the weight.

[0022] Finally, the horizontal and vertical coordinates of the center point are used as the base values ​​for camera focal length and safe distance for the task type, respectively, and stored in association with the corresponding task type identifier to construct a power special inspection task parameter template library. The task parameter template library is a database that stores task type identifiers, camera focal length base values, and safe distance base values ​​in association.

[0023] Specifically, the x-coordinate of the center point is used as the base value of the camera focal length for this task type, and the y-coordinate is used as the base value of the safety distance. These are bound and stored with the task type identifier to form a corresponding task parameter template. The above steps are repeated to construct templates for all types, forming a complete power special inspection task parameter template library. For example, the pole component inspection type is associated with the focal length base value of 50mm and the safety distance base value of 7m, forming a dedicated parameter template for this type. Similarly, templates for tree obstruction, insulator, and passage inspection are generated to form a complete power special inspection task parameter template library.

[0024] Based on this, the task type identifier of the current inspection task is obtained. According to the task type identifier, the corresponding task parameter template is loaded from a pre-built power-specific inspection task parameter template library. When executing the current inspection task, the input task type identifier is obtained, and the corresponding camera focal length base value and safety distance base value are matched and read from the parameter template library to complete the parameter template loading. For example, if the current task is a tower component inspection type, after reading the task type identifier, a parameter template with a focal length base value of 50mm and a safety distance base value of 7m is automatically loaded from the template library.

[0025] In this embodiment of the invention, specific typical parameters are extracted for different power-related special inspection tasks to solve the problem that fixed parameters cannot be adapted to multi-task scenarios; outliers are eliminated by box plots, the densest area is located by kernel density estimation, and the center point is determined by weighted averaging to ensure that the focal length base value and the safe distance base value truly reflect the optimal inspection experience; a standardized parameter template library is constructed to realize the automatic matching and loading of task types and parameters, providing a stable benchmark for subsequent dynamic safe distance calculation and adaptive focal length adjustment, thereby improving the rationality of adaptive route and the reliability of inspection.

[0026] S200: Drives the UAV to fly according to the mission parameter template, and collects multi-source sensing data in real time during the flight of the UAV.

[0027] In this embodiment of the invention, the drone is driven to fly according to the mission parameter template, and multi-source sensing data is collected in real time during the drone's flight. The dynamic changes in the on-site environment for different power sector inspection missions, and subsequent dynamic safety distances, camera focal lengths, and flight path corrections all rely on real-time environmental and equipment data. After loading the mission parameter template, the drone needs to be controlled to fly stably along the initial flight path, while simultaneously collecting multi-dimensional sensing data to provide a data foundation for subsequent adaptive adjustments.

[0028] Step S200 in the method provided in this embodiment of the invention includes: Control the drone to take off and fly along a preset sequence of initial waypoints; During flight, image sequences are acquired through an airborne visual camera, point cloud data is acquired through a lidar, position data and positioning error values ​​are acquired through an RTK positioning module, real-time wind speed is acquired through a wind speed sensor, and electric field strength values ​​are acquired through an electric field sensor, thus obtaining multi-source sensing data.

[0029] First, the UAV is controlled to take off and fly along a preset initial waypoint sequence. The initial waypoint sequence refers to a flight path planned by the ground station software, which consists of multiple discrete waypoints arranged in sequence, taking into account the inspection range of the current inspection mission, the distribution of power facilities, and the safety distance base value loaded by the S100. Each waypoint contains clear three-dimensional coordinates (longitude, latitude, and altitude) as the basic guide for the UAV's flight.

[0030] Specifically, based on the mission type and the baseline safety distance, an initial waypoint sequence is planned at the ground station to ensure that the distance between the waypoints and power facilities and obstacles is not less than the baseline safety distance, and this is imported into the flight control system. After receiving the takeoff command, the UAV ascends vertically to the altitude of the first waypoint and then flies steadily at a constant speed along the waypoint sequence. During the flight, the UAV maintains a stable attitude, automatically hovers in case of abnormality, and continues to execute the route after recovery.

[0031] For example, in the task of inspecting tower components, the safe distance base value is 7m. The example of planning a single set of waypoints is: waypoint 1 (118.5°E, 32.3°N, 48m). The other waypoints are similarly arranged around the tower, and the horizontal distance from the tower is ≥7m. The UAV takes off at 2.5m / s to 48m, and then flies along the tower at a constant speed of 4m / s.

[0032] Secondly, during flight, image sequences are acquired via an onboard visual camera, point cloud data is acquired via LiDAR, position data and positioning error values ​​are acquired via an RTK positioning module, real-time wind speed is acquired via a wind speed sensor, and electric field strength values ​​are acquired via an electric field sensor, resulting in multi-source sensing data. Multi-source sensing data refers to a multi-dimensional data set encompassing the flight environment, equipment status, and inspection targets, simultaneously collected by various types of sensors onboard the UAV. This data includes image sequences, point cloud data, position data, positioning error, real-time wind speed, and electric field strength. The RTK positioning module is a real-time dynamic positioning module that can receive satellite signals and ground base station signals, outputting precise three-dimensional position data and positioning error values ​​for the UAV.

[0033] Specifically, all sensors are activated simultaneously during drone flight, with a unified timestamp ensuring data synchronization. The visual camera acquires image sequences of the inspected target based on focal length baselines, the lidar acquires 3D point cloud data of surrounding obstacles and power facilities, the RTK module outputs the drone's 3D position and positioning error value, and the wind speed sensor and electric field sensor acquire real-time wind speed and electric field intensity, respectively. All data is aggregated into multi-source sensing data for subsequent steps.

[0034] For example, during the inspection flight of the tower components, the camera acquires images of the tower components with a focal length of 50mm; the lidar acquires point clouds of the tower and trees; the RTK outputs the position (118.5°E, 32.3°N, 48.2m) with a positioning error of ±0.08m; the wind speed is 2.8m / s and the electric field strength is 11kV / m. All data are archived with a unified timestamp.

[0035] In this embodiment of the invention, an initial flight path is planned based on a safety distance baseline to ensure the safety of the UAV's initial flight. Multi-dimensional and real-time perception data is collected simultaneously to fully cover the data types required for subsequent dynamic safety distance calculation, camera focal length adjustment, and flight path correction. The data synchronization is strong and the accuracy is high, ensuring that subsequent steps are feasible and implementable.

[0036] S300: Based on the multi-source sensing data, calculate the dynamic safety distance threshold, and adjust the position or flight altitude of the current waypoint according to the dynamic safety distance threshold to obtain the adjusted safe waypoint sequence.

[0037] In this embodiment of the invention, a dynamic safety distance threshold is calculated based on the multi-source sensing data, and the position or flight altitude of the current waypoint is adjusted according to the dynamic safety distance threshold to obtain an adjusted safe waypoint sequence. During UAV patrols, real-time wind speed, positioning error, and electric field strength directly affect flight control accuracy and safety boundaries. Relying solely on the fixed safety distance baseline obtained by S100 cannot adapt to dynamic environmental changes, and collisions may easily occur due to insufficient distance between the UAV and obstacles such as poles and trees. Therefore, it is necessary to train a prediction model based on multi-source sensing data to obtain dynamic correction coefficients, calculate an adaptive dynamic safety distance threshold, and adjust waypoints according to real-time point cloud ranging results to ensure flight safety.

[0038] Step S300 in the method provided in this embodiment of the invention includes: Real-time wind speed, positioning error value, and electric field strength value are extracted from the multi-source sensing data, and a dynamic correction coefficient is calculated based on the real-time wind speed, the positioning error value, and the electric field strength value. Multiply the base value of the safety distance corresponding to the current task type by the dynamic correction coefficient to obtain the dynamic safety distance threshold; Using the point cloud data in the multi-source sensing data, the real-time distance between the current waypoint and the nearest obstacle is calculated, and the real-time distance is compared with the dynamic safe distance threshold; When the real-time distance is less than the dynamic safe distance threshold, the current waypoint is shifted away from the obstacle or the flight altitude of the current waypoint is increased until the real-time distance is greater than or equal to the dynamic safe distance threshold, and the shifted or increased waypoint is taken as the adjusted safe waypoint. Each waypoint in the initial waypoint sequence is adjusted sequentially to obtain the adjusted safe waypoint sequence.

[0039] First, real-time wind speed, positioning error value, and electric field strength value are extracted from the multi-source sensing data, and a dynamic correction coefficient is calculated based on these values. From the multi-source sensing data collected by S200, three sets of data corresponding to the current waypoint are selected and extracted: real-time wind speed, positioning error value, and electric field strength value. For example, in a tower component inspection task, the current waypoint data is extracted as follows: real-time wind speed 2.8 m / s, positioning error ±0.08 m, and electric field strength 11 kV / m.

[0040] The calculation of the dynamic correction coefficient based on the real-time wind speed, the positioning error value, and the electric field strength value includes: Collect historical flight datasets, in which each sample contains real-time wind speed, UAV positioning error, electric field strength value, and actual safe distance value recorded during a flight. Obtain the safety distance base value for the corresponding task type from the task parameter template, calculate the ratio of the actual safety distance value used in each sample to the safety distance base value, and use the ratio as the true correction coefficient label for that sample; The real-time wind speed, UAV positioning error, and electric field intensity value of each sample are combined into an input feature vector, and paired with the corresponding true correction coefficient label to form a training sample set; A lightweight neural network is constructed as a dynamic correction coefficient prediction model; The dynamic correction coefficient prediction model is trained in a supervised manner using the training sample set until it is verified to converge, thus obtaining the trained dynamic correction coefficient prediction model. The real-time wind speed, positioning error value, and electric field strength value of the current waypoint are combined into an input feature vector, which is then input into the trained dynamic correction coefficient prediction model, and the dynamic correction coefficient is output.

[0041] First, a historical flight dataset is collected. Each sample in the historical flight dataset contains real-time wind speed, UAV positioning error, electric field strength value, and the actual safe distance value used during the flight, all recorded during a single flight. The historical flight dataset is a collection of samples from previous similar missions that record environmental parameters and actual safe distances.

[0042] Specifically, historical flight data of the same mission type are collected, with each sample including real-time wind speed, UAV positioning error, electric field strength value, and actual safe distance value. For example, 1,000 sets of historical samples of pole component inspection are collected, with each set including real-time wind speed, UAV positioning error, electric field strength, and actual safe distance.

[0043] Secondly, the baseline safety distance value for the corresponding task type is obtained from the task parameter template. The ratio of the actual safety distance value used in each sample to the baseline safety distance value is calculated, and this ratio is used as the true correction coefficient label for that sample. The true correction coefficient label is the ratio of the actual safety distance to the baseline safety distance value, reflecting the degree of environmental correction to the baseline safety distance.

[0044] Specifically, the baseline value of the safe distance is obtained from the task parameter template, and the ratio of the actual safe distance value to the baseline value of the safe distance in a single sample is calculated. The result is used as the true correction coefficient label for that sample. For example, if the baseline value of the safe distance for pole component inspection is 7m, and the actual safe distance of a certain sample is 7.7m, then the true correction coefficient = 7.7 / 7 = 1.1.

[0045] Next, the real-time wind speed, UAV positioning error, and electric field strength value of each sample are combined into an input feature vector, and paired with the corresponding true correction coefficient label to form a training sample set. The input feature vector is formed by combining three types of environmental parameters: real-time wind speed, UAV positioning error, and electric field strength value. The training sample set is a set of paired input feature vectors and true correction coefficient labels. For example, a sample feature vector is [2.5m / s, 0.1m, 10kV / m], corresponding to a true correction coefficient label of 1.1, constituting a set of training samples.

[0046] Furthermore, a lightweight neural network is constructed as a dynamic correction coefficient prediction model. The lightweight neural network is a neural network structure with few parameters, fast computation speed, and suitable for real-time inference on airborne devices, used to output dynamic correction coefficients.

[0047] Specifically, a four-layer fully connected neural network is constructed: the input layer has 3 neurons, corresponding to the three-dimensional input features of real-time wind speed, positioning error value, and electric field strength value; the first hidden layer has 16 neurons, using the ReLU activation function; the second hidden layer has 8 neurons, using the ReLU activation function; and the output layer has 1 neuron, using the linear activation function (Linear), outputting a one-dimensional dynamic correction coefficient.

[0048] Then, the dynamic correction coefficient prediction model is trained in a supervised manner using the training sample set until it converges, resulting in a fully trained dynamic correction coefficient prediction model. Supervised training uses the true correction coefficients as labels and updates the network weights through error backpropagation to make the predicted output approximate the true values.

[0049] Specifically, mini-batch gradient descent is used for training, with mean squared error (MSE) as the loss function. During training, the network weights and biases are iteratively updated using backpropagation. The convergence condition is set as follows: after 10 consecutive iterations, the decrease in the loss function value on the validation set is less than... Once the maximum number of iterations reaches 200, the model is considered to have converged, training is stopped, and the trained model is saved.

[0050] For example, the training sample set is inspected using tower components. The network parameters are optimized using MSE as the loss function and mini-batch gradient descent. After 186 iterations, the network satisfies the requirement that the change in loss is less than a certain value for 10 consecutive iterations. At this point, the dynamic correction coefficient prediction model converges and completes training.

[0051] Finally, the real-time wind speed, positioning error value, and electric field strength value of the current waypoint are combined into an input feature vector, which is then input into the trained dynamic correction coefficient prediction model, and the dynamic correction coefficient is output. For example, if the input feature vector for the current waypoint is [2.8, 0.08, 11], the dynamic correction coefficient prediction model outputs a dynamic correction coefficient of 1.05.

[0052] Next, the base safe distance value corresponding to the current task type is multiplied by the dynamic correction coefficient to obtain the dynamic safe distance threshold. The dynamic safe distance threshold is the minimum safe distance that the drone must maintain between itself and obstacles after real-time environmental disturbance correction. Dynamic safe distance threshold = base safe distance value × dynamic correction coefficient. For example, the base safe distance value for a pole component inspection task is 7m, and the dynamic correction coefficient is 1.05, then the dynamic safe distance threshold = 7 × 1.05 = 7.35m.

[0053] Next, using the point cloud data from the multi-source sensing data, the real-time distance between the current waypoint and the nearest obstacle is calculated, and this real-time distance is compared with the dynamic safe distance threshold. The real-time distance is the three-dimensional straight-line distance between the UAV's current position and the nearest obstacle, calculated based on the lidar point cloud data.

[0054] Specifically, the LiDAR point cloud data from the multi-source sensing data is first preprocessed to remove discrete outliers caused by environmental interference, retaining only valid point cloud data that accurately reflects the 3D contours of obstacles. Then, the 3D coordinates of the current waypoint are acquired, and all valid point cloud data are traversed to extract the corresponding obstacle's 3D coordinates for each point cloud. For each obstacle's 3D coordinates, the straight-line distance between the current waypoint and the obstacle is calculated using the Euclidean distance formula. After the traversal is complete, all calculated distance values ​​are compared, and the minimum distance value is selected. This minimum distance value is the real-time distance between the current waypoint and the nearest obstacle.

[0055] For example, the lidar point cloud data collected during the pole and tower component inspection task is preprocessed to remove discrete outliers and retain the valid point clouds of the poles and surrounding trees. The current waypoint's three-dimensional coordinates (118.5°E, 32.3°N, 48.2m) are obtained. All valid point clouds are traversed, and the three-dimensional coordinates of the poles and trees corresponding to each point cloud are extracted. The distances to the current waypoint coordinates are calculated using the Euclidean distance formula. After comparison, the minimum distance is 6.8m, which is the real-time distance between the current waypoint and the nearest pole obstacle.

[0056] Furthermore, when the real-time distance is less than the dynamic safe distance threshold, the current waypoint is shifted away from the obstacle or the flight altitude of the current waypoint is increased until the real-time distance is greater than or equal to the dynamic safe distance threshold, and the shifted or increased waypoint is taken as the adjusted safe waypoint.

[0057] Specifically, the real-time distance is compared with the dynamic safe distance threshold. If the real-time distance is less than the dynamic safe distance threshold, an adjustment method is selected based on the obstacle distribution: when the obstacle is horizontal, the waypoint is shifted horizontally away from the obstacle; when the obstacle is vertical, the waypoint's flight altitude is increased. The real-time distance is recalculated after each adjustment until it is greater than or equal to the dynamic safe distance threshold. The final position is then taken as the adjusted safe waypoint. For example, if the real-time distance is 6.8m, which is less than the dynamic safe distance threshold of 7.35m, the waypoint is shifted horizontally by 0.6m away from the tower, and the recalculated real-time distance is 7.4m, meeting the safety requirements; therefore, it is a safe waypoint.

[0058] Finally, each waypoint in the initial waypoint sequence is adjusted sequentially to obtain the adjusted safe waypoint sequence. Following the above steps, dynamic safe distance calculation, real-time distance comparison, waypoint offset or altitude adjustment are performed sequentially on each waypoint in the initial waypoint sequence. All waypoints that meet the safety conditions are combined according to their original flight order to form a complete adjusted safe waypoint sequence.

[0059] For example, the initial waypoint sequence contains four waypoints. The above adjustment steps are performed on each waypoint sequentially. Waypoint 1 (initial coordinates 118.5°E, 32.3°N, 48m) has a calculated real-time distance of 6.8m < 7.35m, and is horizontally offset by 0.6m away from the tower, resulting in coordinates of (118.5°E, 32.3005°N, 48m). Waypoint 2 (initial coordinates 118.5003°E, 32.3°N, 48m) has a real-time distance of 6.8m < 7.35m. The distance is 7.1m < 7.35m, with a horizontal offset of 0.3m. The adjusted coordinates are (118.5006°E, 32.3°N, 48m). The calculated real-time distances of waypoints 3 and 4 are 7.5m and 7.4m, respectively, both greater than the dynamic safe distance threshold of 7.35m. No adjustment is needed, and the initial coordinates remain unchanged. The adjusted waypoints 1 and 2, along with the unadjusted waypoints 3 and 4, are combined sequentially according to the initial flight order to obtain the final safe waypoint sequence.

[0060] In this embodiment of the invention, a lightweight neural network is trained using historical data to obtain dynamic correction coefficients. The fixed safety distance base value is adaptively corrected to a dynamic safety distance threshold that fits the real-time environment. Combined with real-time ranging of lidar point clouds, waypoints are horizontally offset or height-increased. This effectively eliminates safety hazards caused by wind speed, positioning errors, and electric field strength, ensuring that waypoints always meet dynamic safety requirements and providing a reliable foundation for safe waypoints in subsequent route generation.

[0061] S400: Based on the safe waypoint sequence and the multi-source sensing data, adjust the camera focal length to obtain the adjusted camera focal length, and combine the safe waypoint sequence with the adjusted camera focal length to generate a preliminary inspection route.

[0062] In this embodiment of the invention, the camera focal length is adjusted based on the safe waypoint sequence and the multi-source sensing data to obtain the adjusted camera focal length. The safe waypoint sequence is then combined with the adjusted camera focal length to generate a preliminary inspection route. S300 has obtained the adjusted safe waypoint sequence, ensuring the safety of the UAV flight. However, the current camera focal length is still the fixed focal length base value loaded in S100. Different waypoints correspond to different inspection target components, and the real-time distance between the UAV and the target varies. The fixed focal length cannot meet the imaging resolution requirements of various targets, leading to blurred target imaging and inaccurate identification. Therefore, it is necessary to adjust the camera focal length based on the safe waypoint coordinates and multi-source sensing data, combining the safe waypoints with the appropriate focal length to generate a preliminary inspection route that balances safety and imaging quality.

[0063] Step S400 in the method provided in this embodiment of the invention includes: Obtain the camera focal length base value corresponding to the current task type from the task parameter template; Read the coordinates of the current waypoint from the safe waypoint sequence, and obtain the image sequence and point cloud data corresponding to the current waypoint from the multi-source sensing data; Target recognition is performed on the image sequence to determine the target components that need to be photographed at the current waypoint; Based on the type of the target component, the actual geometric dimensions and preset imaging resolution requirements of the target component are obtained from the pre-stored knowledge base; The point cloud data is used to calculate the real-time distance between the UAV and the target component, and the target focal length required to meet the imaging resolution requirement is calculated based on the real-time distance and the actual geometric dimensions of the target component. Calculate the arithmetic mean of the base value of the camera focal length and the target focal length, and use the arithmetic mean as the adjusted camera focal length; The coordinates of each waypoint in the safe waypoint sequence and the adjusted camera focal length are combined in chronological order to generate a preliminary inspection route.

[0064] First, the camera focal length base value corresponding to the current task type is obtained from the task parameter template. The camera focal length base value is the typical camera focal length for the corresponding task type within the task parameter template constructed in S100, and serves as the reference value for subsequent focal length adjustments. A preset camera focal length base value is directly read from the parameter template corresponding to the current task. For example, for a tower component inspection task, the camera focal length base value obtained from the parameter template is 50mm.

[0065] Next, the coordinates of the current waypoint are read from the safe waypoint sequence, and the image sequence and point cloud data corresponding to the current waypoint are obtained from the multi-source sensing data. From the safe waypoint sequence obtained in S300, the three-dimensional coordinates of the current waypoint are read; simultaneously, from the multi-source sensing data collected in S200, image sequences and lidar point cloud data with timestamps consistent with the current waypoint are selected to ensure data correspondence. For example, the coordinates of the current safe waypoint (118.5°E, 32.3005°N, 48m) are read, and the corresponding airborne camera image sequence and point cloud data are extracted simultaneously.

[0066] Next, target recognition is performed on the image sequence to determine the target components that need to be photographed at the current waypoint.

[0067] Specifically, target recognition is performed on the image sequence to determine the target components that need to be photographed at the current waypoint, including: Each frame of the image is extracted from the image sequence, and each frame of the image is converted to grayscale to obtain a grayscale image sequence. The local binary mode operator is used to extract texture features from each frame of grayscale image in the grayscale image sequence to obtain the corresponding local binary mode texture map. The local binary pattern texture map is divided into multiple local regions, the texture histogram of each local region is calculated, and the texture histograms of all local regions are concatenated to form the texture feature vector of each frame image. The texture feature vectors of multiple consecutive frames of images are stacked in chronological order to construct a three-dimensional spatiotemporal feature tensor. The three-dimensional spatiotemporal feature tensor is input into a pre-trained target detection network to identify and output the category label and bounding box coordinates of each target component.

[0068] The construction process of the object detection network includes: Based on deep learning, an object detection network is constructed, which includes a slow path branch, a fast path branch, a feature fusion layer, a region proposal network, and a fully connected layer. A sequence of power inspection images labeled with the target component category and bounding box coordinates is collected as training samples, and the target detection network is trained using a supervised learning method until it is verified to converge, thus obtaining a pre-trained target detection network.

[0069] First, each frame of the image sequence is extracted and converted to grayscale to obtain a grayscale image sequence. Grayscale conversion is a preprocessing operation that converts a color image into a single-channel grayscale image, reducing data volume, highlighting image texture features, and facilitating subsequent feature extraction. From the image sequence corresponding to the current waypoint, images are extracted frame by frame. A weighted average method is used to proportionally weight the RGB pixel values ​​of each frame of the color image, converting it into a single-channel grayscale image, thus forming a grayscale image sequence. For example, 10 frames of color images of the current waypoint are extracted and converted into 10 grayscale images using a weighted average method, resulting in a grayscale image sequence that highlights the contour texture of the tower components.

[0070] Secondly, the local binary mode operator is used to extract texture features from each frame of the grayscale image sequence to obtain the corresponding local binary mode texture map. The local binary mode (LBP) operator is an operator used to extract local texture features of an image. By comparing the grayscale values ​​of a pixel with those of its neighboring pixels, binary codes are generated to form a texture map, which can effectively distinguish the texture differences of different target parts.

[0071] Specifically, for each frame of the grayscale image sequence, a 3×3 neighborhood window is set. Using the grayscale value of the center pixel as a threshold, the grayscale values ​​of the surrounding eight neighboring pixels are compared with the center pixel. Values ​​greater than the center value are recorded as 1, and values ​​less than are recorded as 0, generating an 8-bit binary code. This code is then converted to a decimal value as the LBP value of the center pixel. All pixels in the image are traversed to generate a local binary pattern texture map for the corresponding frame.

[0072] For example, for grayscale images of tower components, the LBP operator with a 3×3 neighborhood window is used to extract the texture features of tower bolts and crossarms, generating an LBP texture map for each frame of the image, clearly showing the difference between the thread texture of the bolts and the smooth texture of the crossarms.

[0073] Furthermore, the local binary pattern texture map is divided into multiple local regions, and the texture histogram of each local region is calculated. The texture histograms of all local regions are then concatenated to form the texture feature vector of each frame. The local binary pattern texture map of each frame is uniformly divided into multiple local regions of equal size, such as 8×8 pixel regions. For each local region, the distribution of LBP values ​​is calculated, and a texture histogram for that region is generated. The texture histograms of all local regions are concatenated sequentially to form a one-dimensional vector, which is the texture feature vector of that frame.

[0074] For example, a frame of LBP texture map is divided into 16 local regions, each region generates a 16-dimensional texture histogram, and the histograms are concatenated to form a 256-dimensional texture feature vector, which serves as the feature representation of the frame image.

[0075] Subsequently, the texture feature vectors of multiple consecutive frames are stacked in temporal order to construct a three-dimensional spatiotemporal feature tensor. The three-dimensional spatiotemporal feature tensor is a three-dimensional data structure formed by stacking the texture feature vectors of multiple consecutive frames in temporal order. It can reflect both the spatial texture features of a single frame image and the temporal sequence features of multiple frames.

[0076] Specifically, N consecutive frames of images from the current waypoint image sequence are selected, and the texture feature vector of each frame is extracted. The N one-dimensional feature vectors are stacked in chronological order to form a two-dimensional matrix of the number of frames × the dimension of the feature vectors. Then, the time dimension is added to construct a three-dimensional spatiotemporal feature tensor. For example, the 256-dimensional texture feature vectors of 5 consecutive frames of images from the current waypoint are selected and stacked in chronological order to construct a 5×256×1 three-dimensional spatiotemporal feature tensor, preserving the spatiotemporal texture information of the tower components.

[0077] The construction process of the object detection network includes: Based on deep learning, an object detection network is constructed, which includes a slow path branch, a fast path branch, a feature fusion layer, a region proposal network, and a fully connected layer. A sequence of power inspection images labeled with the target component category and bounding box coordinates is collected as training samples, and the target detection network is trained using a supervised learning method until it is verified to converge, thus obtaining a pre-trained target detection network.

[0078] First, a target detection network is constructed based on deep learning. This network includes a slow path branch, a fast path branch, a feature fusion layer, a region proposal network, and a fully connected layer. This target detection network, built on deep learning, is a network model used to identify the category and location of target components in images. It includes a slow path branch, a fast path branch, a feature fusion layer, a region proposal network, and a fully connected layer, adapting to the target recognition needs of power line inspection.

[0079] Specifically, based on deep learning frameworks such as PyTorch, a target detection network comprising five modules is constructed: the slow path branch uses low temporal resolution, extracting features once every frame, and extracts global structural features from the 3D spatiotemporal feature tensor through 3 convolutional layers and 2 pooling layers; the fast path branch uses high temporal resolution, extracting motion change features from the 3D spatiotemporal feature tensor through 2 convolutional layers; the feature fusion layer uses channel concatenation to fuse the global structural features output by the slow path branch with the motion change features output by the fast path branch, generating a fused feature map that takes into account both global and local features; the Region Proposal Network (RPN) generates multiple candidate bounding boxes on the fused feature map through a sliding window, filtering out candidate regions that may contain target parts; the fully connected layer receives the candidate bounding box features output by the Region Proposal Network, performs classification and bounding box regression through 2 fully connected layers, and outputs the category label and precise bounding box coordinates of the target part.

[0080] Secondly, power inspection image sequences labeled with target component categories and bounding box coordinates are collected as training samples, and the target detection network is trained using a supervised learning method until convergence is verified, resulting in a pre-trained target detection network. Power inspection image sequences are collected as training samples, with each sample labeled with a target component category such as bolts, crossarms, and insulators, as well as the corresponding bounding box coordinates.

[0081] Specifically, the training samples were divided into training and validation sets in an 8:2 ratio. Supervised learning was employed, using a joint loss function of cross-entropy and SmoothL1 loss. Stochastic gradient descent (SGD) was used to optimize the network parameters, with a learning rate of 0.001 and a batch size of 16. Training was iteratively continued until the validation set loss decreased by less than [a certain value] for 10 consecutive rounds. Once the model has converged, the pre-trained target detection network is saved.

[0082] For example, 1000 sets of inspection image sequences of tower components are collected as training samples, and categories such as bolts and crossarms and bounding boxes are labeled. The samples are divided into training set and validation set in an 8:2 ratio. After 150 rounds of iterative training, the validation set loss converges, and a pre-trained target detection network is obtained.

[0083] Finally, the 3D spatiotemporal feature tensor is input into a pre-trained target detection network to identify and output the category label and bounding box coordinates of each target component. The 3D spatiotemporal feature tensor of the current waypoint is input into this pre-trained network, which outputs the category labels and bounding box coordinates of the target components contained in the current image sequence, thus determining the target components that need to be photographed at the current waypoint. For example, inputting the 3D spatiotemporal feature tensor of the current waypoint into the target detection network outputs target components as: bolts and crossarms, indicating that bolts and crossarms should be the focus of photographing at the current waypoint.

[0084] Subsequently, based on the type of the target component, the actual geometric dimensions and preset imaging resolution requirements of the target component are retrieved from a pre-stored knowledge base. The pre-stored knowledge base is a database that stores the actual geometric dimensions and preset imaging resolution requirements of various power inspection target components. The imaging resolution requirement refers to the minimum pixel density at which details of the target component can be clearly identified after imaging.

[0085] Specifically, based on the target component category identified by the target detection network, the actual geometric dimensions and preset imaging resolution requirements of that target component are retrieved from a pre-stored knowledge base. For example, if the target component at the current waypoint is identified as a bolt, the actual diameter of the bolt is retrieved from the knowledge base as 8mm, and the preset imaging resolution requirement is 2 pixels per millimeter.

[0086] Furthermore, the real-time distance between the UAV and the target component is calculated using the point cloud data, and the target focal length required to meet the imaging resolution requirements is calculated based on the real-time distance and the actual geometric dimensions of the target component. The target focal length refers to the focal length value that the UAV's onboard camera needs to be adjusted to so that the target component meets the preset imaging resolution requirements after imaging.

[0087] First, using LiDAR point cloud data, the real-time 3D distance between the UAV and the target component at the current waypoint is obtained through nearest neighbor point retrieval and 3D Euclidean distance calculation. The required parameters for calculation are defined as follows: real-time distance L, actual geometric dimensions d of the target component, preset imaging resolution requirements, and camera pixel size p, all fixed parameters. The pixel size refers to the physical size of a single pixel on the camera sensor, a fixed parameter of the camera hardware.

[0088] Secondly, based on the actual geometric dimensions of the target component and the imaging resolution requirements, calculate the total number of pixels N that the target component needs to occupy after imaging. The calculation formula is: N = Actual geometric dimensions of the target component × Imaging resolution requirements. Using the standard pinhole imaging formula, substitute the parameters to calculate the target focal length. The calculation formula is: Target focal length f = (Real-time distance L × Total number of pixels N × Single pixel size p) / Actual geometric dimensions of the target component d.

[0089] For example, if the target component at the current waypoint is a bolt, the real-time distance between the UAV and the bolt can be obtained through point cloud computing. Obtain the actual bolt diameter from the knowledge base. The preset imaging resolution requirement is 2 pixels / mm; the camera's single pixel size... Total number of pixels Substitute the values ​​into the formula to calculate the target focal length: The final target focal length that meets the imaging resolution requirements is 51.06mm.

[0090] Next, the arithmetic mean of the base camera focal length and the target focal length is calculated, and this arithmetic mean is used as the adjusted camera focal length. The adjusted camera focal length balances the rationality of the base focal length with the requirements of real-time imaging. The calculation formula is: Adjusted camera focal length = (Base camera focal length + Target focal length) / 2. For example, if the base camera focal length is 50mm and the target focal length is 51.06mm, the adjusted camera focal length... .

[0091] Finally, the coordinates of each waypoint in the safety waypoint sequence and the adjusted camera focal length are combined in chronological order to generate a preliminary inspection route. Following the initial flight sequence, the 3D coordinates of each waypoint in the safety waypoint sequence are paired with the corresponding adjusted camera focal length, and all paired data are integrated in chronological order to form a preliminary inspection route containing waypoint coordinates and adapted focal lengths, which is used for subsequent collision detection and coverage assessment. For example, the coordinates of four waypoints in the safety waypoint sequence are paired with their respective adjusted focal lengths and integrated in flight sequence to generate a preliminary inspection route for the tower component inspection task.

[0092] In this embodiment of the invention, by extracting texture features and identifying targets from image sequences, the target components to be photographed at each waypoint are accurately determined. The target focal length calculated from the real-time distance using point cloud data is fused with the focal length baseline to obtain the camera focal length adapted to the current waypoint. This ensures both the clarity of the target component image and the stability of the focal length adjustment. The preliminary inspection route generated by combining safe waypoints with the adapted focal length achieves a balance between flight safety and inspection imaging quality, providing a foundation for subsequent route correction and effectively solving the problem that fixed focal lengths cannot adapt to the imaging needs of different waypoints and different target components.

[0093] S500: Call the pre-built digital twin model of the power facility to perform collision detection and coverage assessment on the preliminary inspection route, and correct the preliminary inspection route based on the assessment results to obtain the corrected inspection route.

[0094] In this embodiment of the invention, a pre-built digital twin model of power facilities is invoked to perform collision detection and coverage assessment on the initial inspection route. Based on the assessment results, the initial inspection route is corrected to obtain the corrected inspection route. The initial inspection route only performs waypoint safety adjustments and focal length adaptation in a real-time environment, without virtual verification in a high-precision 3D scene. Therefore, there may still be potential collision risks between the drone and facilities such as poles and power lines, and there may be issues with the visual coverage of some small target components. By performing simulated flight detection using the digital twin model of power facilities, collision and coverage assessments can be completed without actual flight. Waypoints can be added to address risky waypoint deviations and missing areas, ensuring a collision-free and fully covered route, thus improving the reliability of the inspection.

[0095] Step S500 in the method provided in this embodiment of the invention includes: Load a pre-built digital twin model of power facilities, wherein the digital twin model of power facilities includes at least three-dimensional geometric data of towers, conductors, insulator strings and surrounding terrain; The safe waypoint sequence in the initial inspection route is imported into the digital twin model to simulate the three-dimensional trajectory of the UAV when it flies along the safe waypoint sequence; During the simulated flight, the distance between the UAV and each power facility and terrain in the digital twin model of the power facility is calculated point by point. If any distance is less than the preset safety margin, the corresponding waypoint is marked as a collision risk waypoint. For each target component, assess whether there is at least one waypoint in the safe waypoint sequence that can cover the target component. If not, mark the target component as missing coverage. For waypoints marked as collision risk waypoints, offset them in a direction away from the collision object and re-verify the waypoints after the offset until the collision risk is eliminated. For target components marked as missing coverage, insert new waypoints in the initial inspection route until the missing coverage is eliminated. The corrected waypoints are recombined to generate a revised patrol route.

[0096] First, a pre-built digital twin model of the power facility is loaded. This digital twin model includes at least three-dimensional geometric data of power poles, conductors, insulator strings, and the surrounding terrain. The digital twin model of the power facility is a virtual simulation model formed by a 1:1 three-dimensional model of the real power transmission line, power poles, conductors, insulator strings, surrounding terrain, and trees, containing complete and high-precision three-dimensional geometric data.

[0097] Specifically, a digital twin model of the corresponding inspection area is loaded. The digital twin model contains at least the three-dimensional coordinates and geometric topology data of the towers, conductors, insulator strings, terrain, and trees, providing a virtual scene for flight simulation. For example, a digital twin model of the target 110kV tower area is loaded, containing complete three-dimensional geometric data of the tower body, conductors, insulator strings, and surrounding terrain and trees.

[0098] Next, the sequence of safe waypoints from the initial inspection route is imported into the digital twin model to simulate the three-dimensional trajectory of the UAV flying along the sequence of safe waypoints. The sequence of safe waypoints from the initial inspection route generated by S400 is imported into the digital twin model in flight order to recreate the three-dimensional spatial trajectory of the UAV flying point by point in a virtual scene. For example, four safe waypoints are imported into the virtual scene in flight order to generate a continuous simulated UAV flight trajectory.

[0099] Secondly, during the simulated flight, the distance between the UAV and each power facility and terrain in the digital twin model of the power infrastructure is calculated point-by-point. If any distance is less than a preset safety margin, the corresponding waypoint is marked as a collision risk waypoint. The safety margin is a redundant distance added on top of the dynamic safety distance to further enhance safety and is used to determine whether there is a potential collision hazard. During the simulated flight, the three-dimensional distance between the virtual position of the UAV and obstacles such as poles, wires, and terrain in the model is calculated point-by-point. If any distance is less than the preset safety margin, the waypoint is marked as a collision risk waypoint. For example, with a preset safety margin of 0.5m, the virtual distance between waypoint 2 and the pole is 6.7m, which is less than the sum of the dynamic safety distance of 7.35m and the safety margin, and is therefore marked as a collision risk waypoint.

[0100] Furthermore, for each target component, it is evaluated whether there is at least one waypoint in the safe waypoint sequence that can cover the target component. If not, the target component is marked as missing coverage.

[0101] Specifically, for each target component, it is evaluated whether there is at least one waypoint in the safe waypoint sequence that can cover the target component. If not, the target component is marked as having missing coverage, including: Obtain a three-dimensional bounding box for each target component from the digital twin model. The three-dimensional bounding box is represented by a minimum bounding cuboid and contains all the geometric points of the target component. For each waypoint in the safe waypoint sequence, the camera frustum parameters corresponding to the waypoint are calculated based on the waypoint's coordinates and the adjusted camera focal length. Based on the camera frustum parameters, determine the camera's visible area corresponding to the waypoint; Determine whether the three-dimensional bounding box of the target component intersects with the camera's visible area. If they intersect, determine that the waypoint can cover the target component. The number of waypoints covered for each target component is counted. If the number of waypoints is zero, the target component is determined to be missing coverage.

[0102] First, a 3D bounding box for each target component is obtained from the digital twin model. This 3D bounding box is represented by a minimum bounding cuboid and contains all geometric points of the target component. The 3D bounding box is the minimum bounding cuboid that encloses all geometric points of the target component, used to simplify the target spatial range and quickly determine visual coverage relationships. The 3D geometric data of target components such as bolts, crossarms, and insulators are extracted from the digital twin model, and the corresponding minimum bounding cuboids, i.e., 3D bounding boxes, are calculated and generated. For example, the 3D geometric data of a tower bolt component is obtained, and a 3D bounding box containing the minimum bounding cuboid of that bolt is generated.

[0103] Secondly, for each waypoint in the safe waypoint sequence, the camera frustum parameters corresponding to that waypoint are calculated based on its coordinates and the adjusted camera focal length. The camera frustum is a quadrangular pyramidal region extending along the shooting direction with the camera position as its vertex, representing the spatial range of the camera's actual field of view. The frustum parameters include the horizontal field of view, vertical field of view, near clipping plane, far clipping plane, and shooting orientation, where the field of view is determined by the camera focal length and sensor width.

[0104] Specifically, using the current waypoint's three-dimensional coordinates as the camera's position center, the fixed camera hardware parameter, sensor width, is obtained; the horizontal field of view is calculated using standard optical formulas. The vertical field of view is derived synchronously based on the aspect ratio of the camera sensor; the near clipping plane is set as the minimum safe imaging distance of the UAV at 0.5m, and the far clipping plane is set as the maximum effective inspection distance at 15m; combined with the waypoint shooting orientation, all frustum parameters are calculated.

[0105] For example, waypoint 1 has coordinates of (118.5°E, 32.3005°N, 48m), the adjusted camera focal length is 50.53mm, and the camera sensor width is 36mm; the horizontal field of view... The vertical field of view is approximately 29.7°, the near clipping plane is 0.5m, and the far clipping plane is 15m. The complete camera frustum parameters are calculated by combining the orientation angle.

[0106] Next, based on the camera frustum parameters, the camera's visible area corresponding to the waypoint is determined. The camera's visible area is a continuous three-dimensional space enclosed by the camera's frustum, consisting of six planes: the near clipping plane, the far clipping plane, the left side, the right side, the upper side, and the lower side. Targets located within this space can be imaged and acquired by the camera.

[0107] Specifically, based on the camera position coordinates, shooting orientation, field of view, and near / far clipping planes, three-dimensional spatial plane equations for the six clipping planes of the view frustum are constructed. The set of spatial points that satisfy all six plane constraints constitutes the camera's visible area for the current waypoint. Targets outside the visible area cannot be captured by the camera. For example, based on the view frustum parameters of waypoint 1, a quadrangular pyramid space is formed extending from the camera position along the shooting orientation. Six clipping plane equations for near, far, left, right, top, and bottom are constructed. The enclosed three-dimensional space is the camera's visible area for waypoint 1, which includes the space containing the crossarm and bolts in the middle of the tower.

[0108] Then, it is determined whether the 3D bounding box of the target component intersects with the camera's visible area. If they intersect, it is determined that the waypoint can cover the target component. The 3D bounding box is the smallest circumscribed cuboid (AABB) that encloses the target component, determined by the maximum / minimum coordinates of the XYZ axes. Spatial intersection means that at least one vertex of the 3D bounding box is located within the camera's visible area, or that the bounding box and the visible area spatially overlap.

[0109] Specifically, the separation axis theorem is used to determine the intersection. The coordinates of all eight vertices of the target component's 3D bounding box are substituted into the equations of the six clipping faces of the view frustum to determine whether the vertices are located inside the visible area. If any vertex is located within the visible area, or if the bounding box and the visible area have intersecting faces, then the two are determined to intersect, and the waypoint can cover the target component.

[0110] For example, the coordinate range of the three-dimensional bounding box of the tower bolt component is X: 118.5002°-118.5004°E, Y: 32.3004°-32.3006°N, H: 47.8m-48.0m. Substituting the eight vertices of the bounding box into the equations of the six clipping planes of the view frustum of waypoint 1, it is determined that four of the vertices are located within the camera's visible area, that is, the three-dimensional bounding box intersects with the visible area. Therefore, waypoint 1 can cover the bolt component.

[0111] Finally, the number of waypoints covered for each target component is counted. If the number of waypoints is zero, the target component is considered to have missing coverage. The number of covered waypoints refers to the total number of waypoints that can cover a target component, that is, the number of waypoints where the 3D bounding box of the target component intersects with the camera's visible area at the corresponding waypoint. Missing coverage means that the target component is not covered by the camera's visible area at any waypoint, making it impossible to complete the imaging inspection of the component through the preliminary inspection route, which is considered a route defect.

[0112] Specifically, first, identify all target components that the current inspection task needs to cover, and establish a target component list. Then, iterate through each waypoint in the safe waypoint sequence, recording all target components that each waypoint can cover. For each component in the target component list, count the total number of different waypoints covering it, establishing a correspondence between target components and the number of covered waypoints. Verify the statistical results; if the number of covered waypoints for a certain target component is 0, meaning no waypoint can cover that component, then that target component is considered to have missing coverage.

[0113] For example, the target component list to be covered in the current tower component inspection task is: bolts, crossarms, insulators, and top pins. After traversing 4 safe waypoints, the statistics show that: bolts are covered by waypoints 1 and 2, crossarms are covered by waypoints 1 and 3, insulators are covered by waypoints 3 and 4, and top pins are not covered by any waypoints. Therefore, top pins are determined to be the missing component.

[0114] Subsequently, for waypoints marked as collision risk waypoints, they are offset in a direction away from the colliding object, and the offset waypoints are re-verified until the collision risk is eliminated. For target components marked as having missing coverage, new waypoints are inserted into the initial inspection route until the missing coverage is eliminated. Waypoint offset refers to adjusting the waypoint coordinates in the digital twin model for collision risk waypoints, moving them away from the colliding object to ensure that the distance between the waypoint and the colliding object meets safety requirements.

[0115] Specifically, firstly, in the digital twin model, the colliding object corresponding to the collision risk waypoint is identified, and the relative direction between the colliding object and the waypoint is calculated. For example, if the waypoint is located east of the tower, the direction away from it is west. The offset step size is set to 0.2m each time, and the waypoint is horizontally offset away from the colliding object. After the offset, the three-dimensional distance between the waypoint and the colliding object is recalculated. This offset and verification process is repeated until the distance between the waypoint and the colliding object is ≥ the dynamic safe distance threshold + safety margin, at which point the collision risk is eliminated, and the corrected waypoint coordinates are determined.

[0116] Secondly, in the digital twin model, the three-dimensional coordinates of the missing component are located and covered. Within a 1-2m radius of the missing component, the coordinates of the new waypoint are determined to ensure that there is no collision risk. Following the focal length calculation method, and considering the real-time distance between the new waypoint and the missing component, the component size, and the required imaging resolution, the adjusted focal length of the new waypoint is calculated. The new waypoint and its adjusted focal length are then substituted into the digital twin model to verify whether its visible area covers the missing component. If it does not, the waypoint coordinates or focal length are fine-tuned until coverage is successful.

[0117] For example, collision risk waypoint correction: Waypoint 2 is a collision risk waypoint. It is horizontally offset in a direction away from the tower. After offset, the distance between the waypoint and the tower is re-verified. If the dynamic safety distance and safety margin requirements are met, the collision risk is eliminated. Coverage gap correction: The pin at the top of the tower is a component with a coverage gap. A new waypoint 5 is inserted in the area around the pin. The corresponding camera focal length is matched based on the distance between the waypoint and the pin. After verification, the visible area of ​​this waypoint can completely cover the pin component, and the coverage gap is eliminated.

[0118] Finally, the corrected waypoints are recombined to generate a revised inspection route. The corrected waypoints include the original safe waypoints after offset correction, as well as new waypoints added to cover missing components. The flight logic sequence means that the waypoints are arranged according to the inspection logic of near to far, bottom to top, and left to right, ensuring that the UAV's flight trajectory is coherent and free of redundancy, conforming to the actual operation process of power line inspection.

[0119] Specifically, all corrected waypoints are collected, and the three-dimensional coordinates and adjusted camera focal length of each waypoint are extracted. According to the flight logic of UAV inspection, all waypoints are sorted, and the sorted waypoints are integrated in the form of waypoint coordinates + adjusted focal length to form a complete corrected inspection route, ensuring that the route has no collision risk and that all target components are covered.

[0120] For example, the revised waypoint list and order are as follows: Waypoint 1 (118.5°E, 32.3005°N, 48m, focal length 50.53mm), Waypoint 2 (118.5015°E, 32.3°N, 48m, focal length 50.11mm), Waypoint 3 (118.5003°E, 32.2995°N, 48m, focal length 50.00mm), Waypoint 4 (118.4997°E, 32.3°N, 48m, focal length 50.00mm), and Waypoint 5 (118.5°E, 32.3°N, 50.5m, focal length 52.1mm). Integrating the waypoints in sequence forms the revised inspection route for the pole component inspection task, meeting the requirements of collision-free and full coverage.

[0121] In this embodiment of the invention, a virtual simulation detection of UAV flight paths is achieved through a digital twin model of power facilities. This can accurately identify collision risk waypoints and missing coverage issues of target components. Collision risks can be eliminated by waypoint offsetting and insufficient coverage can be solved by supplementing waypoints. This ensures that the final flight path meets both flight safety and full inspection coverage requirements, avoids safety accidents and missed inspections in actual flight, and improves the adaptive rationality of the flight path and the completeness of the inspection.

[0122] S600: Output the modified inspection route as an adaptive inspection route.

[0123] In this embodiment of the invention, the corrected inspection route is output as an adaptive inspection route. The inspection route corrected by S500, including the three-dimensional coordinates of all corrected waypoints and the corresponding adjusted camera focal lengths, is organized in a format recognizable by the UAV flight control system and synchronously transmitted to the UAV's onboard control system to complete the output of the adaptive inspection route for the UAV to perform subsequent inspection operations. The final output adaptive inspection route has undergone multiple rounds of verification and correction, eliminating collision risks and target coverage gaps, balancing flight safety, full inspection coverage, and imaging clarity. It achieves adaptive route adjustment based on real-time environment and target requirements, accurately adapting to power-specific inspection tasks without manual intervention, effectively improving inspection efficiency, reliability, and intelligence, and providing accurate, safe, and efficient route support for autonomous UAV inspections.

[0124] Through the specific implementation methods described above, the embodiments of the present invention achieve the following technical effects: This invention provides an adaptive flight path reconfiguration method and system for UAVs used in power grid inspections. First, it loads corresponding parameter templates based on the power grid inspection task type to achieve adaptive matching of task parameters. Then, it collects multi-source sensing data in real time to provide a data foundation for subsequent flight path adjustments. Next, it optimizes waypoint positions based on dynamic safety distance thresholds to ensure flight safety. Simultaneously, it adaptively adjusts the camera focal length based on waypoint and sensing data to meet target imaging requirements. Finally, it uses a digital twin model to complete flight path collision detection and coverage assessment, correcting defects, and ultimately outputting a complete adaptive inspection flight path. This invention achieves full-process autonomy for power grid UAV flight path reconfiguration, from parameter adaptation, dynamic safety adjustment, imaging focal length optimization to virtual verification and correction, effectively improving the safety, coverage integrity, and imaging stability of inspection routes, and enhancing the intelligence and reliability of power grid inspections.

[0125] Example 2, as Figure 2 As shown, this invention provides an adaptive flight path reconfiguration system for unmanned aerial vehicles (UAVs) for power grid inspections. The system includes: The task parameter template loading module 11 is used to obtain the task type identifier of the current inspection task and load the corresponding task parameter template from the pre-built power special inspection task parameter template library according to the task type identifier. The multi-source sensing data acquisition module 12 is used to drive the UAV to fly according to the mission parameter template and to acquire multi-source sensing data in real time during the flight of the UAV. The safe waypoint sequence adjustment module 13 is used to calculate a dynamic safe distance threshold based on the multi-source sensing data, and adjust the position or flight altitude of the current waypoint according to the dynamic safe distance threshold to obtain an adjusted safe waypoint sequence. The preliminary inspection route generation module 14 is used to adjust the camera focal length based on the safe waypoint sequence and the multi-source sensing data to obtain the adjusted camera focal length, and combine the safe waypoint sequence with the adjusted camera focal length to generate a preliminary inspection route. The inspection route correction module 15 is used to call the pre-built digital twin model of power facilities, perform collision detection and coverage assessment on the preliminary inspection route, and correct the preliminary inspection route according to the assessment results to obtain the corrected inspection route. The adaptive inspection route output 16 is used to output the modified inspection route as the adaptive inspection route.

[0126] In one embodiment, the task parameter template loading module 11 is further configured to: The construction process of the power special inspection task parameter template library includes: Collect historical flight data of drones for various types of power-specific inspection missions. The historical flight data for each mission type should include at least camera focal length records and safe distance records. For each task type, the camera focal length and safe distance records are processed by box plots to obtain the cleaned focal length dataset and the cleaned safe distance dataset. Pair the cleaned focal length dataset with the cleaned safe distance dataset to form a two-dimensional sample point set; In the two-dimensional space spanned by the set of two-dimensional sample points, the local density value of each sample point is calculated using a kernel density estimation algorithm, and the area covered by the top preset percentage of sample points with the highest local density value is determined as the area with the highest density. Within the region of maximum density, the weighted arithmetic mean of all sample points is calculated using the local density value of each sample point as the weight, and the coordinate point corresponding to the weighted arithmetic mean is taken as the center point of the region of maximum density. The horizontal and vertical coordinates of the center point are used as the base values ​​of the camera focal length and the safety distance for the task type, respectively, and are associated with and stored with the corresponding task type identifier to construct a template library of power special inspection task parameters.

[0127] In one embodiment, the multi-source sensing data acquisition module 12 is further configured to: Control the drone to take off and fly along a preset sequence of initial waypoints; During flight, image sequences are acquired through an airborne visual camera, point cloud data is acquired through a lidar, position data and positioning error values ​​are acquired through an RTK positioning module, real-time wind speed is acquired through a wind speed sensor, and electric field strength values ​​are acquired through an electric field sensor, thus obtaining multi-source sensing data.

[0128] In one embodiment, the safe waypoint sequence adjustment module 13 is further configured to: Real-time wind speed, positioning error value, and electric field strength value are extracted from the multi-source sensing data, and a dynamic correction coefficient is calculated based on the real-time wind speed, the positioning error value, and the electric field strength value. Multiply the base value of the safety distance corresponding to the current task type by the dynamic correction coefficient to obtain the dynamic safety distance threshold; Using the point cloud data in the multi-source sensing data, the real-time distance between the current waypoint and the nearest obstacle is calculated, and the real-time distance is compared with the dynamic safe distance threshold; When the real-time distance is less than the dynamic safe distance threshold, the current waypoint is shifted away from the obstacle or the flight altitude of the current waypoint is increased until the real-time distance is greater than or equal to the dynamic safe distance threshold, and the shifted or increased waypoint is taken as the adjusted safe waypoint. Each waypoint in the initial waypoint sequence is adjusted sequentially to obtain the adjusted safe waypoint sequence.

[0129] The calculation of the dynamic correction coefficient based on the real-time wind speed, the positioning error value, and the electric field strength value includes: Collect historical flight datasets, in which each sample contains real-time wind speed, UAV positioning error, electric field strength value, and actual safe distance value recorded during a flight. Obtain the safety distance base value for the corresponding task type from the task parameter template, calculate the ratio of the actual safety distance value used in each sample to the safety distance base value, and use the ratio as the true correction coefficient label for that sample; The real-time wind speed, UAV positioning error, and electric field intensity value of each sample are combined into an input feature vector, and paired with the corresponding true correction coefficient label to form a training sample set; A lightweight neural network is constructed as a dynamic correction coefficient prediction model; The dynamic correction coefficient prediction model is trained in a supervised manner using the training sample set until it is verified to converge, thus obtaining the trained dynamic correction coefficient prediction model. The real-time wind speed, positioning error value, and electric field strength value of the current waypoint are combined into an input feature vector, which is then input into the trained dynamic correction coefficient prediction model, and the dynamic correction coefficient is output.

[0130] In one embodiment, the preliminary inspection route generation module 14 is further configured to: Obtain the camera focal length base value corresponding to the current task type from the task parameter template; Read the coordinates of the current waypoint from the safe waypoint sequence, and obtain the image sequence and point cloud data corresponding to the current waypoint from the multi-source sensing data; Target recognition is performed on the image sequence to determine the target components that need to be photographed at the current waypoint; Based on the type of the target component, the actual geometric dimensions and preset imaging resolution requirements of the target component are obtained from the pre-stored knowledge base; The point cloud data is used to calculate the real-time distance between the UAV and the target component, and the target focal length required to meet the imaging resolution requirement is calculated based on the real-time distance and the actual geometric dimensions of the target component. Calculate the arithmetic mean of the base value of the camera focal length and the target focal length, and use the arithmetic mean as the adjusted camera focal length; The coordinates of each waypoint in the safe waypoint sequence and the adjusted camera focal length are combined in chronological order to generate a preliminary inspection route.

[0131] Specifically, target recognition is performed on the image sequence to determine the target components that need to be photographed at the current waypoint, including: Each frame of the image is extracted from the image sequence, and each frame of the image is converted to grayscale to obtain a grayscale image sequence. The local binary mode operator is used to extract texture features from each frame of grayscale image in the grayscale image sequence to obtain the corresponding local binary mode texture map. The local binary pattern texture map is divided into multiple local regions, the texture histogram of each local region is calculated, and the texture histograms of all local regions are concatenated to form the texture feature vector of each frame image. The texture feature vectors of multiple consecutive frames of images are stacked in chronological order to construct a three-dimensional spatiotemporal feature tensor. The three-dimensional spatiotemporal feature tensor is input into a pre-trained target detection network to identify and output the category label and bounding box coordinates of each target component.

[0132] The construction process of the object detection network includes: Based on deep learning, an object detection network is constructed, which includes a slow path branch, a fast path branch, a feature fusion layer, a region proposal network, and a fully connected layer. A sequence of power inspection images labeled with the target component category and bounding box coordinates is collected as training samples, and the target detection network is trained using a supervised learning method until it is verified to converge, thus obtaining a pre-trained target detection network.

[0133] In one embodiment, the inspection route correction module 15 is further configured to: Load a pre-built digital twin model of power facilities, wherein the digital twin model of power facilities includes at least three-dimensional geometric data of towers, conductors, insulator strings and surrounding terrain; The safe waypoint sequence in the initial inspection route is imported into the digital twin model to simulate the three-dimensional trajectory of the UAV when it flies along the safe waypoint sequence; During the simulated flight, the distance between the UAV and each power facility and terrain in the digital twin model of the power facility is calculated point by point. If any distance is less than the preset safety margin, the corresponding waypoint is marked as a collision risk waypoint. For each target component, assess whether there is at least one waypoint in the safe waypoint sequence that can cover the target component. If not, mark the target component as missing coverage. For waypoints marked as collision risk waypoints, offset them in a direction away from the collision object and re-verify the waypoints after the offset until the collision risk is eliminated. For target components marked as missing coverage, insert new waypoints in the initial inspection route until the missing coverage is eliminated. The corrected waypoints are recombined to generate a revised patrol route.

[0134] Specifically, for each target component, it is evaluated whether there is at least one waypoint in the safe waypoint sequence that can cover the target component. If not, the target component is marked as having missing coverage, including: Obtain a three-dimensional bounding box for each target component from the digital twin model. The three-dimensional bounding box is represented by a minimum bounding cuboid and contains all the geometric points of the target component. For each waypoint in the safe waypoint sequence, the camera frustum parameters corresponding to the waypoint are calculated based on the waypoint's coordinates and the adjusted camera focal length. Based on the camera frustum parameters, determine the camera's visible area corresponding to the waypoint; Determine whether the three-dimensional bounding box of the target component intersects with the camera's visible area. If they intersect, determine that the waypoint can cover the target component. The number of waypoints covered for each target component is counted. If the number of waypoints is zero, the target component is determined to be missing coverage.

[0135] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for adaptive route reorganization of a UAV for power special inspection, characterized in that, The method includes: Obtain the task type identifier of the current inspection task, and load the corresponding task parameter template from the pre-built power special inspection task parameter template library according to the task type identifier; The drone is driven to fly according to the mission parameter template, and multi-source sensing data is collected in real time during the flight of the drone. Based on the multi-source sensing data, a dynamic safe distance threshold is calculated, and the position or flight altitude of the current waypoint is adjusted according to the dynamic safe distance threshold to obtain an adjusted safe waypoint sequence. Based on the safe waypoint sequence and the multi-source sensing data, the camera focal length is adjusted to obtain the adjusted camera focal length, and the safe waypoint sequence is combined with the adjusted camera focal length to generate a preliminary inspection route. The pre-built digital twin model of the power facility is invoked to perform collision detection and coverage assessment on the preliminary inspection route, and the preliminary inspection route is corrected based on the assessment results to obtain the corrected inspection route. The revised inspection route is output as an adaptive inspection route. Specifically, based on the multi-source sensing data, a dynamic safe distance threshold is calculated, and the position or flight altitude of the current waypoint is adjusted according to the dynamic safe distance threshold to obtain an adjusted safe waypoint sequence, including: Real-time wind speed, positioning error value, and electric field strength value are extracted from the multi-source sensing data, and a dynamic correction coefficient is calculated based on the real-time wind speed, the positioning error value, and the electric field strength value. Multiply the base value of the safety distance corresponding to the current task type by the dynamic correction coefficient to obtain the dynamic safety distance threshold; Using the point cloud data in the multi-source sensing data, the real-time distance between the current waypoint and the nearest obstacle is calculated, and the real-time distance is compared with the dynamic safe distance threshold; When the real-time distance is less than the dynamic safe distance threshold, the current waypoint is shifted away from the obstacle or the flight altitude of the current waypoint is increased until the real-time distance is greater than or equal to the dynamic safe distance threshold, and the shifted or increased waypoint is taken as the adjusted safe waypoint. Each waypoint in the initial waypoint sequence is adjusted sequentially to obtain the adjusted safe waypoint sequence; The calculation of the dynamic correction coefficient based on the real-time wind speed, the positioning error value, and the electric field strength value includes: Collect historical flight datasets, in which each sample contains real-time wind speed, UAV positioning error, electric field strength value, and actual safe distance value recorded during a flight. Obtain the safety distance base value for the corresponding task type from the task parameter template, calculate the ratio of the actual safety distance value used in each sample to the safety distance base value, and use the ratio as the true correction coefficient label for that sample; The real-time wind speed, UAV positioning error, and electric field intensity value of each sample are combined into an input feature vector, and paired with the corresponding true correction coefficient label to form a training sample set; A lightweight neural network is constructed as a dynamic correction coefficient prediction model; The dynamic correction coefficient prediction model is trained in a supervised manner using the training sample set until it is verified to converge, thus obtaining the trained dynamic correction coefficient prediction model. The real-time wind speed, positioning error value, and electric field strength value of the current waypoint are combined into an input feature vector, which is then input into the trained dynamic correction coefficient prediction model, and the dynamic correction coefficient is output. 2.The method of claim 1, wherein, The process of constructing the power special inspection task parameter template library includes: Collect historical flight data of drones for various types of power-specific inspection missions. The historical flight data for each mission type should include at least camera focal length records and safe distance records. For each task type, the camera focal length and safe distance records are processed by box plots to obtain the cleaned focal length dataset and the cleaned safe distance dataset. Pair the cleaned focal length dataset with the cleaned safe distance dataset to form a two-dimensional sample point set; In the two-dimensional space spanned by the set of two-dimensional sample points, the local density value of each sample point is calculated using a kernel density estimation algorithm, and the area covered by the top preset percentage of sample points with the highest local density value is determined as the area with the highest density. Within the region of maximum density, the weighted arithmetic mean of all sample points is calculated using the local density value of each sample point as the weight, and the coordinate point corresponding to the weighted arithmetic mean is taken as the center point of the region of maximum density. The horizontal and vertical coordinates of the center point are used as the base values ​​of the camera focal length and the safety distance for the task type, respectively, and are associated with and stored with the corresponding task type identifier to construct a template library of power special inspection task parameters.

3. The UAV adaptive flight path reconfiguration method for power grid special inspection as described in claim 1, characterized in that, The drone is driven to fly according to the mission parameter template. During the flight of the drone, multi-source sensing data is collected in real time, including: Control the drone to take off and fly along a preset sequence of initial waypoints; During flight, image sequences are acquired through an airborne visual camera, point cloud data is acquired through a lidar, position data and positioning error values ​​are acquired through an RTK positioning module, real-time wind speed is acquired through a wind speed sensor, and electric field strength values ​​are acquired through an electric field sensor, thus obtaining multi-source sensing data.

4. The UAV adaptive flight path reconfiguration method for power grid special inspection as described in claim 1, characterized in that, Based on the safe waypoint sequence and the multi-source sensing data, the camera focal length is adjusted to obtain the adjusted camera focal length. The safe waypoint sequence is then combined with the adjusted camera focal length to generate a preliminary patrol route, including: Obtain the camera focal length base value corresponding to the current task type from the task parameter template; Read the coordinates of the current waypoint from the safe waypoint sequence, and obtain the image sequence and point cloud data corresponding to the current waypoint from the multi-source sensing data; Target recognition is performed on the image sequence to determine the target components that need to be photographed at the current waypoint; Based on the type of the target component, the actual geometric dimensions and preset imaging resolution requirements of the target component are obtained from the pre-stored knowledge base; The point cloud data is used to calculate the real-time distance between the UAV and the target component, and the target focal length required to meet the imaging resolution requirement is calculated based on the real-time distance and the actual geometric dimensions of the target component. Calculate the arithmetic mean of the base value of the camera focal length and the target focal length, and use the arithmetic mean as the adjusted camera focal length; The coordinates of each waypoint in the safe waypoint sequence and the adjusted camera focal length are combined in chronological order to generate a preliminary inspection route.

5. The UAV adaptive route reconfiguration method for power grid special inspection as described in claim 4, characterized in that, Target recognition is performed on the image sequence to determine the target components that need to be photographed at the current waypoint, including: Each frame of the image is extracted from the image sequence, and each frame of the image is converted to grayscale to obtain a grayscale image sequence. The local binary mode operator is used to extract texture features from each frame of grayscale image in the grayscale image sequence to obtain the corresponding local binary mode texture map. The local binary pattern texture map is divided into multiple local regions, the texture histogram of each local region is calculated, and the texture histograms of all local regions are concatenated to form the texture feature vector of each frame image. The texture feature vectors of multiple consecutive frames of images are stacked in chronological order to construct a three-dimensional spatiotemporal feature tensor. The three-dimensional spatiotemporal feature tensor is input into a pre-trained target detection network to identify and output the category label and bounding box coordinates of each target component; The construction process of the object detection network includes: Based on deep learning, an object detection network is constructed, which includes a slow path branch, a fast path branch, a feature fusion layer, a region proposal network, and a fully connected layer. A sequence of power inspection images labeled with the target component category and bounding box coordinates is collected as training samples, and the target detection network is trained using a supervised learning method until it is verified to converge, thus obtaining a pre-trained target detection network.

6. The UAV adaptive flight path reconfiguration method for power grid special inspection as described in claim 1, characterized in that, A pre-built digital twin model of the power facility is invoked to perform collision detection and coverage assessment on the initial inspection route. Based on the assessment results, the initial inspection route is corrected to obtain the corrected inspection route, including: Load a pre-built digital twin model of power facilities, wherein the digital twin model of power facilities includes at least three-dimensional geometric data of towers, conductors, insulator strings and surrounding terrain; The safe waypoint sequence in the initial inspection route is imported into the digital twin model to simulate the three-dimensional trajectory of the UAV when it flies along the safe waypoint sequence; During the simulated flight, the distance between the UAV and each power facility and terrain in the digital twin model of the power facility is calculated point by point. If any distance is less than the preset safety margin, the corresponding waypoint is marked as a collision risk waypoint. For each target component, assess whether there is at least one waypoint in the safe waypoint sequence that can cover the target component. If not, mark the target component as missing coverage. For waypoints marked as collision risk waypoints, offset them in a direction away from the collision object and re-verify the waypoints after the offset until the collision risk is eliminated. For target components marked as missing coverage, insert new waypoints in the initial inspection route until the missing coverage is eliminated. The corrected waypoints are recombined to generate a revised patrol route.

7. The UAV adaptive flight path reconfiguration method for power grid special inspection as described in claim 6, characterized in that, For each target component, assess whether there is at least one waypoint in the safe waypoint sequence that can cover the target component. If not, mark the target component as having missing coverage, including: Obtain a three-dimensional bounding box for each target component from the digital twin model. The three-dimensional bounding box is represented by a minimum bounding cuboid and contains all the geometric points of the target component. For each waypoint in the safe waypoint sequence, the camera frustum parameters corresponding to the waypoint are calculated based on the waypoint's coordinates and the adjusted camera focal length. Based on the camera frustum parameters, determine the camera's visible area corresponding to the waypoint; Determine whether the three-dimensional bounding box of the target component intersects with the camera's visible area. If they intersect, determine that the waypoint can cover the target component. The number of waypoints covered for each target component is counted. If the number of waypoints is zero, the target component is determined to be missing coverage.

8. An adaptive flight path reconfiguration system for unmanned aerial vehicles (UAVs) for power grid inspection, characterized in that: The system for implementing the UAV adaptive route reconfiguration method for power grid-specific inspections as described in any one of claims 1-7, the system comprising: The task parameter template loading module is used to obtain the task type identifier of the current inspection task and load the corresponding task parameter template from the pre-built power special inspection task parameter template library according to the task type identifier. The multi-source sensing data acquisition module is used to drive the UAV to fly according to the mission parameter template and to acquire multi-source sensing data in real time during the flight of the UAV. The safe waypoint sequence adjustment module is used to calculate a dynamic safe distance threshold based on the multi-source sensing data, and adjust the position or flight altitude of the current waypoint according to the dynamic safe distance threshold to obtain the adjusted safe waypoint sequence. The preliminary inspection route generation module is used to adjust the camera focal length based on the safe waypoint sequence and the multi-source sensing data to obtain the adjusted camera focal length, and combine the safe waypoint sequence with the adjusted camera focal length to generate a preliminary inspection route. The inspection route correction module is used to call a pre-built digital twin model of power facilities, perform collision detection and coverage assessment on the preliminary inspection route, and correct the preliminary inspection route based on the assessment results to obtain the corrected inspection route. The adaptive inspection route output is used to output the modified inspection route as the adaptive inspection route.

Citation Information

Patent Citations

  • Distribution network unmanned aerial vehicle autonomous route generation method and system based on deep reinforcement learning

    CN120848554A

  • Unmanned aerial vehicle automatic intelligent inspection method and inspection system

    CN121722149A