A layered index query method and system for unmanned aerial vehicle inspection data
By optimizing UAV inspection data query through hierarchical indexing and inter-layer boundary mapping, the query layer is dynamically determined and the candidate boundary is corrected, which solves the problems of low efficiency and poor accuracy in the existing technology and achieves efficient and accurate data filtering.
Patent Information
- Application Number
- CN202611421505.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-27
AI Technical Summary
Existing drone inspection data query methods are inefficient and inaccurate in multi-condition query scenarios. Especially when it involves flight routes, waypoints, towers, time and spatial location, the fixed index order leads to an increase in invalid index entries and makes it difficult to eliminate erroneous data associations.
By employing hierarchical indexing and inter-layer boundary mapping, combined with dynamic layer selection of candidate boundaries, hit feedback, and pole space correction, the index access volume and data filtering process are optimized by dynamically determining the query layer and correcting the candidate boundaries.
It improves the query efficiency and filtering accuracy of drone inspection data, reduces the transmission of invalid data, and enhances the ability to correct anomalies associated with poles and towers.
Smart Images

Figure CN123178686A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of UAV inspection data processing technology, and in particular to a hierarchical index query method and system for UAV inspection data. Background Technology
[0002] In the field of UAV inspection data processing technology, images, videos, point clouds, flight path records, waypoint information, and defect records are continuously generated during the inspection process. Existing platforms typically establish indexes according to tasks, flight paths, time, spatial location, tower numbers, or business tags to support the classified storage and conditional retrieval of inspection data.
[0003] In multi-condition query scenarios, existing technologies typically employ a fixed index order for layer-by-layer filtering, or execute various indexes separately and then perform result intersection processing. When the query involves dimensions such as flight routes, waypoints, towers, time, and spatial location, the data range corresponding to different indexes varies significantly. A fixed query path tends to retain many invalid index entries, increasing the amount of subsequent index accesses and impacting the efficiency of complex queries.
[0004] When drones continuously capture images along their flight path, adjacent inspection data typically exhibit temporal and spatial correlations. However, due to positioning deviations, changes in shooting attitude, and data association errors, anomalies in the correlation between adjacent inspection data and towers may occur. Existing query methods primarily rely on matching based on recorded fields, making it difficult to promptly eliminate erroneous data associations. This can easily lead to invalid data entering subsequent searches, impacting the efficiency of filtering target inspection data and the accuracy of queries.
[0005] Therefore, how to provide a hierarchical index query method and system for UAV inspection data is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a hierarchical index query method and system for UAV inspection data. This invention achieves rapid screening of inspection data by constructing a hierarchical index and inter-layer boundary mapping, combined with dynamic layer selection of candidate boundaries, hit feedback and pole space correction. It has the advantages of high query efficiency, accurate screening and strong correlation correction capabilities.
[0007] A hierarchical index query method for UAV inspection data according to an embodiment of the present invention includes the following steps:
[0008] Collect drone inspection data, associate the shooting data with the tower according to the waypoint sequence, record the shooting position and shooting attitude, and form a unified inspection data object;
[0009] Establish a hierarchical index for unified inspection data objects, record the spatial range of towers, cluster the index positions of continuous waypoints and consistent tower associations in the next index layer into index segments, record the start and end positions of the index segments corresponding to the index items of the previous index layer, and form an inter-layer boundary mapping.
[0010] The current candidate boundary is formed according to the query permissions, and the query conditions are mapped to the index positions to form the remaining query condition set.
[0011] Map the current candidate boundary along the inter-layer boundary to the range of candidate indexes, count the number of overlapping index entries corresponding to the index positions of the remaining query condition set, and select the index layer with the fewest overlapping entries as the current query layer.
[0012] Execute the query conditions corresponding to the current query layer, divide the consecutive hit index positions into hit segments, update the current candidate boundary with the hit segments, and remove the processed query conditions from the remaining query condition set;
[0013] Identify discontinuous objects associated with towers within the current candidate boundary according to waypoint order, form an observation ray based on shooting position and shooting attitude, find the intersection of the observation ray and the spatial range of the towers, and correct the current candidate boundary with the index segment corresponding to the intersecting towers.
[0014] The updated candidate boundaries are projected along the inter-layer boundary mapping to the range of candidate indexes, the number of overlapping index items is counted, the subsequent query layer is determined, the corresponding query conditions are executed, the current candidate boundaries are updated, and the target dataset is formed.
[0015] Optionally, the formation of the unified inspection data object includes the following steps:
[0016] Arrange the shooting data according to the order of waypoints in the inspection route, and determine the shooting point and flight altitude from the spatial information of each shooting data to form the shooting position;
[0017] Establish the correspondence between shooting data and poles based on the waypoint number and pole number corresponding to each shooting data, and form the shooting posture based on the gimbal angle and shooting direction of the corresponding shooting data;
[0018] The shooting data with established tower correspondences are collected sequentially along the flight path, and the corresponding shooting positions and shooting attitudes are encapsulated along with the shooting data to form a unified inspection data object.
[0019] Optionally, the formation of the hierarchical index and inter-layer boundary mapping includes the following steps:
[0020] Organize the corresponding index items according to the field values of the unified inspection data objects to form a hierarchical index, determine the index position of each unified inspection data object in each index layer, and record the spatial range of the tower.
[0021] The waypoint order of the unified inspection data object corresponding to adjacent index positions is compared sequentially along each index layer. Adjacent index positions with discontinuous waypoints are separated. Then, the tower associations of adjacent index positions that are not separated are compared, and adjacent index positions with inconsistent tower associations are separated.
[0022] After separation, continuous index positions of waypoints and towers with consistent correlation are grouped into index segments, and the start and end positions of each index segment are recorded.
[0023] Based on the index position of the same unified inspection data object in adjacent index layers, a mapping between index items and the start and end positions of corresponding index segments is established between adjacent index layers, forming an inter-layer boundary mapping.
[0024] Optionally, the formation of the current candidate boundary and the remaining query condition set includes the following steps:
[0025] Based on query permissions, filter accessible index positions in the permission index, and form the current candidate boundary by the start and end positions of consecutive accessible index positions;
[0026] Extract the fields and their values from the query conditions, and determine the corresponding index layer for each query condition based on the correspondence between the fields and the index layer.
[0027] Based on the field values, locate the index position in the corresponding index layer and map each query condition to the corresponding index position;
[0028] The query conditions that have completed the index position mapping are combined into a set of remaining query conditions, and the index layer and index position corresponding to each query condition are recorded.
[0029] Optionally, determining the current query layer includes the following steps:
[0030] Collect the remaining query conditions according to the corresponding index layer, and obtain the index position corresponding to each query condition;
[0031] Based on the current candidate boundary, locate the corresponding index item in the permission index, extract the corresponding data object identifier, locate the corresponding index position in the first layer of the hierarchical index, and project it layer by layer along the inter-layer boundary to the index layer corresponding to each query condition. Based on the start and end positions of the corresponding index segment of the projection, form the range of candidate indexes.
[0032] Based on the data object identifier, filter out the index positions corresponding to all query conditions in the same index layer, count the number of positions falling into the range of candidate indexes, and form the number of overlapping index items in the corresponding index layer.
[0033] Compare the number of overlapping index entries in each index layer and determine the index layer with the fewest overlapping entries as the current query layer.
[0034] Optionally, the formation of the hit segment and the updating of the current candidate boundary include the following steps:
[0035] Execute the remaining query conditions corresponding to the current query layer, and retain the index positions that simultaneously satisfy all query conditions based on the data object identifier;
[0036] Compare adjacent positions according to the order of the reserved index positions, divide consecutive index positions into hit segments, and record the start and end positions of each hit segment;
[0037] Compare each hit segment with the candidate index range of the current query layer, and truncate the overlapping segments to update the current candidate boundaries by determining the start and end positions of the segments.
[0038] Remove executed query conditions from the remaining query condition set, and retain the index layers and index positions corresponding to the unexecuted query conditions.
[0039] Optionally, the identification of discontinuous objects associated with the tower and the formation of the observation ray include the following steps:
[0040] Based on the start and end positions of the current candidate boundaries, obtain the corresponding unified inspection data objects in the current query layer and arrange them in waypoint order;
[0041] The tower numbers of the unified inspection data objects are compared in order of the flight points. Unified inspection data objects with the same tower number on both sides of the unified inspection data objects but different tower numbers themselves are identified as tower-related discontinuous objects.
[0042] Obtain the shooting position and shooting posture of discontinuous objects associated with the tower, and determine the direction of the observation ray based on the shooting posture;
[0043] Starting from the shooting position, the observation ray extends along the direction of the observation ray to form an observation ray.
[0044] Optionally, the correction of the current candidate boundary includes the following steps:
[0045] The spatial range of the corresponding tower is obtained by using the tower number of the unified inspection data object on both sides of the tower-related discontinuous object;
[0046] Calculate the intersection of the observed ray and the corresponding tower spatial range, and identify the towers with non-empty intersections as intersecting towers;
[0047] Based on the tower numbers of the intersecting towers, the corresponding unified inspection data objects are selected. The corresponding index position is located in the current query layer by the data object identifier, and the corresponding index segment and start and end positions are determined.
[0048] The current candidate boundary is corrected by adjusting the start and end positions of the indexed segments corresponding to the intersecting towers, thus forming the corrected current candidate boundary.
[0049] Optionally, the determination of the subsequent query layer and the formation of the target dataset include the following steps:
[0050] The updated current candidate boundary is projected layer by layer along the inter-layer boundary mapping to the index layer corresponding to the remaining query conditions, and the range of candidate indexes is formed according to the start and end positions of the corresponding index segments.
[0051] Count the number of overlapping index entries corresponding to the remaining query conditions within the candidate index range of each index layer, and determine the index layer with the fewest overlapping entries as the subsequent query layer;
[0052] Execute the corresponding query conditions of the subsequent query layer, update the current candidate boundary to the hit segment, and remove the executed query conditions from the remaining query condition set;
[0053] When the remaining query condition set is not empty, the candidate index range is re-formed based on the updated current candidate boundary, the subsequent query layer is determined, the corresponding query conditions are executed, the current candidate boundary and the remaining query condition set are updated, until the remaining query condition set is empty.
[0054] Based on the start and end positions of the current candidate boundary, obtain the data object identifier associated with the corresponding index item, collect the corresponding unified inspection data objects, and form the target dataset.
[0055] A hierarchical index query system for UAV inspection data according to an embodiment of the present invention includes the following modules:
[0056] The object construction module is used to collect UAV inspection data, associate shooting data with towers according to waypoint order, record shooting position and shooting attitude, and form a unified inspection data object.
[0057] The index building module is used to establish a hierarchical index for unified inspection data objects, record the spatial range of towers, cluster the index positions of continuous navigation points and consistent tower associations in the next index layer into index segments, record the start and end positions of the index segments corresponding to the index items of the previous index layer, and form an inter-layer boundary mapping.
[0058] The query initialization module is used to form the current candidate boundary according to query permissions, map query conditions to index positions, and form the remaining query condition set.
[0059] The query routing module is used to map and project the current candidate boundary along the inter-layer boundary to the range of candidate indexes, count the number of overlapping index items corresponding to the index positions of the remaining query condition set, and select the index layer with the fewest items as the current query layer.
[0060] The hit feedback module is used to execute the query conditions corresponding to the current query layer, divide the consecutive hit index positions into hit segments, update the current candidate boundary with the hit segments, and remove the processed query conditions from the remaining query condition set.
[0061] The spatial correction module is used to identify discontinuous objects associated with towers within the current candidate boundary according to waypoint order, form an observation ray based on the shooting position and shooting attitude, calculate the intersection of the observation ray and the spatial range of the towers, and correct the current candidate boundary based on the index segment corresponding to the intersecting towers.
[0062] The query execution module is used to map the updated current candidate boundary along the inter-layer boundary to the range of candidate indexes after successive projections, count the number of overlapping index items, determine the subsequent query layer, execute the corresponding query conditions, update the current candidate boundary, and form the target dataset.
[0063] The beneficial effects of this invention are:
[0064] (1) This invention establishes hierarchical indexes, index segments and inter-layer boundary mapping, projects the current candidate boundary to the range of candidate indexes, dynamically determines the current query layer based on the number of overlapping index items, avoids the use of fixed index order causing a large number of invalid index items to participate in subsequent retrieval, reduces index access volume and improves the efficiency of multi-condition combination queries.
[0065] (2) After executing the query conditions corresponding to the current query layer, the present invention divides the continuous hit index positions into hit segments, continuously updates the current candidate boundary with the hit segments, and then determines the subsequent query layer based on the updated candidate range, so as to realize that the query range gradually shrinks with the search results, reduce the repeated transmission of invalid data between different index layers, and improve the efficiency of inspection data screening.
[0066] (3) This invention addresses the discontinuous pole-tower associations that occur during continuous waypoint inspections. It forms an observation ray based on the shooting position and shooting posture, determines the intersecting poles by the intersection of the observation ray and the pole space range, and then corrects the current candidate boundary using the index segment corresponding to the intersecting pole, thereby reducing the impact of pole association anomalies on subsequent queries and improving the accuracy of target inspection data queries. Attached Figure Description
[0067] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0068] Figure 1 This is an overall flowchart of a hierarchical index query method for UAV inspection data proposed in this invention;
[0069] Figure 2 This is a diagram showing the overall architecture of the hierarchical index query system in this invention;
[0070] Figure 3 This is a schematic diagram showing the relationship between the UAV inspection route, waypoints, and towers in this invention;
[0071] Figure 4 This is a schematic diagram illustrating the identification of discontinuous objects associated with towers and the correction of current candidate boundaries in this invention.
[0072] Figure 5 This is a module structure diagram of a hierarchical index query system for UAV inspection data in this invention. Detailed Implementation
[0073] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0074] refer to Figures 1-5 A hierarchical index query method for UAV inspection data includes the following steps:
[0075] Collect drone inspection data, associate the shooting data with the tower according to the waypoint sequence, record the shooting position and shooting attitude, and form a unified inspection data object;
[0076] Establish a hierarchical index for unified inspection data objects, record the spatial range of towers, cluster the index positions of continuous waypoints and consistent tower associations in the next index layer into index segments, record the start and end positions of the index segments corresponding to the index items of the previous index layer, and form an inter-layer boundary mapping.
[0077] The current candidate boundary is formed according to the query permissions, and the query conditions are mapped to the index positions to form the remaining query condition set.
[0078] Map the current candidate boundary along the inter-layer boundary to the range of candidate indexes, count the number of overlapping index entries corresponding to the index positions of the remaining query condition set, and select the index layer with the fewest overlapping entries as the current query layer.
[0079] Execute the query conditions corresponding to the current query layer, divide the consecutive hit index positions into hit segments, update the current candidate boundary with the hit segments, and remove the processed query conditions from the remaining query condition set;
[0080] Identify discontinuous objects associated with towers within the current candidate boundary according to waypoint order, form an observation ray based on shooting position and shooting attitude, find the intersection of the observation ray and the spatial range of the towers, and correct the current candidate boundary with the index segment corresponding to the intersecting towers.
[0081] The updated candidate boundaries are projected along the inter-layer boundary mapping to the range of candidate indexes, the number of overlapping index items is counted, the subsequent query layer is determined, the corresponding query conditions are executed, the current candidate boundaries are updated, and the target dataset is formed.
[0082] In this embodiment, the formation of the unified inspection data object includes the following steps:
[0083] Arrange the shooting data according to the order of waypoints in the inspection route, and determine the shooting point and flight altitude from the spatial information of each shooting data to form the shooting position;
[0084] The inspection route is located by route number. The order of waypoints in the route file is determined, and the captured data is assigned to the corresponding waypoint by waypoint number. If there are more than two sets of captured data for the same waypoint, they are arranged according to the capture time. The longitude, latitude, and flight altitude of the captured data are extracted. The horizontal position is determined by longitude and latitude, and the vertical position is determined by flight altitude, thus forming the capture position.
[0085] Establish the correspondence between shooting data and poles based on the waypoint number and pole number corresponding to each shooting data, and form the shooting posture based on the gimbal angle and shooting direction of the corresponding shooting data;
[0086] Locate waypoint records according to the waypoint numbers corresponding to the shooting data, extract pole numbers from the spatial information of the shooting data, and associate the pole numbers with the corresponding pole records. Extract the gimbal angle and shooting direction of the same shooting data, using the shooting direction to represent the camera orientation and the gimbal angle to represent the shooting angle state, and combine them to form the shooting posture.
[0087] The shooting data with established tower correspondences are collected sequentially along the flight path, and the corresponding shooting positions and shooting attitudes are encapsulated along with the shooting data to form a unified inspection data object.
[0088] Configure a data object identifier for each piece of shooting data, and associate the shooting data, route number, waypoint number, tower number, shooting position, and shooting attitude with the data object identifier; when there are more than two pieces of shooting data for the same waypoint, configure data object identifiers for each, and retain the corresponding tower association, shooting position, and shooting attitude for each, forming a unified inspection data object.
[0089] In this embodiment, the formation of the hierarchical index and inter-layer boundary mapping includes the following steps:
[0090] Organize the corresponding index items according to the field values of the unified inspection data objects to form a hierarchical index, determine the index position of each unified inspection data object in each index layer, and record the spatial range of the tower.
[0091] An index hierarchy is established based on the fields of the unified inspection data object. The basic metadata index is set at the first level; the task index, route index, time index, spatial index, and tower index are set at the second level; the business tag index and defect index are set at the third level; the full-text index and image vector index are set at the fourth level; the statistical pre-aggregation index is set at the fifth level; and the permission index is set at the query front end. The index items of the same unified inspection data object in each index level are associated with the data object identifier, and the arrangement position of the index item in the corresponding index level is recorded as the index position. The corresponding 3D point cloud data is collected according to the tower number. The point cloud coordinates are transformed to the spatial coordinate system used for the shooting position, and the extreme values of the point cloud coordinates in each coordinate axis direction are calculated. The 3D bounding boundary of the point cloud is determined based on the extreme values of the coordinates in each axis, and the 3D bounding boundary is associated with the tower number to form the tower spatial range.
[0092] The waypoint order of the unified inspection data object corresponding to adjacent index positions is compared sequentially along each index layer. Adjacent index positions with discontinuous waypoints are separated. Then, the tower associations of adjacent index positions that are not separated are compared, and adjacent index positions with inconsistent tower associations are separated.
[0093] Locate the unified inspection data objects corresponding to adjacent index positions according to the order of index positions, and compare the corresponding route numbers. If the route numbers are different, separate them. If the route numbers are the same, compare the arrangement of waypoint numbers in the inspection route. If they correspond to the same waypoint, keep them continuous. If they correspond to different waypoints and the two waypoints are directly adjacent in the inspection route, keep them continuous. If they correspond to different waypoints and the two waypoints are not directly adjacent in the inspection route, separate them. For adjacent index positions that are kept continuous, compare the tower numbers. If the tower numbers are different, separate them.
[0094] After separation, continuous index positions of waypoints and towers with consistent correlation are grouped into index segments, and the start and end positions of each index segment are recorded.
[0095] Divide the continuous index positions according to the separation results, and group the unseparated continuous index positions into the same index segment. Determine the start and end positions based on the index positions at both ends of each index segment, and associate and save the start and end positions with the corresponding index segments.
[0096] Based on the index position of the same unified inspection data object in adjacent index layers, a mapping between index items and the start and end positions of corresponding index segments is established between adjacent index layers, forming an inter-layer boundary mapping.
[0097] For an index entry in an adjacent index layer, the associated data object identifiers are aggregated. The corresponding index position for the same data object identifier is located in another index layer. Based on each index position, the index segment to which it belongs is determined, along with the start and end positions of each index segment. After removing duplicate start and end positions, a correspondence is established between the index entry and the retained start and end positions. When the unified inspection data objects associated with the same index entry are distributed across two or more index segments, the start and end positions of each index segment are retained, forming an inter-layer boundary mapping.
[0098] In this embodiment, the formation of the current candidate boundary and the remaining query condition set includes the following steps:
[0099] Based on query permissions, filter accessible index positions in the permission index, and form the current candidate boundary by the start and end positions of consecutive accessible index positions;
[0100] Based on the user's organization, role, task permissions, data security level, and interface permissions, the system filters allowed index positions in the permission index. The system compares each index position sequentially, maintaining continuity between adjacent positions if they are directly adjacent in the order, and processing positions with gaps separately. The system then determines the start and end positions of each group of consecutive index positions, forming the current candidate boundaries.
[0101] Extract the fields and their values from the query conditions, and determine the corresponding index layer for each query condition based on the correspondence between the fields and the index layer.
[0102] Parse the query request and extract the fields and values of each query condition. Task number and flight number correspond to the task index; route number and waypoint number correspond to the route index; shooting time corresponds to the time index; latitude and longitude and shooting location correspond to the spatial index; pole number corresponds to the pole index; equipment component field corresponds to the business tag index; defect field corresponds to the defect index; and text field corresponds to the full-text index. Determine the index layer corresponding to each query condition according to the level of each index.
[0103] Based on the field values, locate the index position in the corresponding index layer and map each query condition to the corresponding index position;
[0104] When a field has a single value, the system retrieves index entries with the same value from the corresponding index and locates the corresponding index position. When the query condition is a time range, the system filters out index entries whose shooting time falls within the query time range and locates the corresponding index position. When the query condition is a spatial range, the system filters out index entries whose spatial location falls within the query spatial range and locates the corresponding index position. When the query condition is a text field, the system locates the index entry and its corresponding index position in the full-text index based on the keyword. The corresponding index positions are saved separately for each query condition.
[0105] The query conditions that have completed the index position mapping are combined into a set of remaining query conditions, and the index layer and index position corresponding to each query condition are recorded.
[0106] Save the corresponding index layer and index position according to each query condition. Save the start and end positions for continuous index positions and save them separately for discrete index positions. Keep the query conditions that have not yet been executed for index queries in the same set to form the remaining query condition set.
[0107] In this embodiment, determining the current query layer includes the following steps:
[0108] Collect the remaining query conditions according to the corresponding index layer, and obtain the index position corresponding to each query condition;
[0109] Extract the corresponding index layer and index position for each query condition from the remaining query condition set, and group the query conditions according to the index layer. When the same index layer corresponds to more than two query conditions, retain the correspondence between each query condition and the index position separately, and save the index positions for different query conditions separately.
[0110] Based on the current candidate boundary, locate the corresponding index item in the permission index, extract the corresponding data object identifier, locate the corresponding index position in the first layer of the hierarchical index, and project it layer by layer along the inter-layer boundary to the index layer corresponding to each query condition. Based on the start and end positions of the corresponding index segment of the projection, form the range of candidate indexes.
[0111] Based on the current candidate boundary, locate the corresponding permission index item, extract the data object identifier associated with the permission index item, locate the index position corresponding to the same data object identifier in the first layer of the hierarchical index, and retain the start and end positions according to the continuity of the index positions. For index items covered by each start and end position range, determine the start and end positions of the corresponding index segments in adjacent index layers based on the inter-layer boundary mapping; overlapping segments are formed into a continuous range using the minimum start position and the maximum end position, adjacent segments are retained as a continuous range, and separate segments retain their respective start and end positions. If the index layer corresponding to the query condition has not yet been reached, continue to execute the mapping of adjacent layers until a candidate index range for the corresponding index layer is formed.
[0112] Based on the data object identifier, filter out the index positions corresponding to all query conditions in the same index layer, count the number of positions falling into the range of candidate indexes, and form the number of overlapping index items in the corresponding index layer.
[0113] For each query condition within the same index layer, extract the data object identifier associated with the index item based on the corresponding index position. Compare each data object identifier, retaining only those that exist in all index items corresponding to all query conditions. Then locate the index position corresponding to the retained identifier and delete duplicate index positions. Determine whether each retained index position falls within the range of candidate indexes; if it falls within any range, count it once to form the number of overlapping index items for the corresponding index layer.
[0114] Compare the number of overlapping index entries in each index layer and determine the index layer with the fewest overlapping entries as the current query layer.
[0115] The index layers are compared based on the number of overlapping index entries. If the minimum number is unique, the corresponding index layer is selected. If the minimum number is the same, the index layer with the highest sorting order is selected according to the hierarchical order determined when the hierarchical index was created, and the current query layer is determined.
[0116] In this embodiment, the formation of the hit segment and the updating of the current candidate boundary include the following steps:
[0117] Execute the remaining query conditions corresponding to the current query layer, and retain the index positions that simultaneously satisfy all query conditions based on the data object identifier;
[0118] The remaining query conditions are filtered to select the corresponding query conditions for the current query layer. The retrieval is performed according to the field values and index positions stored in each query condition. For each query condition that matches an index item, the associated data object identifier is extracted. The data object identifiers corresponding to different query conditions are compared item by item, and only those that appear in all query conditions are retained. Based on the retained data object identifiers, the index position in the current query layer is located, and duplicate index positions are removed.
[0119] Compare adjacent positions according to the order of the reserved index positions, divide consecutive index positions into hit segments, and record the start and end positions of each hit segment;
[0120] The index positions are organized and preserved according to the current query layer's order. Starting from the first position, adjacent positions are compared one by one. When adjacent positions are directly connected, they are included in the same hit segment. When there is a gap between positions, the current hit segment ends, and a new hit segment is formed from the index positions after the gap. The start and end positions of each hit segment are determined by the index positions at both ends. A single independent index position serves as both the start and end position of the corresponding hit segment.
[0121] Compare each hit segment with the candidate index range of the current query layer, and truncate the overlapping segments to update the current candidate boundaries by determining the start and end positions of the segments.
[0122] The start and end positions of each hit segment are compared with the start and end positions of each candidate index range in the current query layer. If the end position of the hit segment is before the start position of a candidate index range, no truncation segment is formed; if the start position of the hit segment is after the end position of a candidate index range, no truncation segment is formed. If they overlap, the index position that is later among the two start positions and the index position that is earlier among the two end positions are taken to form the start and end positions of the truncation segment. If a hit segment overlaps with two or more separate candidate index ranges, the start and end positions of each truncation segment are retained. These retained start and end positions form the updated current candidate boundary, and the index layer corresponding to the updated current candidate boundary is recorded as the current query layer.
[0123] Remove executed query conditions from the remaining query condition set, and retain the index layers and index positions corresponding to the unexecuted query conditions.
[0124] Remove the executed query conditions corresponding to the current query level from the set of remaining query conditions. For unexecuted query conditions, continue to save the field values, corresponding index levels, and index positions, maintaining the association between each query condition and its corresponding index level and index position, forming an updated set of remaining query conditions.
[0125] In this embodiment, the identification of discontinuous objects associated with the tower and the formation of the observation ray include the following steps:
[0126] Based on the start and end positions of the current candidate boundaries, obtain the corresponding unified inspection data objects in the current query layer and arrange them in waypoint order;
[0127] Process the candidate boundary at each start and end position separately. Locate the index item between the corresponding start and end positions in the current query layer, extract the associated data object identifier, and locate the unified inspection data object through the data object identifier. The unified inspection data objects corresponding to each start and end position are arranged in waypoint order, and waypoint adjacency relationships are established without crossing mutually separate start and end positions.
[0128] The tower numbers of the unified inspection data objects are compared in order of the flight points. Unified inspection data objects with the same tower number on both sides of the unified inspection data objects but different tower numbers themselves are identified as tower-related discontinuous objects.
[0129] The system sequentially selects the current unified inspection data object and the adjacent unified inspection data objects on both sides along the flight path, and compares the tower numbers of the three. If the tower numbers of the adjacent unified inspection data objects are the same but the tower numbers of the current unified inspection data object are different, the current unified inspection data object is identified as a tower-related discontinuous object, and the corresponding data object identifier and index position are saved.
[0130] Obtain the shooting position and shooting posture of discontinuous objects associated with the tower, and determine the direction of the observation ray based on the shooting posture;
[0131] Extract the shooting direction and gimbal angle from the shooting posture of the discontinuous objects associated with the tower. In the spatial coordinate system used for the shooting position, determine the horizontal direction based on the shooting direction and the vertical direction component based on the gimbal angle. Normalize the direction components of each axis to form the direction vector of the observation ray.
[0132] Starting from the shooting position, the observation ray extends along the direction of the observation ray to form an observation ray.
[0133] The spatial coordinates of the shooting location are used as the starting point of the observation ray. The ray extends in the positive direction along the direction vector from the starting point, and the ray in the opposite direction does not participate in the intersection of the tower's spatial range.
[0134] In this embodiment, the correction of the current candidate boundary includes the following steps:
[0135] The spatial range of the corresponding tower is obtained by using the tower number of the unified inspection data object on both sides of the tower-related discontinuous object;
[0136] Determine the tower number that is consistent with the inspection data of the adjacent two discontinuous objects associated with the tower. Locate the spatial range of the tower based on the tower number, and extract the extreme values of each axial coordinate of the three-dimensional bounding boundary corresponding to the spatial range of the tower.
[0137] Calculate the intersection of the observed ray and the corresponding tower spatial range, and identify the towers with non-empty intersections as intersecting towers;
[0138] When the starting point of the observation ray is within the 3D bounding boundary, the corresponding tower is identified as an intersecting tower. When the starting point of the observation ray is outside the 3D bounding boundary, the intersection points of the observation ray with each boundary surface of the 3D bounding boundary are calculated, and intersection points located in the positive direction of the ray and whose other two coordinate axes are located between the extreme values of the corresponding axial coordinates are retained; if there are retained intersection points, the corresponding tower is identified as an intersecting tower. If there are no retained intersection points, the start and end positions of the current candidate boundary, which includes the index position of the discontinuous object associated with the current tower, are not changed.
[0139] Based on the tower numbers of the intersecting towers, the corresponding unified inspection data objects are selected. The corresponding index position is located in the current query layer by the data object identifier, and the corresponding index segment and start and end positions are determined.
[0140] In the current query layer, unified inspection data objects are filtered according to the tower numbers of intersecting towers. The corresponding index positions are located by the data object identifier, and the index segment containing the index positions of the unified inspection data objects on both sides of the tower-related discontinuous objects is determined. When the unified inspection data objects on both sides are located in the same index segment, the start and end positions of the corresponding index segment are determined; when they are located in separate index segments, the start and end positions of each index segment are determined separately.
[0141] The current candidate boundary is corrected by adjusting the start and end positions of the indexed segments corresponding to the intersecting towers, thus forming the corrected current candidate boundary.
[0142] Locate the start and end positions of the index positions of discontinuous objects associated with towers within the current candidate boundary. When intersecting towers correspond to one index segment, the modified start and end positions are formed using the portion of the corresponding index segment within the corresponding start and end positions. When intersecting towers correspond to separate index segments, the portion of each index segment within the corresponding start and end positions is retained, and the index positions between segments are not included in the current candidate boundary. The start and end positions of the current candidate boundary that do not involve discontinuous objects associated with towers remain unchanged. When the modified start and end positions overlap, they are grouped together; when they are directly connected, they are grouped together; and when they are separate, they are retained individually.
[0143] In this embodiment, the determination of the subsequent query layer and the formation of the target dataset include the following steps:
[0144] The updated current candidate boundary is projected layer by layer along the inter-layer boundary mapping to the index layer corresponding to the remaining query conditions, and the range of candidate indexes is formed according to the start and end positions of the corresponding index segments.
[0145] Extract the corresponding index layer and index position for each query condition from the remaining query condition set. For each start position and corresponding end position in the current candidate boundary, determine the start and end positions of the corresponding index segments of adjacent index layers sequentially along the inter-layer boundary mapping until the index layer corresponding to the query condition is reached. When the projected start and end positions are continuous, they form the same candidate index range; when they are separate, they are retained separately, and intervening index positions are not included in the candidate index range.
[0146] Count the number of overlapping index entries corresponding to the remaining query conditions within the candidate index range of each index layer, and determine the index layer with the fewest overlapping entries as the subsequent query layer;
[0147] The remaining query conditions are aggregated according to the index layer. When the same index layer corresponds to more than two query conditions, the index items corresponding to each query condition are compared based on the data object identifier, and only the data object identifier that corresponds to all query conditions is retained. The index positions corresponding to the retained data object identifiers are located, and the number of index positions falling within the range of candidate indexes is counted to form the number of overlapping index items for the corresponding index layer. When the minimum number is unique, the corresponding index layer is used as the subsequent query layer. When the minimum number is the same, the index layer with the highest sorted value is selected as the subsequent query layer according to the hierarchical order of the hierarchical index.
[0148] Execute the corresponding query conditions of the subsequent query layer, update the current candidate boundary to the hit segment, and remove the executed query conditions from the remaining query condition set;
[0149] The system filters out unexecuted query conditions for subsequent query layers, retrieves them from the corresponding indexes based on field values, and retains the data object identifiers and index positions that meet the current query conditions. It forms hit segments based on the continuity of index positions, and extracts the overlapping portion between the hit segments and the candidate index range for subsequent query layers to form truncation segments. The start and end positions of these truncation segments are used to update the current candidate boundaries. Finally, it removes the executed query conditions from the remaining query condition set, retaining the index layers and index positions corresponding to the unexecuted query conditions.
[0150] When the remaining query condition set is not empty, the candidate index range is re-formed based on the updated current candidate boundary, the subsequent query layer is determined, the corresponding query conditions are executed, the current candidate boundary and the remaining query condition set are updated, until the remaining query condition set is empty.
[0151] After each round of queries, the updated current candidate boundary and the remaining query condition set are used as input for subsequent queries. If the remaining query condition set is not empty, the updated current candidate boundary is projected layer by layer along the inter-layer boundary mapping, reforming the candidate index range for the index layer corresponding to the remaining query conditions. The number of overlapping index entries in each index layer is counted, and the index layer with the fewest overlapping entries is determined as the subsequent query layer. In the subsequent query layer, searches are performed according to field values, and the current candidate boundary is updated with the resulting hit segments. Executed query conditions are deleted from the remaining query condition set, and the updated current candidate boundary and the remaining query condition set are saved until the remaining query condition set is empty.
[0152] Based on the start and end positions of the current candidate boundary, obtain the data object identifier associated with the corresponding index item, collect the corresponding unified inspection data objects, and form the target dataset.
[0153] The index entries between the start and end positions of each candidate boundary are located respectively. The unified inspection data objects are then located based on the data object identifier associated with each index entry. If the same data object identifier appears repeatedly in the index entries corresponding to different start and end positions, it is retained only once. The unified inspection data objects are then aggregated according to the retained data object identifiers to form the target dataset.
[0154] A hierarchical index query system for UAV inspection data according to an embodiment of the present invention includes the following modules:
[0155] The object construction module is used to collect UAV inspection data, associate shooting data with towers according to waypoint order, record shooting position and shooting attitude, and form a unified inspection data object.
[0156] The index building module is used to establish a hierarchical index for unified inspection data objects, record the spatial range of towers, cluster the index positions of continuous navigation points and consistent tower associations in the next index layer into index segments, record the start and end positions of the index segments corresponding to the index items of the previous index layer, and form an inter-layer boundary mapping.
[0157] The query initialization module is used to form the current candidate boundary according to query permissions, map query conditions to index positions, and form the remaining query condition set.
[0158] The query routing module is used to map and project the current candidate boundary along the inter-layer boundary to the range of candidate indexes, count the number of overlapping index items corresponding to the index positions of the remaining query condition set, and select the index layer with the fewest items as the current query layer.
[0159] The hit feedback module is used to execute the query conditions corresponding to the current query layer, divide the consecutive hit index positions into hit segments, update the current candidate boundary with the hit segments, and remove the processed query conditions from the remaining query condition set.
[0160] The spatial correction module is used to identify discontinuous objects associated with towers within the current candidate boundary according to waypoint order, form an observation ray based on the shooting position and shooting attitude, calculate the intersection of the observation ray and the spatial range of the towers, and correct the current candidate boundary based on the index segment corresponding to the intersecting towers.
[0161] The query execution module is used to map the updated current candidate boundary along the inter-layer boundary to the range of candidate indexes after successive projections, count the number of overlapping index items, determine the subsequent query layer, execute the corresponding query conditions, update the current candidate boundary, and form the target dataset.
[0162] Example 1: To verify the feasibility of this invention in practice, it was applied to a UAV inspection scenario of a power transmission line. The UAV sequentially passes through various waypoints along the inspection route, photographing the line towers and auxiliary equipment. During the inspection, the UAV generates photographic data, route files, waypoint data, and 3D point cloud data. After the data enters the processing terminal, the corresponding inspection route is located by the route number, the waypoint order is determined according to the waypoint arrangement recorded in the route file, and the photographic data is then assigned to the corresponding waypoint by the waypoint number. When there are more than two photographic data points for the same waypoint, they are arranged according to the shooting time. Subsequently, the longitude, latitude, and flight altitude are extracted from the photographic data. The horizontal position is determined by the longitude and latitude, and the vertical position is determined by the flight altitude, forming the shooting position. The correspondence between the photographic data and the tower is established based on the waypoint number and tower number. The gimbal angle and shooting direction are extracted. The shooting direction represents the camera orientation, and the gimbal angle represents the shooting angle state, forming the shooting posture. Configure a data object identifier for each piece of shooting data. The shooting data, flight route number, waypoint number, tower number, shooting location, and shooting attitude are associated through the data object identifier to form a unified inspection data object.
[0163] After constructing the unified inspection data object, a hierarchical index is established according to the field usage of the unified inspection data object. The basic metadata index is located in the first layer; the task index, route index, time index, spatial index, and tower index are located in the second layer; the business tag index and defect index are located in the third layer; the full-text index and image vector index are located in the fourth layer; the statistical pre-aggregation index is located in the fifth layer; and the permission index is set at the query front end. Each index layer maintains the correspondence between the same unified inspection data object in different index layers through the data object identifier, and saves the arrangement position of the index item in the corresponding index layer as the index position. For the tower spatial range, the corresponding three-dimensional point cloud data is collected according to the tower number, the point cloud coordinates are transformed to the spatial coordinate system used by the shooting position, the extreme values of each axis coordinate are calculated, and the three-dimensional bounding boundary of the point cloud is formed based on the extreme values of each axis coordinate. Then, the three-dimensional bounding boundary is associated with the tower number to form the tower spatial range.
[0164] Adjacent unified inspection data objects are processed sequentially along the index positions of each index layer. When adjacent unified inspection data objects correspond to different route numbers, a separation is formed between their corresponding index positions. When route numbers are the same, waypoint numbers are compared. If they correspond to the same waypoint, they remain continuous; if they correspond to different waypoints but are directly adjacent in the inspection route, they remain continuous; if they correspond to different waypoints but are not directly adjacent, they are separated. For adjacent index positions that remain continuous, tower numbers are compared. If tower numbers are different, a new separation is formed. The resulting continuous index positions are assigned to their corresponding index segments, and the index positions at both ends of each index segment are saved. For adjacent index layers, the corresponding index positions are located using the same data object identifier. The index segment to which each index position belongs is determined, and the index entries in one layer are associated with the start and end positions of the corresponding index segments in adjacent index layers, thus forming an inter-layer boundary mapping. When unified inspection data objects associated with the same index entry are distributed across separate index segments, the start and end positions of each index segment are retained to avoid including unassociated positions between segments in the mapping scope.
[0165] Upon receiving a combined query request, the system first filters the allowed index locations in the permission index based on the user's role, task permissions, data security level, and interface permissions. Accessible index locations are compared in order of their arrangement; directly adjacent locations are grouped into the same continuous range, while locations with gaps are processed separately. The start and end positions of each continuous range form the current candidate boundaries. Next, the query request is parsed, extracting the fields and their values from each query condition. The corresponding index layer for each query condition is determined based on the correspondence between fields and index layers. For example, the task number corresponds to the task index, the route number and waypoint number to the route index, the shooting time to the time index, the spatial location to the spatial index, the pole number to the pole index, the equipment component field to the business tag index, the defect field to the defect index, and the text field to the full-text index. Then, based on the field values, the index item and its position are located in the corresponding index. Query conditions for which index queries have not yet been executed are saved as the remaining query condition set, along with the corresponding index layer and position for each query condition.
[0166] When determining the current query layer, the corresponding permission index item is located based on the current candidate boundary. The data object identifier associated with the permission index item is extracted. The index position corresponding to the same data object identifier is located in the first layer of the hierarchical index, and the corresponding start and end positions are retained according to the continuous relationship of the index positions. Subsequently, the start and end positions of the corresponding index segments of adjacent index layers are determined layer by layer along the inter-layer boundary mapping until the index layer corresponding to each query condition is reached. The range of candidate indexes is obtained based on the start and end positions formed by the projection. When the ranges obtained by projection are directly connected, they are kept as the same continuous range; when they are separated, they are saved separately. The remaining query conditions are collected according to the index layer. When the same index layer corresponds to more than two query conditions, the index items corresponding to each query condition are compared by the data object identifier. Only the data object identifier that is common to all query conditions is retained, and the corresponding index position is located again. The number of index positions falling into the range of candidate indexes is counted to form the number of overlapping index items of the corresponding index layer. The number of overlapping index items of each index layer is compared, and the index layer with the fewest items is determined as the current query layer. When the same minimum number of items occurs, the index layer with the highest sorting order is selected according to the hierarchical order used when the hierarchical index was built.
[0167] After executing the remaining query conditions corresponding to the current query layer, for each query condition, the index terms that are hit are retrieved, and the data object identifiers associated with the index terms are extracted. Only the data object identifiers that are common to all query conditions are retained, and then the index position in the current query layer is located. Adjacent positions are compared according to the order of their index positions. When adjacent positions are directly connected, they are included in the same hit segment. When there is a gap between positions, a new hit segment is formed. The start and end positions are determined by the index positions at both ends of each hit segment. Then, the start and end positions of each hit segment are compared with the start and end positions of the candidate index range of the current query layer. Only the overlapping segments are retained, and the start and end positions of the retained segments are used to update the current candidate boundaries. The executed query conditions corresponding to the current query layer are deleted from the set of remaining query conditions, while the field values, corresponding index layers, and index positions of the unexecuted query conditions are still saved.
[0168] Within the current candidate boundary, the continuity of pole-to-tower associations for unified inspection data objects is checked. Corresponding index items are located according to the start and end positions of the current candidate boundary. Unified inspection data objects are located using data object identifiers, and then arranged in waypoint order, establishing waypoint adjacency relationships without crossing mutually separate candidate ranges. The current unified inspection data object and its adjacent unified inspection data objects on both sides are selected sequentially along the waypoint order. When the pole-tower numbers of adjacent unified inspection data objects are the same, but the pole-tower numbers of the current unified inspection data object are different, the current unified inspection data object is identified as a pole-tower association discontinuous object. For pole-tower association discontinuous objects, the shooting position and shooting direction and gimbal angle in the shooting posture are extracted. In the spatial coordinate system used for the shooting position, the horizontal direction is determined by the shooting direction, and the vertical direction component is determined by the gimbal angle. The axial direction components are normalized to form the observation ray direction, which is extended positively along the observation ray direction with the shooting position as the spatial starting point.
[0169] For towers with the same tower number on both sides of a discontinuous tower association data object, the spatial range of the corresponding tower is located. When the starting point of the observation ray is inside the three-dimensional bounding boundary corresponding to the tower's spatial range, the corresponding tower is identified as an intersecting tower. When the starting point of the observation ray is outside the three-dimensional bounding boundary, the intersection points of the observation ray with each boundary surface of the three-dimensional bounding boundary are calculated. Intersection points located in the positive direction of the ray and whose other two axes are located between the extreme values of the corresponding axial coordinates are retained. If there are retained intersection points, the intersecting tower is identified. Based on the tower number of the intersecting tower, the corresponding unified inspection data objects are screened. The corresponding index position is located in the current query layer by the data object identifier. The index segment containing the index positions of the unified inspection data objects on both sides of the discontinuous tower association data object is determined, and the start and end positions of the corresponding index segment are obtained. The corresponding start and end positions are corrected by the overlapping part of the index segment corresponding to the intersecting tower in the original current candidate boundary. The candidate range not involving discontinuous tower association data objects remains unchanged, thus forming the corrected current candidate boundary.
[0170] After correction, the corrected current candidate boundary and the remaining query condition set are used as input for subsequent queries. If the remaining query condition set is not empty, the current candidate boundary is projected layer by layer along the inter-layer boundary mapping, re-forming the candidate index range for each remaining query condition's corresponding index layer. Then, the number of overlapping index entries in each index layer is counted, and the index layer with the fewest overlapping entries is determined as the subsequent query layer. The corresponding query conditions are executed in the subsequent query layer, and the current candidate boundary is updated based on the resulting hit segments. Executed query conditions are removed from the remaining query condition set. After each round of queries, the updated current candidate boundary and the remaining query condition set form the input for the next round of queries, until the remaining query condition set is empty. Finally, the index entries between the starting and ending positions in the current candidate boundary are located. The unified inspection data object is located through the data object identifier associated with the index entry. Duplicate data object identifiers are retained only once. The retained unified inspection data objects are aggregated to form the target dataset.
[0171] For example, after permission filtering, the current candidate boundary corresponds to index positions 180 to 260. After projecting the remaining query conditions onto the corresponding index layers, the number of overlapping index entries in the three candidate index layers are 34, 19, and 27, respectively. Therefore, the index layer with 19 overlapping index entries is determined as the current query layer. After executing the corresponding query conditions, the hit range 208 to 224 is formed, and the current candidate boundary is updated to 208 to 224. Subsequently, a discontinuous tower-related object is identified in the unified inspection data objects corresponding to continuous waypoints. The observation ray formed by the shooting position and shooting attitude intersects with the spatial range of the adjacent towers on both sides. The intersecting towers correspond to index ranges 211 to 236 in the current query layer. Therefore, the overlap between the original current candidate boundary and the index range corresponding to the intersecting towers is 211 to 224, and the corrected current candidate boundary is adjusted accordingly to 211 to 224. Subsequent queries only continue to be executed within the corrected range, thereby preventing the abnormal associated data corresponding to 208 to 210 from continuing to enter subsequent index retrieval.
[0172] Under the same processing resources, the same query conditions, and the same data conditions, the fixed index sequential query method, the multi-index result intersection query method, and the present invention are compared. The application effects of each method are recorded using the same statistical caliber, and the results are as follows.
[0173] Table 1 Comparison of the application effects of different hierarchical index query methods
[0174] Comparison indicators Fixed index sequential query Intersection query of results from multiple indexes This invention Average query response time / s 2.84 2.47 2.12 Invalid index access percentage 21.6 17.9 14.2 Percentage of duplicate index accesses / % 12.4 9.8 7.1 Tower-related abnormal admission rate / % 5.3 4.5 3.2 Target inspection data accuracy rate / % 93.8 94.6 96.1
[0175] As shown in Table 1, the average query response time of this invention is 2.12s, which is lower than the 2.84s of the fixed index sequential query method and the 2.47s of the multi-index result intersection query method. This is because this invention dynamically determines the query layer based on the number of overlapping index entries within each index layer of the current candidate boundary, continuously updates the current candidate boundary using the hit segment, and subsequent queries focus on the shrunk data range, thereby reducing invalid index accesses and improving the efficiency of combined queries.
[0176] The invalid index access rate and duplicate index access rate of this invention are 14.2% and 7.1%, respectively, both lower than the two comparison methods. Through index segment, inter-layer boundary mapping and hit feedback, the excluded data range will not repeatedly participate in subsequent searches, and the index access path will gradually shrink with the query results, reducing invalid access and duplicate access.
[0177] The present invention achieves a pole-tower association anomaly false acceptance rate of 3.2% and a target inspection data accuracy rate of 96.1%. By identifying discontinuous pole-tower associations and forming observation rays based on shooting position and shooting posture, the current candidate boundary is corrected by the intersection relationship between the observation rays and the spatial range of the poles. This further eliminates abnormal association data and improves the accuracy of the correspondence between the target dataset and the actual inspection objects.
[0178] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A hierarchical index query method for UAV inspection data, characterized in that, Includes the following steps: Collect drone inspection data, associate the shooting data with the tower according to the waypoint sequence, record the shooting position and shooting attitude, and form a unified inspection data object; Establish a hierarchical index for unified inspection data objects, record the spatial range of towers, cluster the index positions of continuous waypoints and consistent tower associations in the next index layer into index segments, record the start and end positions of the index segments corresponding to the index items of the previous index layer, and form an inter-layer boundary mapping. The current candidate boundary is formed according to the query permissions, and the query conditions are mapped to the index positions to form the remaining query condition set. Map the current candidate boundary along the inter-layer boundary to the range of candidate indexes, count the number of overlapping index entries corresponding to the index positions of the remaining query condition set, and select the index layer with the fewest overlapping entries as the current query layer. Execute the query conditions corresponding to the current query layer, divide the consecutive hit index positions into hit segments, update the current candidate boundary with the hit segments, and remove the processed query conditions from the remaining query condition set; Identify discontinuous objects associated with towers within the current candidate boundary according to waypoint order, form an observation ray based on shooting position and shooting attitude, find the intersection of the observation ray and the spatial range of the towers, and correct the current candidate boundary with the index segment corresponding to the intersecting towers. The updated candidate boundaries are projected along the inter-layer boundary mapping to the range of candidate indexes, the number of overlapping index items is counted, the subsequent query layer is determined, the corresponding query conditions are executed, the current candidate boundaries are updated, and the target dataset is formed.
2. The hierarchical index query method for UAV inspection data according to claim 1, characterized in that, The formation of the unified inspection data object includes the following steps: Arrange the shooting data according to the order of waypoints in the inspection route, and determine the shooting point and flight altitude from the spatial information of each shooting data to form the shooting position; Establish the correspondence between shooting data and poles based on the waypoint number and pole number corresponding to each shooting data, and form the shooting posture based on the gimbal angle and shooting direction of the corresponding shooting data; The shooting data with established tower correspondences are collected sequentially along the flight path, and the corresponding shooting positions and shooting attitudes are encapsulated along with the shooting data to form a unified inspection data object.
3. The hierarchical index query method for UAV inspection data according to claim 1, characterized in that, The formation of the hierarchical index and inter-layer boundary mapping includes the following steps: Organize the corresponding index items according to the field values of the unified inspection data objects to form a hierarchical index, determine the index position of each unified inspection data object in each index layer, and record the spatial range of the tower. The waypoint order of the unified inspection data object corresponding to adjacent index positions is compared sequentially along each index layer. Adjacent index positions with discontinuous waypoints are separated. Then, the tower associations of adjacent index positions that are not separated are compared, and adjacent index positions with inconsistent tower associations are separated. After separation, continuous index positions of waypoints and towers with consistent correlation are grouped into index segments, and the start and end positions of each index segment are recorded. Based on the index position of the same unified inspection data object in adjacent index layers, a mapping between index items and the start and end positions of corresponding index segments is established between adjacent index layers, forming an inter-layer boundary mapping.
4. The hierarchical index query method for UAV inspection data according to claim 1, characterized in that, The formation of the current candidate boundary and the remaining query condition set includes the following steps: Based on query permissions, filter accessible index positions in the permission index, and form the current candidate boundary by the start and end positions of consecutive accessible index positions; Extract the fields and their values from the query conditions, and determine the corresponding index layer for each query condition based on the correspondence between the fields and the index layer. Based on the field values, locate the index position in the corresponding index layer and map each query condition to the corresponding index position; The query conditions that have completed the index position mapping are combined into a set of remaining query conditions, and the index layer and index position corresponding to each query condition are recorded.
5. A hierarchical index query method for UAV inspection data according to claim 1, characterized in that, Determining the current query layer includes the following steps: Collect the remaining query conditions according to the corresponding index layer, and obtain the index position corresponding to each query condition; Based on the current candidate boundary, locate the corresponding index item in the permission index, extract the corresponding data object identifier, locate the corresponding index position in the first layer of the hierarchical index, and project it layer by layer along the inter-layer boundary to the index layer corresponding to each query condition. Based on the start and end positions of the corresponding index segment of the projection, form the range of candidate indexes. Based on the data object identifier, filter out the index positions corresponding to all query conditions in the same index layer, count the number of positions falling into the range of candidate indexes, and form the number of overlapping index items in the corresponding index layer. Compare the number of overlapping index entries in each index layer and determine the index layer with the fewest overlapping entries as the current query layer.
6. The hierarchical index query method for UAV inspection data according to claim 1, characterized in that, The formation of the hit segment and the updating of the current candidate boundary include the following steps: Execute the remaining query conditions corresponding to the current query layer, and retain the index positions that simultaneously satisfy all query conditions based on the data object identifier; Compare adjacent positions according to the order of the reserved index positions, divide consecutive index positions into hit segments, and record the start and end positions of each hit segment; Compare each hit segment with the candidate index range of the current query layer, and truncate the overlapping segments to update the current candidate boundaries by determining the start and end positions of the segments. Remove executed query conditions from the remaining query condition set, and retain the index layers and index positions corresponding to the unexecuted query conditions.
7. A hierarchical index query method for UAV inspection data according to claim 1, characterized in that, The identification of discontinuous objects associated with the tower and the formation of the observation ray include the following steps: Based on the start and end positions of the current candidate boundaries, obtain the corresponding unified inspection data objects in the current query layer and arrange them in waypoint order; The tower numbers of the unified inspection data objects are compared in order of the flight points. Unified inspection data objects with the same tower number on both sides of the unified inspection data objects but different tower numbers themselves are identified as tower-related discontinuous objects. Obtain the shooting position and shooting posture of discontinuous objects associated with the tower, and determine the direction of the observation ray based on the shooting posture; Starting from the shooting position, the observation ray extends along the direction of the observation ray to form an observation ray.
8. A hierarchical index query method for UAV inspection data according to claim 7, characterized in that, The correction of the current candidate boundary includes the following steps: The spatial range of the corresponding tower is obtained by using the tower number of the unified inspection data object on both sides of the tower-related discontinuous object; Calculate the intersection of the observed ray and the corresponding tower spatial range, and identify the towers with non-empty intersections as intersecting towers; Based on the tower numbers of the intersecting towers, the corresponding unified inspection data objects are selected. The corresponding index position is located in the current query layer by the data object identifier, and the corresponding index segment and start and end positions are determined. The current candidate boundary is corrected by adjusting the start and end positions of the indexed segments corresponding to the intersecting towers, thus forming the corrected current candidate boundary.
9. A hierarchical index query method for UAV inspection data according to claim 1, characterized in that, The determination of the subsequent query layer and the formation of the target dataset include the following steps: The updated current candidate boundary is projected layer by layer along the inter-layer boundary mapping to the index layer corresponding to the remaining query conditions, and the range of candidate indexes is formed according to the start and end positions of the corresponding index segments. Count the number of overlapping index entries corresponding to the remaining query conditions within the candidate index range of each index layer, and determine the index layer with the fewest overlapping entries as the subsequent query layer; Execute the corresponding query conditions of the subsequent query layer, update the current candidate boundary to the hit segment, and remove the executed query conditions from the remaining query condition set; When the remaining query condition set is not empty, the candidate index range is re-formed based on the updated current candidate boundary, the subsequent query layer is determined, the corresponding query conditions are executed, the current candidate boundary and the remaining query condition set are updated, until the remaining query condition set is empty. Based on the start and end positions of the current candidate boundary, obtain the data object identifier associated with the corresponding index item, collect the corresponding unified inspection data objects, and form the target dataset.
10. A hierarchical index query system for UAV inspection data, applied to the hierarchical index query method for UAV inspection data as described in any one of claims 1 to 9, characterized in that, Includes the following modules: The object construction module is used to collect UAV inspection data, associate shooting data with towers according to waypoint order, record shooting position and shooting attitude, and form a unified inspection data object. The index building module is used to establish a hierarchical index for unified inspection data objects, record the spatial range of towers, cluster the index positions of continuous navigation points and consistent tower associations in the next index layer into index segments, record the start and end positions of the index segments corresponding to the index items of the previous index layer, and form an inter-layer boundary mapping. The query initialization module is used to form the current candidate boundary according to query permissions, map query conditions to index positions, and form the remaining query condition set. The query routing module is used to map and project the current candidate boundary along the inter-layer boundary to the range of candidate indexes, count the number of overlapping index items corresponding to the index positions of the remaining query condition set, and select the index layer with the fewest items as the current query layer. The hit feedback module is used to execute the query conditions corresponding to the current query layer, divide the consecutive hit index positions into hit segments, update the current candidate boundary with the hit segments, and remove the processed query conditions from the remaining query condition set. The spatial correction module is used to identify discontinuous objects associated with towers within the current candidate boundary according to waypoint order, form an observation ray based on the shooting position and shooting attitude, calculate the intersection of the observation ray and the spatial range of the towers, and correct the current candidate boundary based on the index segment corresponding to the intersecting towers. The query execution module is used to map the updated current candidate boundary along the inter-layer boundary to the range of candidate indexes after successive projections, count the number of overlapping index items, determine the subsequent query layer, execute the corresponding query conditions, update the current candidate boundary, and form the target dataset.
