Patrol trajectory clustering method and device, equipment and storage medium

By introducing the power transmission corridor topology into UAV inspections, separating hovering anchor points and constructing direction-sensitive segmented costs, and utilizing topological attenuation factors and anisotropic spatiotemporal distances for trajectory segmentation and clustering, the problems of hovering interference and cross-gap mis-aggregation are solved, generating representative trajectories with business semantics, thus improving the accuracy and practicality of inspection trajectory clustering.

CN123179019APending Publication Date: 2026-11-27JIANGXI KECHEN HONGXING INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611698516.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-30
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies for UAV inspection of power transmission corridors do not fully consider the anisotropy of the transmission corridor direction and the topological constraints of the span, resulting in trajectory segmentation being affected by hovering interference, clustering being prone to cross-span mis-aggregation, and representative trajectories lacking business semantic continuity.

Method used

By acquiring the inspection trajectory and corridor topology, the hovering anchor points are separated, a segmented cost based on corridor direction deviation is constructed, and trajectory segmentation and clustering are performed using the topological attenuation factor and anisotropic spatiotemporal distance to generate representative trajectories, combined with time, space and topological three-dimensional continuity constraints.

Benefits of technology

The generated representative trajectories not only maintain spatial continuity but also possess complete inspection business semantics, enabling them to directly serve the reuse of inspection routes and operation evaluation, thereby enhancing the practical value and interpretability of the clustering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179019A_ABST
    Figure CN123179019A_ABST
Patent Text Reader

Abstract

The application relates to a track clustering method, device and equipment for inspection, and a storage medium, and relates to the technical field of power line detection. The method comprises the following steps: obtaining a target inspection track and an inspection corridor topology; separating hovering anchor points based on the inspection corridor topology, and constructing a segmented cost based on a corridor direction deviation and a vertical corridor direction deviation, wherein the weight of the vertical corridor direction deviation is greater than the weight of the corridor direction deviation; dividing a sub-track section based on the segmented cost; determining a topology attenuation factor based on a time-space feature of the sub-track section and a topology interval; calculating an anisotropic time-space distance based on the topology attenuation factor and the time-space feature of the sub-track section, and performing density peak clustering to obtain a track cluster; and determining a representative track from the track cluster and associating the hovering anchor points. The application effectively suppresses cross-span distance misclustering, and generates a representative track with business semantic continuity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power line inspection technology, and in particular to a method, apparatus, equipment and storage medium for clustering inspection trajectories. Background Technology

[0002] In UAV inspection operations along power transmission corridors, cluster analysis of historical inspection trajectories is a crucial method for identifying typical inspection routes, evaluating mission execution quality, and analyzing flight risks. However, relevant trajectory clustering techniques typically treat the inspection space as a regular two-dimensional open space, relying primarily on Euclidean distance or scalar weighted similarity for calculations. This approach ignores the unique characteristics of power transmission corridors as elongated topological spaces: firstly, displacements along the line direction and perpendicular to the line direction have distinctly different operational implications, and existing methods fail to distinguish this directional anisotropy, making hovering work points near towers prone to interfering with the segmentation results of normal flight trajectories; secondly, there are clear topological isolation relationships between different spans, and failing to embed the span topology into distance metrics can easily lead to erroneous aggregation across spans in scenarios with line bends or parallel runs. Summary of the Invention

[0003] This invention provides a method, apparatus, device, and storage medium for clustering inspection trajectories, to at least address the problems in related technologies where insufficient consideration is given to the directional anisotropy of transmission corridors and span topological constraints, leading to hovering interference in trajectory segmentation, easy cross-span mis-aggregation in clustering, and a lack of business semantic continuity in representative trajectories. The technical solution of this invention is as follows: According to a first aspect of the present invention, a method for clustering inspection trajectories is provided. The method includes: acquiring a target inspection trajectory collected along a power transmission corridor and the inspection corridor topology of the power transmission corridor; wherein the inspection corridor topology includes tower nodes and span edges connecting adjacent tower nodes; based on the inspection corridor topology, separating hovering anchor points from the target inspection trajectory, and constructing a segmented cost based on the deviation along the corridor direction and the deviation perpendicular to the corridor direction; wherein the weight of the deviation perpendicular to the corridor direction in the segmented cost is greater than the weight of the deviation along the corridor direction; based on the segmented cost, dividing the target inspection trajectory after separating the hovering anchor points into multiple sub-trajectory segments; determining a topology attenuation factor based on the topology interval of the span to which the sub-trajectory segment belongs in the inspection corridor topology; calculating anisotropic spatiotemporal distance based on the topology attenuation factor and the spatiotemporal characteristics of the sub-trajectory segments, and performing density peak clustering on the multiple sub-trajectory segments based on the anisotropic spatiotemporal distance to obtain multiple trajectory clusters; determining a representative trajectory from the trajectory clusters, and associating the hovering anchor points with the representative trajectory.

[0004] The topological attenuation factor characterizes the weakening of the topological correlation between sub-trajectory segments as the gap increases, and its reciprocal amplifies the distance penalty between sub-trajectory segments. By incorporating the topological penalty along with the weights of different features into the quadratic distance, orientation-sensitive neighborhoods can be formed in the feature space, reducing the density contribution between sub-trajectory segments that are spatially close but have large topological gaps.

[0005] The above scheme introduces the topology of the transmission corridor (towers and spans) as prior knowledge into the entire trajectory processing process. First, in the segmentation stage, hovering anchor points are separated to eliminate their interference with fitting, and segmentation costs are constructed using directional anisotropy bias to make the segmentation results more consistent with the actual characteristics of the narrow space. Second, in the clustering stage, a topology attenuation factor is introduced to enable distance measurement to perceive span intervals and effectively suppress cross-span mis-clustering. Finally, in the generation stage, hovering anchor points are re-associated to ensure the dual integrity of representative trajectories in terms of spatial morphology and business semantics.

[0006] As a technical solution, based on the inspection corridor topology, hovering anchor points are separated from the target inspection trajectory. Based on the deviation along the corridor direction and the deviation perpendicular to the corridor direction, a segmented cost is constructed to divide the target inspection trajectory after separating the hovering anchor points into multiple sub-trajectory segments. This includes: identifying a sequence of continuous low-speed trajectory points that meet the preset hovering conditions based on the flight speed, duration, and number of sampling points of the trajectory points in the target inspection trajectory, and extracting the sequence of continuous low-speed trajectory points as hovering anchor points; for the continuous flight trajectory segments after separating the hovering anchor points, the vertical deviation vector of the trajectory points relative to the candidate fitted line segments is projected onto the local corridor coordinate system determined by the coordinates of the nodes at both ends of the span in the inspection corridor topology, and the deviation along the corridor direction and the deviation perpendicular to the corridor direction are decomposed to obtain the deviation along the corridor direction and the deviation perpendicular to the corridor direction.

[0007] This scheme accurately identifies and separates hovering anchor points through multi-dimensional threshold joint judgment, avoiding fragmented segmentation caused by hovering points participating in line segment fitting. At the same time, it uses the local corridor coordinate system to decouple geometric deviation into two orthogonal components along the corridor and perpendicular to the corridor, providing a precise physical basis for subsequent application of differentiated weights, enabling the segmentation algorithm to distinguish between normal flight along the line and abnormal lateral deviation.

[0008] As a technical solution, a segmented cost is constructed based on the deviation along the corridor direction and the deviation perpendicular to the corridor direction. The target inspection trajectory after separating the hovering anchor point is divided into multiple sub-trajectory segments, including: weighting the deviation perpendicular to the corridor direction using the corridor anisotropy coefficient and adding it to the deviation along the corridor direction to obtain the corridor anisotropy deviation; wherein, the corridor anisotropy coefficient is greater than 1; constructing the minimum description length cost of the continuous flight trajectory segment based on the model complexity of the candidate fitted line segment, the corridor anisotropy deviation, and the local direction change error; extending the candidate endpoint forward along the continuous flight trajectory segment, when the minimum description length cost without segmentation is greater than the minimum description length cost after segmentation at the current position, the previous trajectory point is determined as the segmentation feature point, and the search continues from the segmentation feature point to obtain the sub-trajectory segment.

[0009] In this scheme, the corridor anisotropy coefficient is a parameter greater than 1, which is used to quantify the penalty intensity of deviation in the vertical corridor direction relative to deviation in the corridor direction. Its physical meaning is that it reflects that the tolerance of the transmission channel to lateral deviation is much lower than that to longitudinal displacement. By embedding this coefficient into the minimum description length cost function, the segmentation process becomes more sensitive to lateral movement deviating from the channel, while maintaining a high tolerance to normal expansion and contraction along the channel, thereby obtaining sub-track segments that are highly adapted to the structure of the transmission corridor.

[0010] As a technical solution, a topological attenuation factor is determined based on the topological interval of the span to which the sub-track segment belongs in the inspection corridor topology. Anisotropic spatiotemporal distances are then calculated based on the topological attenuation factor and the spatiotemporal characteristics of the sub-track segments. This includes: constructing a spatiotemporal feature vector by extracting the vertical distance, parallel distance, angular distance, and temporal distance between any two sub-track segments; determining the topological attenuation factor based on the shortest topological interval number of the span to which the two sub-track segments belong in the inspection corridor topology; wherein the topological attenuation factor decreases as the number of shortest topological intervals increases; and using the topological attenuation factor and a preset feature weight matrix, a quadratic form calculation is performed on the spatiotemporal feature vector to obtain the anisotropic spatiotemporal distance.

[0011] In this scheme, the topology decay factor is a scalar parameter calculated based on the shortest path in graph theory. It is used to characterize the attenuation of the correlation between sub-trajectory segments due to the isolation caused by the gap. Its value decreases exponentially with the increase of the topological interval. By using it as a scaling factor of the weight matrix and using quadratic distance calculation, the equidistant neighborhoods present an anisotropic ellipsoidal shape in the feature space and achieve soft isolation in the topological dimension. This fundamentally solves the problem of mis-aggregation of trajectory segments that are close in spatial projection but not topologically connected.

[0012] As a technical solution, density peak clustering is performed on multiple sub-trajectory segments based on anisotropic spatiotemporal distance to obtain multiple trajectory clusters. This includes: constructing corridor anisotropic spatiotemporal density for each sub-trajectory segment based on anisotropic spatiotemporal distance and density kernel bandwidth; when the average nearest neighbor distance of a sub-trajectory segment is higher than a distance threshold and the average nearest neighbor density is lower than a density threshold, the sub-trajectory segment is marked as a sparse sub-trajectory segment and output separately; for non-sparse sub-trajectory segments, a basic decision value is calculated based on the corridor anisotropic spatiotemporal density and relative distance after quantile truncation normalization; where the relative distance is the minimum anisotropic spatiotemporal distance to higher density samples; based on the basic decision value and the minimum anisotropic spatiotemporal distance from the non-sparse sub-trajectory segment to the selected cluster center, a corridor equilibrium decision value is calculated; cluster centers are iteratively selected from largest to smallest according to the corridor equilibrium decision value, and the non-sparse sub-trajectory segments are assigned to the nearest cluster center to obtain trajectory clusters.

[0013] Wherein, when there are higher density samples, the relative distance is the minimum anisotropic spatiotemporal distance to the higher density samples; when there are no higher density samples, the relative distance is the high quantile value of the anisotropic spatiotemporal distance to other samples.

[0014] The steps described above for obtaining trajectory clusters can be understood as follows: selecting the non-sparse sub-trajectory segment with the largest basic decision value as the initial cluster center; after each cluster center is added, updating the set of selected cluster centers, recalculating the corridor equilibrium decision value of the remaining candidate sub-trajectory segments, and selecting the candidate sub-trajectory segment with the largest current corridor equilibrium decision value as the next cluster center, until a preset stopping condition is met; and assigning the non-sparse sub-trajectory segment to the nearest cluster center to obtain the trajectory cluster.

[0015] This scheme introduces a corridor equilibrium decision value, which adds a spatial separation constraint between candidate centers and selected centers to the traditional density peak clustering, preventing cluster centers from being over-concentrated in local high-density areas of the corridor. At the same time, it uses a dual threshold mechanism to identify and remove sparse abnormal trajectories, avoiding interference from noise points in the selection of cluster centers and ensuring the uniformity and representativeness of the clustering results across the entire corridor.

[0016] As a technical solution, the representative trajectory is determined from the trajectory cluster, including: screening high-density candidate sub-trajectory segments that meet the preset relative density conditions from the trajectory cluster; determining whether any adjacent high-density candidate sub-trajectory segments simultaneously satisfy the following conditions: time interval less than a preset time threshold, spatial interval less than a preset spatial threshold, and gap topological interval less than a preset topological threshold; if all conditions are met, a directed connection relationship is constructed to form a candidate trajectory chain, and the optimal trajectory chain is determined from the candidate trajectory chain as the main body of the representative trajectory.

[0017] This can be understood as determining whether any adjacent high-density candidate sub-trajectory segments simultaneously satisfy the following conditions: the time interval is not greater than a preset time threshold, the spatial interval is not greater than a preset spatial threshold, and the gap topological interval is not greater than a preset topological threshold.

[0018] The scheme employs a three-dimensional joint continuity constraint of time, space, and topology. Connections are only allowed when the intervals in all three dimensions are less than their respective thresholds. This effectively avoids the situation where trajectories from different time periods are incorrectly connected simply because the coordinates are close, or trajectories from different line segments are incorrectly connected simply because the time is close. This ensures the dual continuity of the generated representative trajectory in both physical space-time and network topology.

[0019] As a technical solution, high-density candidate sub-trajectory segments that meet preset relative density conditions are selected from trajectory clusters. This includes: calculating the ratio of the density of a sub-trajectory segment in a trajectory cluster to the maximum density value in the trajectory cluster; when the ratio is greater than a preset relative density threshold, the corresponding sub-trajectory segment is identified as a high-density candidate sub-trajectory segment; associating hovering anchor points with representative trajectories, including: extracting target hovering anchor points whose associated towers are located within the tower range from the separated hovering anchor points based on the tower range covered by the optimal trajectory chain; determining typical inspection periods based on the sampling time of each sub-trajectory segment in the optimal trajectory chain; and combining the cluster identifier, continuous tower sequence, typical inspection period, and target hovering anchor points to generate a representative trajectory containing business semantics.

[0020] Specifically, associating the hovering anchor points with the representative trajectory includes: extracting target hovering anchor points from the separated hovering anchor points based on the range of towers covered by the optimal trajectory chain and their respective inspection flights; when multiple target hovering anchor points exist for the same tower, selecting the target hovering anchor point with the longest duration; determining the typical inspection period representing the representative trajectory based on the sampling time of each sub-trajectory segment in the optimal trajectory chain; and combining the cluster identifier, continuous tower sequence, typical inspection period, and target hovering anchor points to generate the representative trajectory containing business semantics.

[0021] This scheme uses relative density rather than absolute density for screening, which can adapt to the density scale differences between different clusters. By re-associating the previously separated hovering anchor points according to the tower range and combining them with typical inspection periods, the final output representative trajectory not only has the representativeness of geometric shape, but also has complete business semantics of starting tower, ending tower, typical time period and hovering operation, which can directly serve the reuse of inspection routes and operation evaluation.

[0022] According to a second aspect of the present invention, an inspection trajectory clustering device is provided. This device is used to execute an inspection trajectory clustering method as described in the first aspect and any possible technical solution thereof, comprising: an anisotropic trajectory segmentation module for acquiring a target inspection trajectory collected along a power transmission corridor and the inspection corridor topology of the power transmission corridor; the inspection corridor topology includes tower nodes and span edges connecting adjacent tower nodes; separating hovering anchor points from the target inspection trajectory based on the inspection corridor topology, and constructing segmentation costs based on deviations along the corridor direction and deviations perpendicular to the corridor direction; and segmenting the target trajectory after separating the hovering anchor points based on the segmentation costs. The inspection trajectory is divided into multiple sub-trajectory segments; among them, the vertical corridor direction deviation has a greater weight in the segmentation cost than the deviation along the corridor direction; the anisotropic spatiotemporal clustering module is used to determine the topological attenuation factor based on the topological interval of the sub-trajectory segment's range in the inspection corridor topology, and calculate the anisotropic spatiotemporal distance based on the topological attenuation factor and the spatiotemporal characteristics of the sub-trajectory segment, and perform density peak clustering on multiple sub-trajectory segments based on the anisotropic spatiotemporal distance to obtain multiple trajectory clusters; the representative trajectory generation module is used to determine the representative trajectory from the trajectory clusters and associate the hovering anchor point with the representative trajectory.

[0023] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to perform an inspection trajectory clustering method as described in the first aspect and any possible technical solution thereof.

[0024] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which instructions are stored, such that when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to perform an inspection trajectory clustering method as described in the first aspect and any possible implementation thereof.

[0025] The technical solutions provided by the embodiments of the present invention bring at least the following beneficial effects: This application deeply embeds the directional anisotropy of the transmission corridor and the span network topology into the entire process of trajectory segmentation, clustering, and representative trajectory generation. First, in the trajectory segmentation stage, by separating hovering anchor points and constructing a segmentation cost based on the corridor directional anisotropy deviation, the problems of hovering operation interference segmentation and failure to distinguish directional constraints in the prior art are solved. The vertical corridor directional deviation is given a higher weight, making the segmentation process more sensitive to lateral movements deviating from the channel, and the obtained sub-trajectory segments more accurately reflect the structural characteristics of the actual inspection segment. Second, in the trajectory clustering stage, by introducing an attenuation factor based on the span topology interval and constructing a quadratic anisotropic spatiotemporal distance, the problems of cross-span mis-clustering and local concentration of cluster centers are solved. The topology attenuation factor enables the distance metric to perceive the isolation of the network structure, and in conjunction with the corridor equilibrium decision value to select the cluster center, it ensures the reasonable distribution and structural quality of the clustering results in the narrow topological space. Finally, in the representative trajectory generation stage, by combining temporal, spatial, and topological three-dimensional continuity constraints and re-associating hovering anchor points with typical inspection periods, the problem of the lack of business semantic continuity in representative trajectories was solved. The representative trajectories generated in this way not only maintain a stable spatial morphology but also possess complete inspection business semantics, which can be directly used for standard route extraction, historical task review, and abnormal deviation analysis, significantly improving the practical value and interpretability of the clustering results.

[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0027] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0028] Figure 1 This is a flowchart illustrating an inspection trajectory clustering method according to an exemplary embodiment; Figure 2 This is a schematic diagram illustrating the distribution of corridor equilibrium decision values ​​according to an exemplary embodiment; Figure 3 This is a schematic diagram illustrating a visualization result of a corridor semantic representative trajectory according to an exemplary embodiment; Figure 4 This is a block diagram illustrating an inspection trajectory clustering device according to an exemplary embodiment; Figure 5 This is a schematic diagram of an electronic device according to an exemplary embodiment. Detailed Implementation

[0029] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0030] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure detailed in this application.

[0031] For ease of understanding, the inspection trajectory clustering method provided in this application will be described in detail below with reference to the accompanying drawings.

[0032] Figure 1 This is a flowchart illustrating an inspection trajectory clustering method based on corridor topology guidance, according to an exemplary embodiment. The inspection trajectory clustering method is based on corridor topology guidance, such as... Figure 1 As shown, the inspection trajectory clustering method includes the following steps to introduce the topology of the power transmission corridor as prior knowledge into the entire trajectory processing process, thereby achieving high-precision trajectory clustering that conforms to the physical constraints of narrow spaces and business semantics.

[0033] Step S100: Obtain the target inspection trajectory and the inspection corridor topology along the power transmission corridor.

[0034] The inspection corridor topology includes pole nodes and span edges connecting adjacent pole nodes.

[0035] In terms of data structure, the inspection corridor topology is essentially a set of nodes and edges in graph theory. Tower nodes contain at least tower identifiers and spatial coordinate information, while span edges define the connection relationships and span lengths between adjacent towers. This topological representation transforms the continuous three-dimensional space containing the UAV trajectory into a discrete topological space with a well-defined network structure, providing a unified spatial benchmark for subsequent direction calculations, span relationship determination, and continuous search of representative trajectories. The target inspection trajectory is a time-series sequence of trajectory points containing spatial location, sampling time, flight speed, and associated tower information. By mapping this to the inspection corridor topology, a precise correspondence between trajectory data and physical line facilities can be established.

[0036] Specifically, the inspection corridor topology consists of pole nodes and span edges. Pole nodes include pole identifiers and spatial coordinates, while span edges include the pole identifiers at both ends and the span length. The target inspection trajectory consists of a sequence of trajectory points based on spatial location, sampling time, flight speed, and flight number identifier.

[0037] In some embodiments, latitude and longitude are converted into planar projected coordinates in meters, trajectory points are arranged according to sampling time, and trajectory points with duplicate time records and no valid location are discarded. The trajectory points are associated with the corresponding towers and spans based on their spatial distances to the towers and span segments. In embodiments using the shortest span path, when a sub-trajectory segment involves multiple spans, the associated span is determined by the minimum projected distance from its midpoint to the span segment; for equidistant segments, a pre-fixed span order is used. The three-level truncation experiment implementation of the chain corridor retains the nearest tower identifier at the start and end points of the sub-segment, and approximates the topological interval using the difference in the starting tower sequence number; the two attribution methods are used for their respective topological implementations.

[0038] Step S200: Based on the inspection corridor topology, the hovering anchor point is separated from the target inspection trajectory, and the segmented cost is constructed based on the deviation along the corridor direction and the deviation perpendicular to the corridor direction.

[0039] Among them, the weight of the vertical corridor direction deviation in the segmented cost is greater than the weight of the deviation along the corridor direction.

[0040] In this implementation step, the core purpose of separating hovering anchor points is to eliminate interference from non-flight states on trajectory geometric fitting. During power line inspection operations, drones typically hover at low speeds near power poles to perform detailed photography or inspection tasks. These hovering points are highly clustered in space and lack directionality. If they were directly involved in trajectory segment fitting, they would easily generate numerous zero-length line segments or fragmented flight segments, disrupting the continuity of the normal flight trajectory. Therefore, this embodiment first identifies and separates these hovering anchor points, preventing them from participating in subsequent line segment fitting calculations, and instead retains them until the final representative trajectory generation stage for semantic association.

[0041] Meanwhile, this embodiment fully considers the physical constraints of the power transmission channel as a narrow space when constructing the segmented cost. In actual inspection operations, the displacement of the UAV along the line direction is normal cruise behavior, while deviations perpendicular to the line direction often indicate potential collision risks or route anomalies. Therefore, by assigning a greater weight to deviations perpendicular to the corridor direction than deviations along the corridor direction, the segmentation algorithm becomes more sensitive to lateral deviations while maintaining a higher tolerance for longitudinal scaling, thereby obtaining sub-trajectory segment division results that better reflect the characteristics of actual inspection flight segments.

[0042] Step S300: Based on the segmentation cost, the target inspection trajectory after separating the hovering anchor point is divided into multiple sub-trajectory segments.

[0043] This implementation step utilizes the aforementioned anisotropic segmentation cost to adaptively determine the location of segmented feature points by comparing the cost of no segmentation with that of segmentation. Because corridor direction constraints are embedded in the segmentation cost, the resulting sub-trajectory segments not only accurately reflect the continuous flight process of the UAV but also effectively distinguish between normal cruise segments and abnormal yaw segments, providing high-quality basic units for subsequent clustering.

[0044] Step S400: Determine the topology attenuation factor based on the topology interval of the sub-trajectory segment in the inspection corridor topology.

[0045] The topological decay factor is a scalar parameter used to characterize the effect of the gap interval on the suppression of trajectory similarity.

[0046] In power transmission corridors, even if two sub-track segments are spatially close, their operational implications can be drastically different if they belong to different spans or even different line sections. For example, different spans of parallel or curved lines may overlap geographically, but are isolated on the network topology. By introducing a topology attenuation factor, sub-track segments belonging to the same span maintain the highest correlation, while the correlation decreases as the number of topology intervals increases. This mathematically achieves soft isolation based on network topology, fundamentally avoiding the problem of mis-clustering across spans caused by geometric distance alone.

[0047] In this implementation step, within the transmission corridor, sub-track segments with similar spatial projections may belong to different spans. By introducing a topological attenuation factor, sub-track segments within the same span maintain a high degree of topological correlation, while sub-track segments with different spans are subject to a greater distance penalty. This process uses both span topological relationships and trajectory geometric differences for similarity calculation, thereby reducing the risk of mis-clustering caused by relying solely on spatial proximity.

[0048] Step S500: Calculate the anisotropic spatiotemporal distance based on the topological attenuation factor and the spatiotemporal characteristics of the sub-trajectory segments, and perform density peak clustering on multiple sub-trajectory segments based on the anisotropic spatiotemporal distance to obtain multiple trajectory clusters.

[0049] The anisotropic spatiotemporal distance here differs from traditional Euclidean distance or simple scalar weighted distance; it integrates directional and topological information.

[0050] The equidistant neighborhood formed by this distance metric in the feature space is not a standard sphere, but an ellipsoid adapted to the narrow structure of the transmission corridor, and it exhibits attenuation characteristics in the topological dimension. Density peak clustering based on this distance can automatically identify densely packed trajectory regions that extend along the corridor direction, are compact in the vertical direction, and are topologically connected, effectively improving the robustness and accuracy of the clustering results in complex transmission environments.

[0051] Step S600: Determine representative trajectories from the trajectory clusters and associate hovering anchor points with the representative trajectories.

[0052] After clustering is completed, each trajectory cluster represents a typical inspection pattern.

[0053] This implementation step extracts the most representative trajectory entities from various clusters and re-associates the hovering anchor points separated in step S200. This implementation step ensures that the final output representative trajectory is not only statistically representative in terms of geometric shape, but also fully retains the business semantics of when, where, and what kind of operation, solving the problem in the prior art that representative trajectories lack hovering operation information and are difficult to directly serve operation and maintenance business.

[0054] Although this embodiment describes the specific processing order described above, in other embodiments, as long as the data dependencies between the steps are satisfied, the execution order of some steps can also be appropriately adjusted. For example, the calculation of the topology attenuation factor can be performed in parallel with the construction of the segmented cost to improve processing efficiency.

[0055] As one implementation method, based on the above embodiments, this embodiment further explains in detail the identification method of hovering anchor points and the decomposition process of corridor direction deviation.

[0056] First, based on the flight speed, duration, and number of sampling points of the trajectory points in the target inspection trajectory, a continuous low-speed trajectory point sequence that meets the preset hovering conditions is identified, and the continuous low-speed trajectory point sequence is extracted as hovering anchor points.

[0057] Secondly, for the continuous flight trajectory segment after the separation of the hovering anchor point, the vertical deviation vector of the trajectory point relative to the candidate fitting line segment is projected onto the local corridor coordinate system determined by the coordinates of the nodes at both ends of the span in the inspection corridor topology, and the deviation along the corridor direction and the deviation perpendicular to the corridor direction are decomposed.

[0058] The identification of hovering anchor points adopts a three-dimensional joint judgment mechanism of speed, time and number of sampling points to avoid false detection or missed detection caused by a single threshold.

[0059] First, the flight speed threshold is used to filter out trajectory points in a low-speed state. For example, in some implementations, the flight speed threshold can be set to 1.0 m / s. This value is slightly higher than the average drift speed of the UAV when performing fine operations near the tower, while being much lower than the normal cruise speed, which can effectively distinguish between operational hovering and transitional flight.

[0060] Secondly, the duration threshold is used to eliminate instantaneous low-speed interference caused by obstacle avoidance, attitude adjustment or signal jitter. For example, the minimum hovering duration can be set to 10s, which is consistent with the typical operation time required for a complete photograph of insulator strings or fittings in power line inspection.

[0061] Finally, a sampling point threshold is used to ensure the data integrity of hovering segments. For example, the minimum number of sampling points can be set to 5, corresponding to a 5-second observation window at a standard 1Hz sampling frequency, ensuring that the extracted hovering anchor points have sufficient statistical stability to characterize a valid operational position. Only when a continuous sequence of trajectory points simultaneously meets the above three conditions is it identified as a hovering anchor point and separated from the original trajectory; the remaining part is then used as a continuous flight trajectory segment in subsequent segmentation calculations.

[0062] For the continuous flight trajectory segment after the separation of the hovering anchor point, a local corridor coordinate system needs to be constructed to accurately quantify its spatial attitude relative to the transmission corridor. The construction of this coordinate system depends on the coordinates of the tower nodes at both ends of the span in the inspection corridor topology.

[0063] Specifically, for any span edge, based on its starting tower coordinate vector and the coordinate vector of the termination tower Calculate the unit vector along the corridor direction. ,in, It is the Euclidean norm; It can be understood as a dimensionless unit vector pointing from the starting tower to the ending tower.

[0064] The coordinates of the aforementioned branch corridors are obtained from the node identifiers at both ends of the span, and the node identifiers are not required to be continuous. Invalid spans with overlapping coordinates at both ends are not used for construction direction.

[0065] Furthermore, the unit vector perpendicular to the corridor direction is obtained through orthogonal transformation. In a two-dimensional planar projection scenario, if ,but .

[0066] Specifically, for non-zero length spans numbered sequentially according to the route, calculate the unit vector along the corridor direction. .like Then take the unit vector perpendicular to the corridor direction. .in, This is the sequential index of the starting tower for this span. and The components of the unit direction of this distance on the two coordinate axes of the plane are dimensionless; subscript This indicates that it is orthogonal to the direction along the corridor. This construction makes the inner product of the two unit vectors zero.

[0067] These two mutually orthogonal unit vectors jointly define the local reference frame for the current gear, allowing the spatial deviation of the trajectory points to be decoupled into two components with clear physical meaning. For a continuous flight trajectory arranged in ascending order of sampling time, the starting index of the candidate interval is... The endpoint index is ,and The candidate line unit direction and spatial fitting residual are obtained using the following formula.

[0068] .

[0069] .

[0070] in, This is the index of the sampling points in the candidate interval. ; , and They are the starting point, the ending point, and the number. The two-dimensional planar coordinate vector of a point is expressed in meters. The dimensionless unit direction of the candidate line; For the first The orthogonal fitting residual vector of each point relative to the candidate line, in meters; Indicates the inner product. The entire text uses the same character. This residual is represented by a symbol for perpendicular distance, and is no longer used to represent it. When candidate start and end points coincide, the above denominator is not calculated, and the interval is not considered a valid candidate line segment.

[0071] Based on this, for any trajectory point within a continuous flight trajectory segment First, calculate its relative to the candidate starting point. and candidate endpoints The vertical deviation vector of the candidate fitted line segments Subsequently, the vertical deviation vector is projected onto the two axes of the local corridor coordinate system to decompose the deviation along the corridor direction. Deviation from vertical corridor direction .

[0072] It should be noted that when calculating the deviation in the vertical corridor direction, the unit vector of the vertical corridor direction must be used. with vertical deviation vector Perform inner product operations, i.e. The deviation along the corridor direction is calculated using the unit vector along the corridor direction. Perform inner product operations, i.e. .in, This represents the absolute value. This rigorous orthogonal projection decomposition ensures the mathematical independence and physical accuracy of the two deviation components, avoiding deviation coupling errors caused by unclear coordinate system definitions.

[0073] The reason this embodiment precisely decomposes the trajectory deviation into two components: along the corridor direction and perpendicular to the corridor direction, is that in power transmission inspection operations, displacements in these two directions carry completely different risk levels and semantic information. Displacement of the UAV along the line direction typically corresponds to normal cruise progress or transitional flight between spans, which is within the expected movement pattern and should be given higher tolerance during trajectory segmentation. However, deviation in the perpendicular corridor direction often means that the UAV has left the safe inspection channel, potentially posing operational risks such as collision with power lines, deviation from the target, or entry into no-fly zones. Therefore, more sensitive penalties need to be applied during segmentation evaluation.

[0074] Through the above decomposition process, this application provides precise input variables for the subsequent construction of anisotropic segmentation costs, enabling the segmentation algorithm to understand the directional constraint characteristics of the power transmission corridor like a human expert, thereby dividing sub-trajectory segments that conform to both geometric continuity and business security logic.

[0075] As one implementation method, based on the trajectory deviation decomposition completed in the above embodiments, this embodiment further explains the construction method of segmented cost and the segmented decision logic.

[0076] Based on the deviation along the corridor direction and the deviation perpendicular to the corridor direction, a segmented cost is constructed. The target inspection trajectory after separating the hovering anchor point is divided into multiple sub-trajectory segments, including: using the corridor anisotropy coefficient to weight the deviation perpendicular to the corridor direction and adding it to the deviation along the corridor direction to obtain the corridor anisotropy deviation; wherein, the corridor anisotropy coefficient is greater than 1; based on the model complexity of the candidate fitted line segment, the corridor anisotropy deviation, and the local direction change error, the minimum description length cost of the continuous flight trajectory segment is constructed; the candidate endpoint is extended forward along the continuous flight trajectory segment. When the minimum description length cost without segmentation is greater than the minimum description length cost after segmentation at the current position, the previous trajectory point is determined as the segmentation feature point, and the search continues from the segmentation feature point to obtain the sub-trajectory segment.

[0077] The anisotropy coefficient of the corridor is a key parameter that reflects the spatial constraints of the narrow transmission corridor, and its value must be strictly greater than 1.

[0078] Optionally, the anisotropy coefficient of the corridor can be set to 2.0. The physical meaning of this value is that the segmented penalty cost caused by a unit length of deviation from the vertical corridor direction is twice the cost of displacement along the corridor direction of the same length.

[0079] The reason for this setting is as follows: In power line inspection, the longitudinal displacement of the drone along the line direction is usually a normal cruise or transition behavior with a high tolerance; while the lateral deviation in the direction perpendicular to the line often means that the drone has left the safe inspection channel and may face business risks such as colliding with the conductor, deviating from the shooting target or entering the no-fly zone.

[0080] By assigning higher weight to vertical deviation, the segmentation algorithm can understand the directional sensitivity of the transmission corridor like a human expert, thereby enabling a mathematically prioritized response to abnormal yaw behavior.

[0081] It should be understood that the specific value of this coefficient is not fixed and can be adaptively adjusted according to the curvature of the line, the voltage level, or the safety margin of the inspection task in practical applications.

[0082] For example, for long spans or high-voltage lines, the coefficient can be increased to improve the detection sensitivity of lateral deviation; while for mountain lines with frequent bends, in order to avoid misjudging normal turns as yaw and causing oversegmentation, the coefficient can be decreased but always kept greater than 1.

[0083] After obtaining the anisotropic deviation of the corridor, this embodiment uses the minimum description length criterion to evaluate whether a continuous flight trajectory is suitable to be represented by an approximate line segment. The minimum description length cost function specifically includes three parts: model complexity term, anisotropic deviation term, and local orientation change error term.

[0084] The model complexity term characterizes the amount of information required to describe the trajectory using a single line segment, and is typically positively correlated with the line segment length or the number of trajectory points to prevent over-segmentation. The anisotropy bias term accumulates and sums the corridor anisotropy biases of all intermediate trajectory points between the candidate start point and the candidate end point, adding 1 to each bias value before taking the base-2 logarithm to avoid the problem of an undefined logarithm when the bias is zero. The local orientation change error term penalizes drastic orientation changes within a trajectory segment, ensuring good consistency in orientation among the generated sub-trajectory segments. This approach, which comprehensively considers the cost of model simplicity and fitting accuracy, effectively balances the contradiction between undersegmentation and oversegmentation.

[0085] As an exemplary implementation, the description length cost of the candidate interval is calculated by summing the model complexity term and the fitting error term. The symbols in this implementation are defined as follows: , and Using the aforementioned sampling point index, the candidate interval starting point index is: The endpoint index is , This is the index of the sampling points in the candidate interval; The spatial distance between the candidate start and end points, in meters; The candidate interval time span, in seconds. index of the starting point of the candidate interval At the corresponding time, index for endpoint Corresponding time; spatial reference and time base It is a positive number used to eliminate dimensions, and its calculation relationship is as follows.

[0086] .

[0087] .

[0088] .

[0089] .

[0090] .

[0091] Among them, the deviation along the corridor direction is The deviation from the vertical corridor direction is , The weighted anisotropy deviation of the corridor is expressed in meters. Relative weights. Local orientation error. The value is calculated as the length of the local line segment formed by two adjacent points multiplied by the sine of the angle between that line segment and the candidate line, in meters; when the length of the local line segment is zero, the value is taken as... . and These are the non-negative dimensionless values ​​of the anisotropic deviation and local directional error of the two error corridors mentioned above. This is a model complexity term. For the fitting error term, To describe the cost of length, all descriptions of the cost of length are dimensionless; Represents the logarithm to the base 2. This indicates a point-by-point summation over the index range. The candidate endpoint lies on the fitted line and has no subsequent local segments; its error contribution is zero, therefore the summation terminates at... The constant 1 in the logarithm is still defined when zero error is guaranteed.

[0092] Index from the starting point of a continuous flight segment Start forward expansion of the endpoint index When the interval contains at least 3 points, compare and :former The latter is the cost of maintaining a candidate interval. In the first The cost of dividing a point into two candidate intervals. If the former is strictly greater than the latter, then the first... One point is used as the end point of the current sub-trajectory segment and the starting point of the next segment; otherwise, the process continues to expand. This is repeated until the end of the continuous flight segment, and adjacent short segments that do not meet the minimum number of points are merged; the comparison here is a greedy segmentation decision.

[0093] Based on the aforementioned minimum description length cost, this embodiment employs a forward expansion search strategy to determine the final segmented feature points. The specific execution process is as follows: starting from the beginning of the continuous flight trajectory segment, candidate endpoints are progressively expanded forward, and the minimum description length cost without segmentation within the current interval and the total cost after segmentation at the current position (i.e., the optimal cost of the previous segment plus the cost of the current new segment) are calculated in real time. When it is found that the cost without segmentation is greater than the cost after segmentation, it indicates that the total cost of continuing to extend the current segment has exceeded the total cost after segmentation at the current position. At this point, the previous trajectory point is determined as the termination point of the current sub-trajectory segment and simultaneously serves as the starting point of the next sub-trajectory segment. Forward search continues from this point until the entire continuous flight trajectory segment has been traversed. Through this greedy dynamic decision-making mechanism, locations where the trajectory geometry and corridor direction constraints change significantly can be adaptively identified, thereby dividing a set of sub-trajectory segments that conforms to both geometric continuity and business security logic, laying a solid foundation for subsequent high-precision clustering.

[0094] As one implementation method, based on the trajectory segmentation completed in the above embodiments, this embodiment further explains in detail the calculation method of anisotropic spatiotemporal distance in the clustering stage.

[0095] Based on the topological interval of the span to which the sub-track segment belongs in the inspection corridor topology, the topological attenuation factor is determined, and the anisotropic spatiotemporal distance is calculated based on the topological attenuation factor and the spatiotemporal characteristics of the sub-track segment. This includes: constructing a spatiotemporal feature vector by extracting the vertical distance, parallel distance, angular distance, and temporal distance between any two sub-track segments; determining the topological attenuation factor based on the shortest topological interval number of the span to which the two sub-track segments belong in the inspection corridor topology; wherein, the topological attenuation factor decreases as the number of shortest topological intervals increases; and using the topological attenuation factor and a preset feature weight matrix, a quadratic form is performed on the spatiotemporal feature vector to obtain the anisotropic spatiotemporal distance.

[0096] Use indexes uniformly for sub-trajectory segments and , and They represent the first Article and Section The strip trajectory segment, and the aforementioned sampling point index , Difference: Both segments are non-zero length line segments. Perpendicular distance. Distances from the four endpoints to the opposite line segment , , , Calculate: the first two distances and for The start and end points to The distance, the last two and for The start and end points to The distance; the projection of a point onto a line segment is limited to the two ends. All four , , and When the sum is greater than zero, Divide the sum of the squares of the four values ​​by the sum of the four values; otherwise, take zero.

[0097] parallel distance Take the minimum absolute value of the projection of the displacements of the two endpoints relative to the starting point of the other segment onto the unit direction of the other segment. Let the angle between the two segments in the directed unit direction be θ. The value ranges from 0 to radians; the shorter segment length is Angular distance exist Time to take Otherwise take The above. to Vertical distance parallel distance shorter segment length and angular distance The unit for all values ​​is meters.

[0098] Time Distance With spatiotemporal feature vectors The calculations are performed using the following formulas.

[0099] .

[0100] .

[0101] in, and These are the arithmetic mean of the start and end sampling times of the two segments, in seconds; For positive clustering timescales, this embodiment uses 60 seconds; The time distance is a non-negative dimensionless time. As a spatial reference; This is a four-dimensional dimensionless column vector composed of elements arranged in the order of perpendicularity, parallelism, angle, and time; superscript This indicates transpose. Each distance component is calculated for the current segment pair; for simplicity, its values ​​are omitted. The subscript has a different meaning than the corridor projection deviation in the segmented stage.

[0102] To comprehensively characterize the similarity of sub-track segments within the unique space of the transmission corridor, this embodiment first constructs a four-dimensional spatiotemporal feature vector. This vector consists of four components: vertical distance, parallel distance, angular distance, and temporal distance. The vertical and parallel distances correspond to the spatial offsets of the sub-track segments perpendicular to and along the transmission line in the local corridor coordinate system, respectively. This decomposition continues the direction-aware logic of the segmentation stage described earlier. The angular distance measures the attitude differences between two sub-track segments in their extension directions, typically expressed as the absolute value of the heading angle difference or cosine similarity. The temporal distance is the absolute time difference between the sampling times of the midpoints of the two sub-track segments, used to capture the distribution pattern of inspection operations in the time dimension. These four components together constitute the original feature space describing the relative states of the sub-track segments.

[0103] Building upon this, this embodiment introduces a topology attenuation factor to embed the network structure information of the inspection corridor topology into the distance metric. The formula for calculating the topology attenuation factor is as follows.

[0104] .

[0105] In the formula, Represents sub-trajectory segment and Topological attenuation factor between; The basic attenuation coefficient has a strictly limited range of values. between; This represents the shortest topological interval number in the inspection corridor topology map for the distance between two sub-trajectory segments. The physical meaning of this formula is that as the topological connection between sub-trajectory segments becomes less distant, their correlation decreases exponentially.

[0106] For example, when two sub-track segments are within the same range, ,at this time This indicates that the two have the highest topological correlation; when the two are located in adjacent spans, The correlation decayed to If the correlation spans multiple tiers, the correlation will decrease even more rapidly.

[0107] In another implementation, the topology attenuation factor is calculated using the following three-stage truncation method.

[0108] .

[0109] in, This indicates taking the smaller value, with the constant 2 being the cutoff interval, meaning the factors for the same gear length, adjacent gear lengths, and other gear lengths are respectively set to 1, 2, and 3. and The chain corridor experiment divides the relationships into three levels based on the difference in the sequential numbering of the two associated starting towers, serving as an approximate realization of the topological interval; the experimental data described later correspond to this three-level truncation form. The complete exponential form and the truncation form are used separately and not mixed in the same calculation. Different topologically connected components are used as corridor inputs, and the reciprocal distances or connectivity relationships between components are not calculated.

[0110] The complete exponential form is in Time to take ,exist Time to take As the interval continues to increase, it decays exponentially; the truncation form is... Keep Both forms result in a higher topological penalty coefficient for different gear lengths compared to the same gear length.

[0111] Optionally, the base attenuation coefficient The possible value is 0.3.

[0112] It should be understood that The specific value can be adjusted according to the actual line scenario: for complex scenarios with multiple parallel lines or lines that frequently cross and bend, the value can be appropriately reduced. Values ​​(such as 0.1 or 0.2) are used to enhance the ability to distinguish between cross-span or cross-line trajectories and prevent false clustering caused by spatial projection overlap; while for single-circuit lines with simple structures and long spans, the value can be appropriately increased. A value (e.g., 0.5) is used to maintain a reasonable sense of continuity between adjacent gear intervals.

[0113] After obtaining the topological decay factor, this embodiment fuses it with the spatiotemporal feature vector by constructing a feature weight matrix. Feature weight matrix It is defined as follows.

[0114] .

[0115] In the formula, It is the reciprocal of the topological attenuation factor, and is used as a global scaling factor for the entire matrix; This indicates that a diagonal matrix is ​​constructed using the elements within the brackets as the main diagonal elements. , , , These are the feature weights for vertical distance, horizontal distance, angular distance, and temporal distance, respectively. Because... its reciprocal This means that the larger the topological interval of a sub-trajectory pair, the larger the overall magnitude of its feature weight matrix, thus generating a larger distance value in subsequent distance calculations. In this way, the discrete graph topological interval is transformed into a continuous distance penalty intensity, realizing the soft embedding of topological constraints.

[0116] For example, the above For sub-trajectory segments Construct a 4×4 dimensionless diagonal matrix.

[0117] Finally, sub-trajectory segment and Anisotropic spacetime distance between It is calculated using the following quadratic form formula.

[0118] .

[0119] In the formula, For the spatiotemporal feature vectors constructed above, It is the transpose of the spatiotemporal eigenvectors.

[0120] Unlike the scalar weighted summation distance commonly used in related technologies, the quadratic distance form employed in this embodiment, by applying differentiated weights to each feature component and using a quadratic form, can form an anisotropic ellipsoidal equidistant surface in a multidimensional feature space. The shape of this ellipsoid is determined by the feature weights, while its size is dynamically controlled by the topological decay factor.

[0121] Specifically, within the same span, equidistant neighborhoods are represented as flat ellipsoids adapted to the narrow structure of the corridor, allowing for significant positional variations along the line direction while maintaining small distance values. As the topological interval increases, this ellipsoid shrinks uniformly in all dimensions, enabling sub-trajectory segments with similar spatial coordinates but disconnected topological connections to be assigned sufficiently large distance values, thus effectively separating them during density peak clustering. This distance metric mechanism fundamentally solves the common cross-span mis-clustering problem in transmission corridor scenarios, ensuring that the clustering results satisfy both geometric proximity and topological connectivity.

[0122] Understandably, with a fixed topological interval, positive weights, and a given distance threshold, the equidistant surface of the quadratic distance in the feature space is an ellipsoid. The corresponding semi-axis is proportional to the square root of the topological decay factor; when the topological interval increases, causing the decay factor to decrease, the feature neighborhood shrinks, and the distance penalty corresponding to the same spatiotemporal feature differences increases. The truncated form maintains the same penalty intensity after reaching the truncated interval. This property describes the neighborhood in the feature space and cannot be directly equated to the global ellipsoid in actual geographic space.

[0123] As one implementation method, based on the calculation of the anisotropic spatiotemporal distance of the corridor in the above embodiments, this embodiment further explains the specific execution process of density peak clustering, especially the cluster center selection scenario for optimizing the narrow spatial characteristics of the power transmission corridor.

[0124] Density peak clustering is performed on multiple sub-trajectory segments based on anisotropic spatiotemporal distance to obtain multiple trajectory clusters. This includes: constructing corridor anisotropic spatiotemporal density for each sub-trajectory segment based on anisotropic spatiotemporal distance and density kernel bandwidth; marking the sub-trajectory segment as a sparse sub-trajectory segment and outputting it separately when the average nearest neighbor distance of the sub-trajectory segment is higher than the distance threshold and the average nearest neighbor density is lower than the density threshold; for non-sparse sub-trajectory segments, basic decision values ​​are calculated based on the corridor anisotropic spatiotemporal density and relative distance after quantile truncation normalization; where the relative distance is the minimum anisotropic spatiotemporal distance to higher density samples; calculating corridor equilibrium decision values ​​based on the basic decision values ​​and the minimum anisotropic spatiotemporal distance from the non-sparse sub-trajectory segment to the selected cluster center; iteratively selecting cluster centers according to the corridor equilibrium decision values ​​from largest to smallest, and assigning the non-sparse sub-trajectory segments to the nearest cluster center to obtain trajectory clusters.

[0125] Specifically, constructing the anisotropic spatiotemporal density of the corridor is the foundation of clustering. This embodiment uses a Gaussian kernel function to calculate the local density of each sub-trajectory segment, with its core parameter being the density kernel bandwidth. .

[0126] Understandably, based on anisotropic spatiotemporal distance and density kernel bandwidth, the corridor anisotropic spatiotemporal density of each sub-trajectory segment is constructed. When the average nearest neighbor distance of a sub-trajectory segment is higher than the distance threshold and the average nearest neighbor density is lower than the density threshold, the sub-trajectory segment is marked as a sparse sub-trajectory segment and output separately. For non-sparse sub-trajectory segments, the basic decision value is calculated based on the corridor anisotropic spatiotemporal density and relative distance after quantile truncation normalization. Among them, when there are higher density samples, the relative distance is taken as the minimum anisotropic spatiotemporal distance of the sample set; when there are no higher density samples, the high quantile value of the distance of other samples is taken. Based on the basic decision value and the minimum anisotropic spatiotemporal distance from the non-sparse sub-trajectory segment to the selected cluster center, the corridor equilibrium decision value is calculated. After each center is selected, the center set is updated and the corridor equilibrium decision value of the remaining candidates is recalculated. The candidate with the largest current value is selected as the next cluster center, and the non-sparse sub-trajectory segment is assigned to the nearest cluster center to obtain the trajectory cluster.

[0127] For example, the local density is calculated for each sample in the set of sub-trajectory segments as follows.

[0128] .

[0129] in, The total number of sub-trajectory segments participating in clustering in the current corridor is a positive integer; For the sample index to be calculated, To sum the sample indices, all are taken from 1 to... And exclude ; For the first The original local density of the strip trajectory segment is a non-negative dimensionless number; Density marker; The anisotropic spacetime distance obtained using the above quadratic form; The density kernel bandwidth is positive, and the same dimensionless numerical scale is used as this distance; This represents a natural exponential function; the ratio of distance to bandwidth in the exponent is no longer squared.

[0130] When there is only one sample, the empty summation is zero. Large-scale computation only accumulates the contribution of samples retrieved by the spatial nearest neighbor index, which is the nearest neighbor approximation for the complete summation. Unretrieved samples are not added as zero-distance samples.

[0131] Density kernel bandwidth Take the 2% quantile value of non-zero, finite distances from the distance sample used; if no such distance exists, use a preset positive bandwidth. Here, 2% refers to the selected quantile position, and... The difference lies in the numerical value of the distance itself. Density contribution varies with... Increases and decreases.

[0132] For each sub-trajectory segment, Select the nearest neighbors, and denote the number of nearest neighbors as . , where is a positive integer, and in this embodiment, it is taken as 15; excluding the sample itself, if there are fewer than 15 available nearest neighbors, all available nearest neighbors are used. The average distance of the nearest neighbors is the distance from the sample to these nearest neighbors. The arithmetic mean, the nearest neighbor mean density is the sum of the arithmetic mean of the nearest neighbors. Arithmetic mean. The distance threshold is the 80th quantile of the average distance of all effective nearest neighbors, and the density threshold is the 20th quantile of the average density of all effective nearest neighbors. When the average distance is strictly higher than the former threshold and the average density is strictly lower than the latter threshold, it is marked as a sparse segment and output separately; it does not participate in the regular center selection and allocation. When there are no available nearest neighbors, these two means are not calculated, and the sample is output separately. The sparsity label indicates statistical sparsity and is not directly equivalent to abnormal deviations confirmed by business verification.

[0133] To avoid the poor adaptability problem caused by manually setting a fixed bandwidth, this application adopts an adaptive strategy to determine... The bandwidth is calculated by taking the 2% quantile of the non-zero anisotropic spatiotemporal distance between all sub-trajectory segments as the bandwidth. The physical basis for this selection is that the 2% quantile can robustly characterize the distance scale of typical neighboring samples in the dataset. It avoids density fragmentation due to a few anomalous close-range point pairs, and also avoids a smooth density transition due to long-tailed distant point pairs. Within this bandwidth, sub-trajectory segments with the same span, consistent direction, and similar time contribute significantly to each other's density, while the contributions of samples with large spans or significant spatiotemporal differences decay rapidly, thus forming a spatiotemporal density field adapted to the transmission corridor structure.

[0134] After calculating the density, this embodiment first performs a sparsity anomaly removal step. For each sub-trajectory segment, its average nearest neighbor distance and average nearest neighbor density are calculated. When the average nearest neighbor distance of a sub-trajectory segment is higher than a preset distance threshold (e.g., the 95th percentile of the average nearest neighbor distance for all segments), and its average nearest neighbor density is lower than a preset density threshold (e.g., the 5th percentile of the average nearest neighbor density for all segments), the sub-trajectory segment is determined to meet both the conditions of being far from the group and being sparsely surrounded, and is marked as a sparse sub-trajectory segment. These types of samples usually correspond to abnormal UAV yaw, GPS drift noise, or extremely rare temporary operational behaviors, and are not statistically representative. Outputting them separately instead of participating in clustering can effectively prevent noise points from interfering with the selection of subsequent cluster centers, ensuring the purity of the extracted typical inspection patterns.

[0135] For the remaining non-sparse sub-trajectory segments, their potential as cluster centers needs to be calculated. First, the basic decision values ​​are calculated. The calculation formula is as follows.

[0136] .

[0137] In the formula, Indicates the first The corridor anisotropic spatiotemporal density after quantization and normalization of individual trajectory segments This represents the relative distance after quantile truncation and normalization. The original value of the relative distance is defined as the minimum corridor anisotropic spatiotemporal distance from the sub-trajectory segment to all samples with higher density; if no samples with higher density exist, the maximum value of its distance to other samples or the higher quantile value is taken. The square root operation is specifically introduced here to process the density term, aiming to reduce the excessive dominance of density extrema on center selection.

[0138] Original relative distance When the density is strictly higher than When taking samples, the minimum of these samples is obtained. When no higher-density samples are available, the 95th percentile of the finite positive distance to other samples is used; otherwise, zero is used. In the nearest neighbor approximation implementation, when no higher-density samples are available within the search range, the same 95th percentile rule is applied based on the already retrieved finite positive distance. Non-negative, and anisotropic spacetime distance Use the same scale.

[0139] Treating the normalized raw quantity The following formula is used for processing.

[0140] .

[0141] in, Substitute them separately and ; and These are the 5% and 95% quantiles of all finite values ​​of the original quantity in the current corridor sample, respectively. The two types of quantities are counted separately and do not share quantiles. This represents the corresponding normalization result; and Truncate the results sequentially to 0 and 1; there are no finite values ​​or When this occurs, the normalization result of this type of quantity is zero, and division is not performed.

[0142] In actual inspection data, certain key towers or take-off and landing points may generate extremely high local density due to frequent operations. If the original density product is used directly, these points will almost inevitably become cluster centers, causing other equally important but slightly less dense inspection segments to be ignored. By using square root compression, while preserving density significance, reasonable competition opportunities can be given to the next highest density areas, making the clustering results more reflective of the overall inspection pattern distribution.

[0143] To further address the problem that traditional density peak clustering tends to lead to local clustering of cluster centers in narrow spaces, this embodiment innovatively proposes a corridor equilibrium decision value. Its construction formula is as follows.

[0144] .

[0145] In the formula, Based on the decision value, For the selected set of cluster centers, Candidate sub-trajectory segments With cluster center set Selected Center Anisotropic spacetime distance between the corridors This represents the 95th percentile of non-zero distances in the distance matrix, used to normalize the separation distance. When a set of cluster centers has been selected... When the set is empty, the corridor equilibrium decision value Degenerates to equal the basic decision value That is, the first cluster center is directly selected from the sub-trajectory segment with the largest basic decision value. Indicates taking The smaller of 1.

[0146] The corridor equilibrium decision value The essence of the formula is based on the fundamental decision value. A spatial separation constraint factor is superimposed on top of this. When a candidate point is very close to all the selected centers, this factor approaches 0, significantly reducing its overall decision value. This makes it difficult for the candidate point to be selected again; only when the candidate point not only has high density-distance significance ( Only when the area is large and far from the existing center (large separation distance) can a high level be obtained. This mechanism forces cluster centers to maintain a reasonable geographical dispersion in the corridor topology, avoiding the phenomenon that all centers are concentrated in a single high-density hub area.

[0147] like Figure 2 As shown in the diagram, the distribution of corridor equilibrium decision values ​​visually demonstrates the effectiveness of the aforementioned selection mechanism. The horizontal axis represents normalized density, and the vertical axis represents normalized relative distance (logarithmic coordinates). Ordinary sub-trajectory segments are mainly distributed in the lower left region, sparse sub-trajectory segments are located at the top edge, and the five selected cluster centers (marked with orange circles with white crosses) are all located in the high-density, high-relative-distance region in the upper right corner, maintaining sufficient spatial spacing between them. This indicates that the corridor equilibrium decision values ​​successfully balance pattern representativeness and spatial coverage.

[0148] During the iterative selection process, the system selects cluster centers sequentially according to the corridor equilibrium decision value from largest to smallest, until a preset number is reached or the decision value is below a threshold. After determining the centers, each non-sparse sub-trajectory segment is assigned to the cluster center with the closest anisotropic spatiotemporal distance to its corridor, ultimately resulting in multiple trajectory clusters with clear structures and uniform spatial distribution. It should be understood that the quantile parameters (such as 2% and 95%) in the above formula are only preferred examples and can be adjusted within a certain range according to the data scale and route complexity in practical applications. As long as the core logic of adaptive selection and separation constraints remains unchanged, it falls within the protection scope of this application.

[0149] As one implementation method, based on the trajectory clustering obtained by the above embodiments to obtain multiple trajectory clusters, this embodiment further explains in detail how to extract representative trajectories with business continuity from the trajectory clusters.

[0150] Determining representative trajectories from trajectory clusters includes: selecting high-density candidate sub-trajectory segments that meet preset relative density conditions from trajectory clusters; determining whether any adjacent high-density candidate sub-trajectory segments simultaneously satisfy the following conditions: time interval less than a preset time threshold, spatial interval less than a preset spatial threshold, and gap topological interval less than a preset topological threshold; if all conditions are met, constructing directed connections to form candidate trajectory chains, and determining the optimal trajectory chain from the candidate trajectory chains as the main body of the representative trajectory.

[0151] In order to extract the skeleton that best represents the inspection pattern from a cluster containing a large number of sub-trajectory segments, it is first necessary to screen high-density candidate sub-trajectory segments.

[0152] This embodiment employs a relative density-based screening strategy, which calculates the ratio of the corridor anisotropic spatiotemporal density of each sub-trajectory segment within a cluster to the maximum density value in that cluster. When this ratio exceeds a preset relative density threshold, the corresponding sub-trajectory segment is identified as a high-density candidate sub-trajectory segment. The advantage of this relative density screening mechanism is its ability to adapt to the density scale differences between different clusters.

[0153] In actual inspection data, the overall cluster density in some busy sections may be very high, while the overall cluster density in remote sections may be low. If a uniform absolute density threshold is used, it is very easy to miss effective patterns in low-density clusters or mix too much noise into high-density clusters.

[0154] Normalization ensures that each cluster retains its most representative core segments. In a preferred embodiment, the preset relative density threshold can be set to 0.9, which means that only sub-trajectory segments with a density of more than 90% of the cluster peak are retained as candidates to ensure the purity and significance of representative trajectories.

[0155] After obtaining a set of high-density candidate sub-trajectory segments, these discrete segments need to be connected into a continuous trajectory chain. This embodiment innovatively proposes a three-dimensional joint continuity determination criterion of time, space, and topology. For any two high-density candidate sub-trajectory segments that are adjacent in time order... and Its continuity determination function It is defined as follows:

[0156] .

[0157] In the formula, Represents sub-trajectory segment Termination time and sub-trajectory segment The absolute time difference between the start times; Indicates the maximum allowed time interval; Represents sub-trajectory segment End point and sub-trajectory segment The Euclidean spatial distance between the starting points; Indicates the maximum allowed spatial spacing; This represents the shortest topological interval in the inspection corridor topology map of the two sub-trajectory segments; Indicates the maximum permissible topology spacing. The symbol " " " indicates a logical AND operation, meaning that all three conditions must be met simultaneously for the result to be 1 (continuous), otherwise it will be 0 (discontinuous).

[0158] This three-dimensional joint constraint method is designed to solve the problem of trajectory splicing under the special spatial structure of power transmission corridors.

[0159] In some specific implementations... A 30-minute timeframe is recommended, which corresponds to a typical working window within a single drone battery life or the maximum reasonable interval between two consecutive shooting missions. A span of 100 meters is acceptable, which is slightly longer than the standard span length, allowing for some spatial jumps near the tower. A value of 1 means that connections are only allowed between the same gear or adjacent gears.

[0160] It is particularly important to emphasize the introduction of span topological interval constraints. This is crucial for ensuring the rationality of representative trajectory services. In transmission line scenarios, there are often parallel lines, multiple circuits on the same tower, or lines with large-angle bends. In these areas, the trajectory points of different line sections may be very close in two-dimensional or three-dimensional spatial coordinates (meeting the requirements). Even the sampling times are similar (meeting the requirements). However, these are physically isolated lines or conductors on different sides. If only spatiotemporal proximity is relied upon for connection, the algorithm is prone to incorrectly splicing a trajectory belonging to line A onto line B, generating a crossing trajectory that does not exist in the physical world. By forcibly requiring the topological interval to not exceed a threshold, such erroneous splicing across lines and sections is fundamentally eliminated, ensuring that the generated representative trajectory strictly extends along the actual transmission corridor topology.

[0161] When adjacent candidate sub-trajectory segments satisfy the aforementioned joint continuity condition, the system establishes directed connections between them, thereby forming one or more directed graph structures across the entire candidate set. Subsequently, a graph search algorithm is used to determine the optimal trajectory chain from these directed graphs. The search strategy can be based on the longest path principle, i.e., selecting the chain containing the most sub-trajectory segments to maximize the spatial coverage of the representative trajectory; or it can be based on the maximum cumulative density principle, i.e., selecting the chain with the largest sum of densities of all constituent segments to ensure that the representative trajectory consists of the most typical inspection segments. The finally determined optimal trajectory chain serves as the representative trajectory body of this trajectory cluster. It not only maintains a stable geometric shape but also conforms to the actual business logic of power transmission inspection in the three dimensions of time, space, and topology, laying a reliable foundation for subsequent association of hovering anchor points and time period information.

[0162] As one implementation method, based on the above embodiment which determines the optimal trajectory chain as the representative trajectory subject, this embodiment further explains in detail how to complete the conversion from pure geometric trajectory to business semantic object.

[0163] The process of selecting high-density candidate sub-trajectory segments from trajectory clusters that meet a preset relative density condition includes: calculating the ratio of the density of a sub-trajectory segment in a trajectory cluster to the maximum density value in the trajectory cluster; when the ratio is greater than a preset relative density threshold, the corresponding sub-trajectory segment is identified as a high-density candidate sub-trajectory segment. Specifically, the core advantage of using relative density rather than absolute density for selection is that it can adapt to the density scale differences between different trajectory clusters.

[0164] In actual power transmission inspection scenarios, some clusters located near key substations or in key sections may have extremely high overall density, while clusters in remote mountainous areas may have relatively low overall density. If a uniform absolute density threshold is used, it is very easy to miss effective inspection patterns in low-density clusters, or to mix too many atypical transitional trajectories into high-density clusters.

[0165] By calculating the ratio of the density of each sub-trajectory segment to the maximum density of its respective cluster, the density baseline of all clusters can be normalized to the [0,1] interval. In a preferred embodiment, the preset relative density threshold can be set to 0.9, which means that only those sub-trajectory segments whose density reaches more than 90% of the peak value of the cluster are retained as candidate units for constructing representative trajectories. This value ensures that the representative trajectory consists of the most core and stable inspection segments, while eliminating sparse noise or occasional yaw segments at the cluster edges, thus ensuring the purity and significance of the final generated results.

[0166] Associating hovering anchor points with representative trajectories includes: extracting target hovering anchor points within the range of towers associated with the towers from the separated hovering anchor points, based on the tower range covered by the optimal trajectory chain; determining typical inspection periods based on the sampling time of each sub-trajectory segment in the optimal trajectory chain; and combining cluster identifiers, continuous tower sequences, typical inspection periods, and target hovering anchor points to generate representative trajectories containing business semantics. This step represents a crucial leap from the data processing level to the business application level.

[0167] In the segmentation phase of the aforementioned embodiment, to avoid hovering points interfering with flight trajectory fitting, the system actively separates hovering anchor points from the original trajectory. In this embodiment, however, these anchor points carrying refined operational information are retrieved and precisely reattached to the representative trajectory. The reassociation logic is strictly based on tower topology matching; that is, a hovering anchor point is only identified as a target hovering anchor point if the tower identifier associated with it falls within a continuous tower sequence covered by the optimal trajectory chain. This topology-based matching mechanism is more reliable than matching based solely on spatial distance or temporal proximity, effectively avoiding hovering point mismatches caused by GPS drift or interference from parallel lines.

[0168] Meanwhile, the extraction of typical inspection periods endows representative trajectories with clear temporal semantics. The system traverses all sub-trajectory segments constituting the optimal trajectory chain, extracts the start and end times of their sampling, and determines the high-frequency occurrence periods of this type of inspection pattern through statistical interval analysis. For example, if the sub-trajectory segments corresponding to a representative trajectory are mainly sampled between 10:00 AM and 12:00 PM, then this period will be marked as the typical inspection period of this pattern. The final generated representative trajectory is no longer a cold sequence of coordinate points, but a structured business object containing four core elements: a cluster identifier to uniquely distinguish different inspection patterns; a continuous tower sequence to clarify the spatial path and coverage of the inspection operation; typical inspection periods to reveal the temporal regularity of the operation; and target hovering anchor points to indicate the specific, refined operation location. These four elements together constitute a complete semantic loop of "when-where-what kind of operation".

[0169] like Figure 3 As shown, the visualization results of the representative trajectories of the corridor semantics intuitively demonstrate the actual effect of the above structured output. Figure 3 It contains five independent sub-charts, each corresponding to one of five different trajectory clusters (cluster 0 to cluster 4). Each sub-chart has a horizontal colored line segment representing the optimal trajectory chain drawn along the corridor mileage as the horizontal axis, and several square markers are marked on the line segment. These markers are the target hovering anchor points after reassociation.

[0170] by Figure 3Taking cluster 0 at the top as an example, its title displays "11:00—13:00 | 10,822 segments | 5 hovering anchor points," indicating that this cluster contains 10,822 sub-track segments. The typical inspection period corresponding to its representative track is from 11:00 to 13:00, covering 6 towers from T1 to T6, and associated with 5 target hovering anchor points. Among them, the blue line segment represents the tower coverage area of ​​the representative track, the blue dot at T1 represents the coverage starting point, and the 5 square markers at T2 to T6 represent the corresponding target hovering anchor points. The remaining subplots, from top to bottom, correspond to clusters 1 to 4: Cluster 1's typical inspection period is from 14:00 to 16:00, covering 12 towers from T17 to T28, and associated with 12 target hovering anchor points; Cluster 2's typical inspection period is from 09:00 to 11:00, covering 3 towers from T28 to T30, and associated with 3 target hovering anchor points; Cluster 3's typical inspection period is from 10:00 to 12:00, covering 3 towers from T6 to T8, and associated with 3 target hovering anchor points; Cluster 4's typical inspection period is from 12:00 to 14:00, covering 10 towers from T8 to T17, and associated with 10 target hovering anchor points. These subplots collectively demonstrate the differences in tower coverage, typical inspection periods, and hovering operation locations for representative trajectories corresponding to different cluster types.

[0171] It should be understood that, although Figure 3 Five specific patterns were demonstrated, but in practical applications, this method can automatically discover and output any number of representative trajectories, each with the same complete business semantic structure. This semantic output format can be directly integrated with the power operation and maintenance management system, supporting advanced business functions such as automatic generation of standard routes, compliance review of historical tasks, and tracing of abnormal deviations, significantly improving the practical value and interpretability of the clustering results.

[0172] Specifically, Figure 3 The experiment output shows five clusters. The horizontal axis represents the mileage along the corridor, the line segments represent the range of towers covered by the trajectory, and the square markers represent the target hovering anchor points for the corresponding flight. This figure is a semantic coverage illustration and does not represent all the geometric details of the original flight track.

[0173] In some specific examples, during the synthetic data experiment, 30 towers, 29 spans, and 270 inspection tracks were constructed, with span lengths ranging from 300 to 500 meters. After segmentation, 74,983 sub-track segments were obtained. The experiment employed a three-level truncation topology penalty and a base attenuation coefficient. Corridor segmentation coefficient Clustering time scale Seconds, bandwidth quantile position 2%, nearest neighbors and the number of target clusters The representative trajectory uses the original flight recovery method, which supports the highest number of flights. The time connectivity threshold is 600 seconds (10 minutes), the spatial threshold is 1000 meters, and the threshold for the difference in the sequence numbers of the towers associated with the end point of the first segment and the start point of the second segment is 2. The last threshold constrains the difference in the tower numbers at the endpoints, as mentioned above. and Constraint segments are associated with intervals; since the objects are different, their values ​​are not treated as equivalent or interchangeable. The silhouette coefficient of the complete method is 0.3801, the Davies-Bouldin index is 4.8354, and the sparse segment ratio is 4.1%. When removing the topological penalty, the corresponding indices are 0.2848, 21.8881, and 5.3%; when further applying equal weights, they are 0.2963, 33.0127, and 4.3%; and when using scalar weighted sums, they are 0.3607, 0.514, and 16.4%. These results are a comparison under the same synthetic data conditions, reflecting the impact of different distance processing methods on the clustering structure and the sparse label ratio, and do not directly regard the sparse ratio as the anomaly identification accuracy.

[0174] by Figure 3 Taking cluster 0 as an example, "10,822 segments" in the figure title indicates that this cluster contains 10,822 sub-track segments, not that the chain contains 10,822 sub-segments; "5 hovering anchor points" indicates the number of anchor points associated with the representative flight. This representative trajectory covers T1 to T6, with a corresponding time window of 11:00 to 13:00, and a coverage range of approximately 0 to 1.75 kilometers. Other sub-graphs use the same caliber to display the number of cluster samples, the coverage range of the representative trajectory, the time window, and the number of hovering anchor points, respectively. The actual number of clusters output is determined by the stopping condition selected by the center, while the representative trajectory is determined by the recovery results of valid candidate chains or representative flights. When a valid subject is available, the corresponding representative trajectory is output, and the anchor point set can be empty. This structured result can be used for inspection route reuse, historical task review, and yaw analysis. Specific business decisions are made in conjunction with the original trajectory and task records.

[0175] To achieve the above functions, the corridor topology-guided inspection trajectory clustering device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art will readily recognize that, based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0176] like Figure 4As shown, this embodiment provides a corridor topology-guided inspection trajectory clustering device. This device is a concrete implementation of the aforementioned method embodiment at the software product level. The device mainly includes an anisotropic trajectory segmentation module 41, an anisotropic spatiotemporal clustering module 42, and a representative trajectory generation module 43.

[0177] An anisotropic trajectory segmentation module 41 is used to acquire the target inspection trajectory and the inspection corridor topology collected along the transmission corridor. The inspection corridor topology includes tower nodes and span edges connecting adjacent tower nodes. Based on the inspection corridor topology, hovering anchor points are separated from the target inspection trajectory, and a segmentation cost is constructed based on the deviation along the corridor direction and the deviation perpendicular to the corridor direction. Based on the segmentation cost, the target inspection trajectory after separating the hovering anchor points is divided into multiple sub-trajectory segments. Among them, the vertical corridor direction deviation has a greater weight than the deviation along the corridor direction in the segmentation cost. At the data flow level, this module receives the original inspection trajectory data and corridor topology data, and after hovering separation and anisotropic segmentation processing, outputs a standardized set of sub-trajectory segments downstream. These sub-trajectory segments not only contain spatial coordinates and temporal information, but also implicitly contain corridor direction constraint features, providing a high-quality basic input for subsequent clustering.

[0178] The anisotropic spatiotemporal clustering module 42 is used to determine the topological attenuation factor based on the topological interval of the sub-trajectory segment's range in the inspection corridor topology, and to calculate the anisotropic spatiotemporal distance based on the topological attenuation factor and the spatiotemporal characteristics of the sub-trajectory segment. Based on the anisotropic spatiotemporal distance, it performs density peak clustering on multiple sub-trajectory segments to obtain multiple trajectory clusters. This module receives the sub-trajectory segments output from the anisotropic trajectory segmentation module and performs the core pattern discovery task. Internally, it integrates algorithmic logic for topological attenuation factor calculation, quadratic distance matrix construction, sparse anomaly removal, and equilibrium decision center selection. In terms of data interaction, this module not only outputs normal trajectory cluster labels downstream but also separately marks and outputs identified sparse anomaly trajectories, enabling the system to simultaneously complete the dual tasks of typical pattern extraction and abnormal behavior monitoring.

[0179] The representative trajectory generation module 43 is used to determine representative trajectories from trajectory clusters and associate hovering anchor points with these representative trajectories. As the output backend of the device, this module is responsible for transforming abstract clustering results into concrete business semantic objects. It receives cluster labels and anomaly labels from the clustering module and, combined with the original sub-trajectory segment information and previously separated hovering anchor point data, performs operations such as high-density candidate filtering, three-dimensional joint continuity determination, and semantic association. Ultimately, this module outputs a structured representative trajectory containing cluster identifiers, continuous tower sequences, typical inspection periods, and target hovering anchor points. This output format directly interfaces with the power operation and maintenance business system, supporting advanced applications such as route reuse and compliance review.

[0180] Regarding the apparatus in the above embodiments, the specific manner in which each unit module performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0181] Figure 5 This is a schematic diagram of an electronic device provided in this application. (For example...) Figure 5 The electronic device 50 may include at least one first processor 501 and a memory 503 for storing processor-executable instructions. The first processor 501 is configured to execute instructions in the memory 503 to implement the inspection trajectory clustering method in the following embodiments.

[0182] In addition, electronic device 50 may also include communication bus 502, at least one communication interface 504, input device 506 and output device 505.

[0183] The first processor 501 may be a processor (central processing unit, CPU), a microprocessor unit, an ASIC, or one or more integrated circuits for controlling the execution of programs according to the present application.

[0184] The communication bus 502 may include a path for transmitting information between the aforementioned components.

[0185] Communication interface 504 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0186] Input device 506 is used to receive input signals and output device 505 is used to output signals.

[0187] Memory 503 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory may exist independently and be connected to the processing unit via a bus. Memory may also be integrated with the processing unit.

[0188] The memory 503 stores instructions for executing the scheme of this application, and the execution is controlled by the first processor 501. The first processor 501 executes the instructions stored in the memory 503 to realize the functions of the method of this application.

[0189] In a specific implementation, as one example, the first processor 501 may include one or more CPUs, for example... Figure 5 CPU0 and CPU1 in the CPU.

[0190] In a specific implementation, as one example, electronic device 50 may include multiple processors, such as... Figure 5 The first processor 501 and the second processor 507 are described. Each of these processors can be a single-core processor or a multi-core processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0191] The electronic device is as follows Figure 5 The diagram includes a first processor 501 and a memory 503 for storing executable instructions of the first processor 501. The first processor 501 is configured to execute the executable instructions to implement the inspection trajectory clustering method as described in any of the possible embodiments above. Furthermore, it achieves the same technical effect, and to avoid repetition, will not be elaborated further here.

[0192] This application also provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of a corridor topology-guided inspection trajectory clustering device or electronic device, the corridor topology-guided inspection trajectory clustering device or electronic device is able to perform the inspection trajectory clustering method as described in any of the above possible implementations. And it can achieve the same technical effect; to avoid repetition, it will not be described again here.

[0193] This application also provides a computer program product, including a computer program or instructions, which are executed by a processor using the inspection trajectory clustering method as described in any of the possible implementations above. This achieves the same technical effect, and to avoid repetition, will not be repeated here.

[0194] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0195] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent for the embodiments of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application is not limited by the above-described embodiments.

[0196] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.

[0197] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A clustering method for inspection trajectories, characterized in that, The method includes: Acquire the target inspection trajectory collected along the power transmission corridor and the inspection corridor topology of the power transmission corridor; the inspection corridor topology includes tower nodes and span edges connecting adjacent tower nodes; Based on the inspection corridor topology, hovering anchor points are separated from the target inspection trajectory, and segmented costs are constructed based on the deviation along the corridor direction and the deviation perpendicular to the corridor direction; wherein, the weight of the deviation perpendicular to the corridor direction in the segmented cost is greater than the weight of the deviation along the corridor direction. Based on the segmentation cost, the target inspection trajectory after separating the hovering anchor point is divided into multiple sub-trajectory segments; The topology attenuation factor is determined based on the topology interval of the inspection corridor topology to which the sub-trajectory segment belongs; Based on the topological decay factor and the spatiotemporal characteristics of the sub-trajectory segments, anisotropic spatiotemporal distance is calculated, and density peak clustering is performed on the multiple sub-trajectory segments based on the anisotropic spatiotemporal distance to obtain multiple trajectory clusters; A representative trajectory is determined from the trajectory cluster, and the hovering anchor point is associated with the representative trajectory.

2. The method according to claim 1, characterized in that, Based on the inspection corridor topology, the hovering anchor point is separated from the target inspection trajectory, including: Based on the flight speed, duration and number of sampling points of the trajectory points in the target inspection trajectory, a continuous low-speed trajectory point sequence that meets the preset hovering conditions is identified, and the continuous low-speed trajectory point sequence is extracted as the hovering anchor point; For the continuous flight trajectory segment after separating the hovering anchor point, the vertical deviation vector of the trajectory point relative to the candidate fitting line segment is projected onto the local corridor coordinate system determined by the coordinates of the nodes at both ends of the span in the inspection corridor topology, and the deviation along the corridor direction and the deviation perpendicular to the corridor direction are decomposed to obtain the deviation.

3. The method according to claim 2, characterized in that, Based on the deviation along the corridor direction and the deviation perpendicular to the corridor direction, a segmented cost is constructed, including: The vertical corridor direction deviation is weighted using the corridor anisotropy coefficient and added to the corridor direction deviation to obtain the corridor anisotropy deviation; wherein, the corridor anisotropy coefficient is greater than 1; Based on the model complexity of the candidate fitted line segments, the anisotropic deviation of the corridor, and the local direction change error, the minimum description length cost of the continuous flight trajectory segment is constructed. Based on the segmentation cost, the target inspection trajectory after separating the hovering anchor point is divided into multiple sub-trajectory segments, including: The candidate endpoint is extended forward along the continuous flight trajectory segment. When the minimum description length cost without segmentation is greater than the minimum description length cost after segmentation at the current position, the previous trajectory point is determined as the segmentation feature point, and the search continues from the segmentation feature point to obtain the sub-trajectory segment.

4. The method according to claim 1, characterized in that, Based on the topological interval of the span to which the sub-trajectory segment belongs in the inspection corridor topology, a topological attenuation factor is determined, including: constructing a spatiotemporal feature vector by extracting the vertical distance, parallel distance, angular distance, and temporal distance between any two sub-trajectory segments; determining the topological attenuation factor based on the shortest topological interval number of the span to which two sub-trajectory segments belong in the inspection corridor topology; wherein, the topological attenuation factor decreases as the number of the shortest topological interval increases; Based on the topological attenuation factor and the spatiotemporal characteristics of the sub-trajectory segment, the anisotropic spatiotemporal distance is calculated, including: Using the topological attenuation factor and the preset feature weight matrix, a quadratic form calculation is performed on the spatiotemporal feature vector to obtain the anisotropic spatiotemporal distance.

5. The method according to claim 4, characterized in that, Based on the anisotropic spatiotemporal distance, density peak clustering is performed on the multiple sub-trajectory segments to obtain multiple trajectory clusters, including: Based on the anisotropic spatiotemporal distance and density kernel bandwidth, the corridor anisotropic spatiotemporal density of each sub-trajectory segment is constructed. When the average nearest neighbor distance of a sub-trajectory segment is higher than the distance threshold and the average nearest neighbor density is lower than the density threshold, the sub-trajectory segment is marked as a sparse sub-trajectory segment and output separately. For non-sparse sub-trajectory segments, the basic decision value is calculated based on the corridor anisotropic spatiotemporal density and relative distance after quantization truncation normalization; wherein, the relative distance is the minimum anisotropic spatiotemporal distance to higher density samples; Based on the basic decision value and the minimum anisotropic spatiotemporal distance from the non-sparse sub-trajectory segment to the selected cluster center, the corridor equilibrium decision value is calculated. Cluster centers are iteratively selected from largest to smallest according to the corridor equilibrium decision value, and the non-sparse sub-trajectory segments are assigned to the nearest cluster center to obtain the trajectory cluster.

6. The method according to claim 1, characterized in that, Determining representative trajectories from the trajectory clusters includes: Select high-density candidate sub-trajectory segments that meet the preset relative density conditions from trajectory clusters; Determine whether any adjacent high-density candidate sub-trajectory segments simultaneously satisfy the following conditions: time interval less than a preset time threshold, spatial interval less than a preset spatial threshold, and gap topological interval less than a preset topological threshold. If both conditions are met, a directed connection relationship is constructed to form a candidate trajectory chain, and the optimal trajectory chain is determined from the candidate trajectory chains as the main body of the representative trajectory.

7. The method according to claim 6, characterized in that, High-density candidate sub-trajectory segments that meet preset relative density conditions are selected from trajectory clusters, including: Calculate the ratio of the density of the sub-trajectory segment in the trajectory cluster to the maximum density value in the trajectory cluster. When the ratio is greater than a preset relative density threshold, the corresponding sub-trajectory segment is determined as the high-density candidate sub-trajectory segment. Associating the hovering anchor point with the representative trajectory includes: Based on the range of towers covered by the optimal trajectory chain, target hovering anchors with associated towers located within the range of the towers are extracted from the separated hovering anchors; The typical inspection period is determined based on the sampling time of each sub-trajectory segment in the optimal trajectory chain; The cluster identifier, the continuous tower sequence, the typical inspection period, and the target hovering anchor point are combined to generate the representative trajectory containing business semantics.

8. A clustering device for inspection trajectories, characterized in that, The device includes: An anisotropic trajectory segmentation module is used to acquire the target inspection trajectory collected along the power transmission corridor and the inspection corridor topology of the power transmission corridor; the inspection corridor topology includes tower nodes and span edges connecting adjacent tower nodes; based on the inspection corridor topology, hovering anchor points are separated from the target inspection trajectory, and a segmentation cost is constructed based on the deviation along the corridor direction and the deviation perpendicular to the corridor direction; based on the segmentation cost, the target inspection trajectory after separating the hovering anchor points is divided into multiple sub-trajectory segments; wherein, the weight of the deviation perpendicular to the corridor direction in the segmentation cost is greater than the weight of the deviation along the corridor direction; An anisotropic spatiotemporal clustering module is used to determine the topological attenuation factor based on the topological interval of the range to which the sub-trajectory segment belongs in the inspection corridor topology, calculate the anisotropic spatiotemporal distance based on the topological attenuation factor and the spatiotemporal characteristics of the sub-trajectory segment, and perform density peak clustering on the multiple sub-trajectory segments based on the anisotropic spatiotemporal distance to obtain multiple trajectory clusters. A representative trajectory generation module is used to determine a representative trajectory from the trajectory cluster and associate the hovering anchor point with the representative trajectory.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the inspection trajectory clustering method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is enabled to perform the inspection trajectory clustering method as described in any one of claims 1 to 7.