Map hierarchical path planning method based on aggregated quadtree

Through the map hierarchical path planning method based on aggregation quadtree, path planning is carried out on a large-scale complex terrain environment, which solves the problem of path generation efficiency and quality in the existing technology, and achieves efficient and good quality path planning.

CN119437279APending Publication Date: 2025-02-14THE 28TH RES INST OF CHINA ELECTRONICS TECH GROUP CORP
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411633350.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In a large-scale complex terrain environment, it is difficult for the prior art to efficiently generate high-path quality traffic routes, especially in the absence of road network data with a complete topological structure.

Method used

The map hierarchical path planning method based on the aggregated quadtree is adopted to form an abstract map by aggregating and node optimization of the original raster map, and then the optimal path is calculated and refined into the pass path of the original grid unit.

Benefits of technology

It significantly reduces the number of nodes and edges of the abstract map, improves the real-time calculation efficiency of the path, and improves the quality of the final generated path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119437279A_ABST
    Figure CN119437279A_ABST
Patent Text Reader

Abstract

The invention discloses a map hierarchical path planning method based on an aggregated quadtree. The method comprises an offline preprocessing stage and a real-time searching stage. In the off-line preprocessing stage, original grid maps are aggregated to form aggregation grids with the same size, the positions and the number of passing nodes are determined according to the width of passable channels on the boundary of the aggregation grids, and a first-layer abstract map is formed; based on the first-layer abstract map, the equal-weight passable aggregation grids are aggregated according to a quadtree aggregation rule to form an equal-weight aggregation area, the traffic nodes of the aggregation area are optimized, an inner edge and an outer edge are obtained through further calculation according to the traffic nodes and stored in a local data table, and a second-layer abstract map is formed. In the real-time searching stage, the starting point and the ending point are given, the optimal abstract path is calculated based on the second layer of abstract map, the optimal path based on the original map is further refined after the local data table is inquired, and the quality of the generated path can be remarkably improved while the real-time searching efficiency of the path can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of path planning, and in particular relates to a map hierarchical path planning method based on an aggregated quadtree. Background Art

[0002] In recent years, with the rapid development of technologies such as mobile robots and artificial intelligence, unmanned vehicles have gradually been used in military and civilian fields such as field material transportation, fire support, and geological research surveys. Before performing a mission, an optimal path must be provided to the unmanned vehicle to guide it to drive autonomously. However, the field environment mission area is large, the geological conditions are diverse, the terrain is complex, the traffic capacity varies greatly, and there is a lack of road network data with a complete topological structure. It is necessary to propose an algorithm that can quickly generate an optimal path with high traffic reliability and short travel time, which is of great significance for the rapid passage of unmanned vehicles in field environments without road networks.

[0003] The traditional Dijkstra algorithm uses a breadth-first search strategy to search for the shortest path between two points in a weighted graph. The A* algorithm is a heuristic search algorithm that can speed up the optimal path calculation time by reasonably selecting the heuristic function. However, as the map range increases, the number of nodes and edges that need to be searched increases significantly, and the calculation efficiency decreases sharply. The JPS algorithm reduces unnecessary node searches by finding jump points, which greatly improves the path search speed. The JPS+ algorithm proposed by Steve Rabin further improves the path search efficiency by preprocessing and calculating key jump points in advance. Although JPS and JPS+ have excellent path search speed, they can only adapt to equal-weighted static maps and cannot adapt to large-scale and complex terrain field environments. The idea of ​​hierarchical abstraction is widely used in path planning for large-scale and unequal-weighted maps with high calculation efficiency. Samet et al. proposed a fast decomposition based on quadtree. This method decomposes the original map into traversable grids and obstacle grids of different sizes, and the center points of adjacent grids are connected to form an abstract map, which significantly reduces the number of nodes in the abstract map and improves the path search efficiency. However, the direct connection of grid center points leads to a large deviation between the generated path and the actual optimal path. HPA* (Hierarchical Path-Finding A*) is the most commonly used hierarchical path planning algorithm. It significantly improves the efficiency of path planning for large-scale maps by preprocessing and generating hierarchical abstract graphs in advance. However, too many passing nodes are generated during the map abstraction process, which reduces the quality of the generated path. At present, how to efficiently generate high-quality passing routes in large-scale complex terrain environments still needs further exploration. Summary of the invention

[0004] Purpose of the invention: The technical problem to be solved by the present invention is to provide a map hierarchical path planning method based on an aggregated quadtree in view of the shortcomings of the prior art.

[0005] To solve the above technical problems, the present invention discloses a map hierarchical path planning method based on an aggregated quadtree, comprising the following steps:

[0006] Step 1: Perform the first-layer aggregation on the grid cells of the original raster map to obtain a plurality of aggregated grids;

[0007] Step 2: Traverse all the aggregated grids, and determine the number and positions of the passing nodes on the boundaries of the aggregated grids according to the number of channel grid cells on the boundaries of two adjacent aggregated grids;

[0008] Step 3: Traverse all the aggregated grids to perform the second-layer aggregation to obtain a plurality of aggregated regions;

[0009] Step 4: Traverse all the aggregated regions to construct edges, including inner edges and outer edges;

[0010] Step 5: Input the starting point and the ending point. According to the different types of the aggregated region where the starting point is located, use different algorithms to calculate the optimal paths between the starting point and each node in the aggregated region, form new inner edges, and add them to the abstract map G; perform the same processing on the ending point. After the processing is completed, a complete abstract map is formed;

[0011] Step 6: Based on the abstract map, calculate the optimal path between the starting point and the ending point to form an optimal abstract path; based on the obtained abstract path, refine it into the final passing path corresponding to the original grid cells by querying the local data table.

[0012] Further, in the above Step 1, each grid cell of the original raster map corresponds to a passing cost value. When the passing cost is infinite, it indicates that the grid cell is an obstacle; otherwise, it is a passable area. Traverse the original raster map to perform the first-layer aggregation. Aggregate every n×n grid cells to form an aggregated grid. When the number of grid cells at the map boundary is less than n×n, fill it with obstacle grids, where 1 < n < the width of the original raster map. When all the grid cells inside the aggregated grid are obstacles, set the type of the aggregated grid as the obstacle type. When the grid cells inside the aggregated grid include grid cells with multiple passing costs, set the type of the aggregated grid as the mixed type. When the grid cells inside the aggregated grid only include one passing cost, set the type of the aggregated grid as the equal-weight type.

[0013] Furthermore, in step 2, determining the number and position of passing nodes on the boundary of the aggregated grid includes: determining the number M of continuous channels between two adjacent aggregated grids; determining the passing nodes based on the number M of continuous channels, when M is less than or equal to a first threshold value M1, taking the middle position grid unit as the only passing node, when M is greater than the first threshold value M1 and less than or equal to a second threshold value M2, taking the first and last two grid units of the channel as passing nodes, and when M is greater than the second threshold value M2, taking the first and last two grid units of the channel plus the middle position grid unit as passing nodes.

[0014] Furthermore, the step 3 includes: constructing an aggregation area, recursively aggregating equal-weight traversable aggregation grids by quadtree to form multiple aggregation areas, and realizing aggregation of equal-weight areas; obstacle type or mixed type aggregation grids do not need to be aggregated, and directly form an obstacle or mixed type aggregation area;

[0015] Optimize the pass nodes, discard all the pass nodes inside the equal-weight aggregation area, and remove one of the two adjacent pass nodes on the boundary of the equal-weight aggregation area while ensuring the integrity of the map. After the aggregation is completed, a quadtree is formed, each tree node corresponds to an aggregation area, and the total number of pass nodes is reduced compared to the first-level aggregation.

[0016] Furthermore, in step 3, constructing the aggregation area includes:

[0017] Starting from the first aggregation grid, the quadtree method is used for aggregation judgment; the current i-th row and j-th column to be aggregated grid is recorded as C[i,j], and the four adjacent aggregation grids C[i,j], C[i+1,j], C[i,j+1] and C[i+1,j+1] are judged whether the types are the same. If they are the same, they are aggregated. i and j represent the row and column indexes of the aggregation grid respectively. After completing the traversal of all aggregation grids, it is also necessary to traverse the equal-weight aggregation areas to judge whether the types of the four adjacent aggregation areas are the same. If they are the same, they need to be further aggregated to form a large aggregation area until there are no more aggregation areas that can be aggregated.

[0018] Furthermore, in step 3, optimizing the traffic nodes includes:

[0019] All the access nodes inside the equal-weighted aggregation area are discarded, and the two adjacent access nodes on the boundary of the equal-weighted aggregation area need to be optimized while ensuring the integrity of the map;

[0020] Suppose there are two adjacent access nodes node1 and node2 on the boundary of equal-weight aggregation area A. When the access nodes node3 and node4 symmetrical to node1 and node2 are in the same equal-weight aggregation area B, then node1 and node3 are directly deleted, or node2 and node4 are deleted; when the access nodes node3 and node4 symmetrical to node1 and node2 are in two aggregation areas B and C respectively, then node1 is deleted and an edge is added between node2 and node3, or node2 is deleted and an edge is added between node1 and node3, so as to maintain the integrity of the abstract map.

[0021] Furthermore, step 4 includes: calculating the optimal path between the boundaries of the aggregation areas as the inner edge; directly connecting the adjacent pass nodes on the boundaries of two adjacent aggregation areas to form an outer edge; storing the calculation results in a local data table for easy query during real-time search; after completing the edge construction, an abstract map G = {V, E, C} is formed, where V is the set of pass nodes, E is the set of edges, and C is the pass cost corresponding to the edge.

[0022] Furthermore, the step 4 comprises:

[0023] A. On the border of adjacent aggregation areas, adjacent pass nodes are connected to form an outer edge, and its pass cost is the pass cost corresponding to the unit grid unit;

[0024] B. Calculate the inner edge of the equal-weighted aggregation area. Given any two different nodes node1(X1, Y1) and node2(X2, Y2) on the boundary of the equal-weighted aggregation area, and the travel cost g on the unit grid, the travel nodes are connected in a straight line to form an inner edge. The calculation formula for its travel cost cost is as follows:

[0025]

[0026] C. Calculate the inner edges of the unequal-weight aggregation area, and use the A* algorithm to calculate the optimal path between two pass nodes within the aggregation area. The sum of the pass costs of each grid unit passed by the path is added up and recorded as the total pass cost between the two pass nodes, and the correspondence between the optimal path and the original grid unit is cached in the local data table.

[0027] Furthermore, in step 5, inserting the starting point and the end point includes:

[0028] A. When the starting point is in an equal-weight aggregation area, the shortest path is a straight line connecting all the boundary nodes;

[0029] B. When the starting point is in an unequal weight aggregation area, use the A* algorithm to calculate the edge from the starting point to each node on the aggregation area boundary and add it to the abstract map;

[0030] C. When the end point is in an equal-weight aggregation area, the shortest path is a straight line connecting all the boundary nodes;

[0031] D. When the end point is in an unequal weight aggregation area, use the A* algorithm to calculate the edges from the end point to each node on the aggregation area boundary and add them to the abstract map to form a complete abstract map.

[0032] Furthermore, in step 6, the final pass path is calculated, including: first, based on the complete abstract map, the A* algorithm is used to calculate in real time the optimal abstract path between the starting point and the end point; then, by querying the local data table cached in advance, the original grid path corresponding to each edge in the unequal-weight aggregation area on the abstract path is found; the edges in the equal-weight aggregation area only contain two nodes, the starting point and the end point, and no refinement is required; the entire path refinement process is completed at one time, or is gradually refined in sections as needed; after refinement, the final pass path is obtained.

[0033] Compared with the prior art, the present invention has the following significant advantages: (1) By fully aggregating equal-weight traversable areas and adopting node optimization strategies, the number of abstract map nodes and edges is greatly reduced, greatly improving the efficiency of real-time path calculation. (2) Unlike the traditional hierarchical path planning algorithm that divides the task area into equal parts, the present invention achieves full aggregation of equal-weight areas in a large-scale complex terrain environment through the aggregation of quadtrees, thereby effectively improving the quality of the final generated path. Ultimately, the efficiency of real-time path search and the quality of generated paths are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.

[0035] Figure 1 It is a schematic flow diagram of the method of the present invention.

[0036] Figure 2 It is a schematic diagram of the process of aggregating the original map using the aggregation quadtree in the present invention.

[0037] Figure 3 It is a schematic diagram of the process of performing real-time calculation of the optimal path based on the abstract map in the present invention.

[0038] Figure 4 It is an experimental map in the embodiment.

[0039] Figure 5 It is the first level of abstract map built based on the experimental map.

[0040] Figure 6 It is a pass node determined based on the first-level abstract map.

[0041] Figure 7 It is the second - layer abstract map.

[0042] Figure 8 It is the optimized passage node map. Specific implementation manners

[0043] The technical methods and processes of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and embodiments. There are various types of maps and diverse implementations of path - planning algorithms. Among them, the embodiments described herein for developing and implementing hierarchical path - planning for large - scale complex maps are only part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.

[0044] A method for hierarchical path - planning of maps based on an aggregated quadtree provided by the present application can be applied to the application scenario of maps of large - scale complex terrain environments in the wild.

[0045] Figure 1 It is the flow chart of the method of the present invention. This method first performs hierarchical pre - processing on the original map. By equally dividing the map without discrimination, the first - layer abstract map is formed. On this basis, the equally - weighted passable areas are aggregated in the way of an aggregated quadtree to form the second - layer abstract map. Finally, according to the starting point and the ending point, the abstract map is improved, and the abstract path and the final path are calculated based on the abstract map.

[0046] The specific description of the technical solution of the present invention is as follows:

[0047] A. First, start traversing from the upper - left corner of the original raster map. Aggregate every n×n grid cells to form an aggregated grid, and judge the type value of the aggregated grid, where 1 < n < the width of the original raster map. The type value is determined according to the passability of all grid cells inside the aggregated grid, including obstacle type, mixed type, and equally - weighted passable type. The aggregation process itself has nothing to do with the passability of grid cells, that is, both obstacle and passable grid cells will be aggregated without discrimination. When there are less than n×n grid cells at the map boundary, the vacant grids are filled with obstacle grids. After the aggregation is completed, traverse all the aggregated grids to determine the passage nodes on the boundary. Passage nodes usually appear in pairs and are passable grid cells on the boundary connecting two adjacent aggregated grids. The number of passable nodes is determined according to the number M of continuous channels on the boundary between two adjacent aggregated grids. When M is less than or equal to the first threshold M1, the middle grid cell of the channel is taken as the only passage node; when M is greater than the first threshold M1 and less than or equal to the second threshold M2, the first and last grid cells of the channel are taken as the passage nodes; when M is greater than the second threshold M2, the grid cells at the two end points of the channel and the middle grid cell are taken as the passage nodes.

[0048] B. Then, starting from the first aggregation grid in the upper left corner of the map, recursively traverse according to the quadtree rule to perform the second level of aggregation. The processing flow is as follows: Figure 2 . Determine whether the type values ​​of the four adjacent aggregation grids are the same. If they are all equal-weighted passable areas, they are merged into one aggregation area, that is, merging the four quadtree child nodes of the same type into one parent node. The four parent nodes (if any) are further determined to be of the same type. If so, they are further merged until the conditions are no longer met. After the aggregation is completed, an abstract map containing multi-scale square aggregation areas is formed, in which the equal-weighted passable areas are fully aggregated.

[0049] C. Secondly, traverse all aggregation areas and build nodes and edges.

[0050] C1. Discard all the access nodes inside the equal-weighted aggregation area, and remove any two adjacent access nodes on the boundary of the equal-weighted aggregation area while ensuring the integrity of the map.

[0051] Suppose there are two adjacent access nodes node1 and node2 on the boundary of equal-weight aggregation area A. When the access nodes node3 and node4 symmetrical to node1 and node2 are in the same equal-weight aggregation area B, then node1 and node3 are directly deleted, or node2 and node4 are deleted; when the access nodes node3 and node4 symmetrical to node1 and node2 are in two aggregation areas B and C respectively, then node1 is deleted and an edge is added between node2 and node3, or node2 is deleted and an edge is added between node1 and node3, so as to maintain the integrity of the abstract map.

[0052] After optimization, the number of passage nodes contained in the abstract map is significantly reduced compared to the original map.

[0053] C2. Construct edges, including inner and outer edges. The A* algorithm is used to calculate the internal optimal path of each pass node between the aggregation area boundaries as the inner edge. The calculation results are stored in the local data table in advance for easy query during real-time search. Adjacent pass nodes on the boundaries of two adjacent aggregation areas are directly connected to form an outer edge with a length of 1. After completing the construction of nodes and edges, an abstract map G = {V, E, C} is formed, where V is the set of pass nodes, E is the set of edges, and C is the pass cost corresponding to the edge. Specifically, it includes:

[0054] C21. On the border of adjacent aggregation areas, adjacent pass nodes are connected to form an outer edge, and its pass cost is the pass cost corresponding to the unit grid unit;

[0055] C22. Calculate the inner edge of the equal-weighted aggregation region. Given any two different nodes node1(X1, Y1) and node2(X2, Y2) on the boundary of the equal-weighted aggregation region, and the travel cost g on the unit grid, the travel nodes are connected in a straight line to form an inner edge. The calculation formula for its travel cost cost is as follows:

[0056]

[0057] C23. Calculate the inner edges of the unequal-weight aggregation area, and use the A* algorithm to calculate the optimal path between two pass nodes within the aggregation area. The sum of the pass costs of each grid unit passed by the path is added up and recorded as the total pass cost between the two pass nodes, and the correspondence between the optimal path and the original grid unit is cached in the local data table.

[0058] D. Finally, if Figure 3 , calculate the optimal path based on the given starting point and end point.

[0059] D1. Determine whether the starting point and the end point are in the same aggregation area. When they are in the same equal-weighted aggregation area, the straight line connecting them is the optimal path, and no additional calculation is required; when they are in the same non-equal-weighted aggregation area, the A* algorithm is used to directly calculate the optimal path; when they are not in the same aggregation area, the starting point / end point needs to be inserted into the corresponding aggregation area respectively, and the optimal path from the starting point / end point to all the pass nodes on the boundary of the aggregation area is calculated to form an inner edge and added to the abstract map G.

[0060] Inserting the start / end points into the corresponding aggregation areas includes:

[0061] D11. When the starting point is in an equal-weight aggregation area, the shortest path is a straight line connecting all the boundary nodes;

[0062] D12. When the starting point is in an unequal weight aggregation area, use the A* algorithm to calculate the edge from the starting point to each node on the aggregation area boundary and add it to the abstract map;

[0063] D13. When the end point is in an equal-weight aggregation area, the shortest path is a straight line connecting all the boundary nodes;

[0064] D14. When the end point is in an unequal weight aggregation area, use the A* algorithm to calculate the edges from the end point to each node on the boundary of the aggregation area and add them to the abstract map to form a complete abstract map.

[0065] D2. When the starting point and the end point are not in the same aggregation area, the A* algorithm is used to calculate the abstract path based on the abstract map G. Then, by querying the local data table cached in advance, the inner edges of the non-equal-weighted area are further refined into the paths corresponding to the original grid cells to form the final pass path.

[0066] This method uses an aggregated quadtree to fully aggregate equal-weighted traversable areas in complex maps, effectively reducing the number of abstract map nodes and edges used for real-time calculations. At the same time, thanks to the full aggregation of equal-weighted areas, the deviation between the calculated final path and the actual optimal path is significantly reduced, greatly improving the efficiency of real-time path calculation and the quality of optimal path generation.

[0067] Example:

[0068] This embodiment provides a map hierarchical path planning method based on an aggregated quadtree. Figure 4 It is an experimental map TestMap, which contains 60×60 grid cells, where green, blue, and orange represent passable grids with different travel costs, and black represents impassable grids. Based on this experimental map, the optimal path is calculated in real time. The specific implementation steps include:

[0069] A. First layer aggregation of the original experimental map.

[0070] A.1 defines the cluster grid structure, denoted as ClusterGrid, with attributes including bound, width, height, type, passageNodes, x, and y. Bound contains the maximum and minimum x and y values ​​of the four corners of the cluster grid. Width and height represent the width and height of the cluster grid. In this example, width and height are both 10. Type is determined by the passage costs of all grid cells contained in the cluster grid. When type is equal to -1, it indicates an impassable area or a mixed area (that is, it contains both impassable and passable areas, or grid cells with different passage costs), and no further aggregation is required. Multiple cluster grids with the same passage cost have the same type value. passageNodes represents the set of passage nodes on the boundary of the cluster grid. x and y represent the position of the cluster grid in the abstract map, which are two unsigned integers.

[0071] A.2 Traverse from the first grid cell in the upper left corner of TestMap, aggregate every 10×10 original grid cells to form an aggregated grid ClusterGrid, and each grid cell will participate in the aggregation. The type value of each ClusterGrid is determined by the pass costs of all internal grid cells. When all internal grid cells are impassable, or there are n (n≥2) pass costs, the type of ClusterGrid is set to -1, indicating that no further aggregation is required. When the pass costs of all internal grid cells are the same and passable, different type values ​​greater than 0 are set according to the pass costs. Figure 5As shown, the 60×60 original map is aggregated to form an abstract map consisting of 6×6 aggregate grids, and each red box represents an aggregate grid ClusterGrid.

[0072] A.3 After completing ClusterGrid aggregation, it is necessary to determine the location and number of passable nodes on the boundary of each ClusterGrid. Start traversing from the first ClusterGrid in the upper left corner of the map, and find several channels on the boundary between the current ClusterGrid and the adjacent ClusterGrid. When the channel is 0, there is no passable node on the boundary; when the number of channels is greater than 0, it is necessary to judge the width of each channel, that is, the number of continuous passable grids. When the number of continuous passable grids in the channel is less than or equal to 5, the grid at the center of the channel is used as the only passable node; when the number of continuous passable grids in the channel is greater than 5 and less than or equal to 10, the first and last two grid units of the channel are taken as passable nodes; when the number of continuous passable grids in the channel is greater than 10, the grids at the two end points of the channel and the grid unit in the middle are taken as two passable nodes. Figure 6 As shown, the red grids are pass nodes.

[0073] B. Perform second layer polymerization.

[0074] B1. Define the aggregation region structure, denoted as RegionGrid, with the attributes id, ClusterGrids, type, leftTop, rightBottom and passageNodes. ClusterGrids represents the set of all ClusterGrids contained in an aggregation region. type is the type of the aggregation region, and its definition is consistent with the type of the aggregation grid. leftTop and rightBottom represent the positions of the original grid in the upper left corner and the original grid in the lower right corner of the aggregation region, respectively. The range of the aggregation region and the positions of all the aggregation grids and grid cells inside can be obtained through these two grid positions. passageNodes is the set of passage nodes at the boundary of the aggregation region.

[0075] B2. According to the characteristic that every four leaf nodes of the quadtree form a parent node, it is judged in turn whether every four ClusterGrids on the abstract map can be aggregated to form a RegionGrid. After all ClusterGrid judgments are completed, it is necessary to judge in turn whether every four RegionGrids can be aggregated to form a larger RegionGrid according to the same aggregation rules until there are no RegionGrids that can be aggregated. The positional relationship of the four ClusterGrids (or RegionGrids) for aggregation judgment is as follows. Assume that the current ClusterGrid is at position (1,1) in the abstract map, that is, the first row and the first column, then the positions of the other three ClusterGrids to be judged are (1,2), (2,1), and (2,2). For this embodiment, first start traversing from the first ClusterGrid in the upper left corner of the abstract map, and judge the type values ​​of the three ClusterGrids below, on the right, and on the lower right. When the types of all ClusterGrids are the same, the four ClusterGrids are aggregated to form a RegionGrid, and the type, leftTop, rightBottom, passageNodes, and other values ​​of the RegionGrid are set. Among them, when calculating passageNodes, if the boundary of the aggregated grid is completely inside the aggregated area, all the passage nodes of the boundary are discarded, otherwise they are retained. After completing all ClusterGrid judgments, it is necessary to recursively judge the RegionGrid formed by the aggregation. Traverse the abstract map and find the first RegionGrid. According to the quadtree aggregation rules, determine whether the other three child nodes under the same parent node are all RegionGrids. If they are all RegionGrids and have the same type value, aggregate them, otherwise do not aggregate them. Until all RegionGrids can no longer be further aggregated.

[0076] B.3 As Figure 7 As shown in the figure, the red box is the aggregation area formed after aggregation. Next, we need to optimize the nodes and build edges. The nodes are mainly optimized for the adjacent nodes on the boundary. From the first aggregation area in the upper left corner of the map, we judge each aggregation area in turn. For the two adjacent passage nodes passageNode1 and passageNode2 on the boundary, we adopt the following two processing methods:

[0077] (1) When the symmetric passage node passageNode3 of passageNode1 and the symmetric passage node passageNode4 of passageNode2 are in the same equal-weight aggregation area, delete passageNode1 and passageNode3, or delete passageNode2 and passageNode4.

[0078] (2) When the symmetric passage node passageNode3 of passageNode1 and the symmetric passage node passageNode4 of passageNode2 are in two different equal-weight aggregation areas, delete passageNode1 and add an outer edge between passageNode2 and passageNode3, or delete passageNode2 and add an outer edge between passageNode1 and passageNode3 to maintain the integrity of the abstract map.

[0079] Figure 8 The optimized distribution of transit nodes is shown, and the number of nodes is significantly reduced compared to before optimization. Next, we need to further construct edges, including inner edges and outer edges. First, we construct outer edges, traverse all aggregation areas, and connect adjacent transit nodes on the boundaries of two adjacent aggregation areas to form an outer edge. Then, we construct inner edges and traverse all aggregation areas again, which are divided into the following two cases for processing:

[0080] (1) If the aggregation region RegionGrid is an equal-weight traversable region, then two traversable nodes on the boundary are directly connected to each other to form an inner edge.

[0081] (2) If the aggregation area RegionGrid is a non-equal-weight passable area, the shortest path between two passable nodes on the boundary is calculated in advance using the A* algorithm and cached in the local data table in advance.

[0082] C. After the second-layer abstract map is constructed, the optimal path can be solved according to the given starting point S and end point E, which can be divided into the following cases:

[0083] (1) When S and E are in the same equal-weight aggregation area, the straight line connecting S and E is the optimal path.

[0084] (2) When S and E are in the same non-equal-weight aggregation area, the A* algorithm is directly used to calculate the optimal path from S to E.

[0085] (3) When S and E are not in the same aggregation area, first insert S into the aggregation area to which it belongs and add the corresponding inner edges. Do the same with E to form a complete abstract map G. Then, based on G, use the A* algorithm to calculate the optimal abstract path from S to E, and then refine it based on the pre-cached local data table to form the final optimal path corresponding to the original map grid.

[0086] In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, wherein the computer storage medium can store a computer program, and when the computer program is executed by the data processing unit, the invention content of a map hierarchical path planning method based on an aggregated quadtree provided by the present invention and some or all of the steps in each embodiment can be executed. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0087] Those skilled in the art can clearly understand that the technical solutions in the embodiments of the present invention can be implemented by means of computer programs and their corresponding general hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention are essentially or partly contributed to the prior art can be embodied in the form of a computer program, i.e., a software product, which can be stored in a storage medium and includes several instructions for enabling a device including a data processing unit (which can be a personal computer, a server, a single-chip microcomputer, a MUU or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.

[0088] The present invention provides a map hierarchical path planning method based on an aggregated quadtree. There are many methods and ways to implement the technical solution. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented using existing technologies.

Claims

1. A map hierarchical path planning method based on aggregated quadtree, characterized in that: It includes the following steps: Step 1: Perform the first-layer aggregation on the grid cells of the original raster map to obtain multiple aggregated grids; Step 2: Traverse all the aggregated grids, and determine the number and positions of the passing nodes on the boundary of the aggregated grids according to the number of channel grid cells on the boundary between two adjacent aggregated grids; Step 3: Traverse all the aggregated grids, and perform the second-layer aggregation to obtain multiple aggregated regions; Step 4: Traverse all the aggregated regions, and construct edges, including inner edges and outer edges; Step 5: Input the starting point and the ending point. According to the different types of the aggregated region where the starting point is located, use different algorithms to calculate the optimal paths between the starting point and each node in the aggregated region, form new inner edges, and add them to the abstract map G; Perform the same processing on the ending point. After the processing is completed, a complete abstract map is formed; Step 6: Based on the abstract map, calculate the optimal path between the starting point and the ending point to form an optimal abstract path; Based on the obtained abstract path, refine it into the final passing path corresponding to the original grid cells by querying the local data table.

2. A map hierarchical path planning method based on aggregated quadtree according to claim 1, characterized in that: In the said Step 1, each grid cell of the original raster map corresponds to a passing cost value. When the passing cost is infinite, it means that the grid cell is an obstacle; otherwise, it is a passable area. Traverse the original raster map and perform the first-layer aggregation. Aggregate every n×n grid cells to form an aggregated grid. When the map boundary has less than n×n grid cells, fill it with obstacle grids, where 1 < n < the width of the original raster map. When all the grid cells inside the aggregated grid are obstacles, set the type of the aggregated grid as the obstacle type. When the grid cells inside the aggregated grid include grid cells with multiple passing cost values, set the type of the aggregated grid as the mixed type. When the grid cells inside the aggregated grid only include one passing cost value, set the type of the aggregated grid as the equal-weight type.

3. A map hierarchical path planning method based on aggregated quadtree according to claim 2, characterized in that: In the said Step 2, determining the number and positions of the passing nodes on the boundary of the aggregated grid includes: determining the number M of consecutive channels between two adjacent aggregated grids; determining the passing nodes according to the number M of consecutive channels. When M is less than or equal to the first threshold M1, take the grid cell at the middle position as the only passing node. When M is greater than the first threshold M1 and less than or equal to the second threshold M2, take the two grid cells at the head and tail of the channel as the passing nodes. When M is greater than the second threshold M2, take the two grid cells at the head and tail of the channel, plus the grid cell at the middle position as the passing nodes.

4. A map hierarchical path planning method based on aggregated quadtree according to claim 3, characterized in that: The said Step 3 includes: constructing aggregated regions, performing quadtree recursive aggregation on the equal-weight passable aggregated grids to form multiple aggregated regions, and realizing the aggregation of the equal-weight regions; the aggregated grids of the obstacle type or the mixed type do not need to be aggregated and directly form an obstacle or a mixed-type aggregated region; Optimizing the passing nodes, discarding all the passing nodes inside the equal-weight aggregated regions, and removing one of the two adjacent passing nodes on the boundary of the equal-weight aggregated regions on the premise of ensuring the integrity of the map passing. After the aggregation is completed, a quadtree is formed. Each tree node corresponds to an aggregated region, and the total number of passing nodes is reduced compared with the first-layer aggregation.

5. A map hierarchical path planning method based on aggregated quadtree according to claim 4, characterized in that: In the said Step 3, constructing the aggregated regions includes: Starting from the first aggregation grid, the quadtree method is used for aggregation judgment; the current i-th row and j-th column to be aggregated grid is recorded as C[i,j], and the four adjacent aggregation grids C[i,j], C[i+1,j], C[i,j+1] and C[i+1,j+1] are judged whether the types are the same. If they are the same, they are aggregated. i and j represent the row and column indexes of the aggregation grid respectively. After completing the traversal of all aggregation grids, it is also necessary to traverse the equal-weight aggregation areas to judge whether the types of the four adjacent aggregation areas are the same. If they are the same, they need to be further aggregated to form a large aggregation area until there are no more aggregation areas that can be aggregated.

6. A map hierarchical path planning method based on aggregated quadtree according to claim 5, characterized in that: In step 3, optimizing the transit nodes includes: All the access nodes inside the equal-weighted aggregation area are discarded, and the two adjacent access nodes on the boundary of the equal-weighted aggregation area need to be optimized while ensuring the integrity of the map; Suppose there are two adjacent access nodes node1 and node2 on the boundary of equal-weight aggregation area A. When the access nodes node3 and node4 symmetrical to node1 and node2 are in the same equal-weight aggregation area B, then node1 and node3 are directly deleted, or node2 and node4 are deleted; when the access nodes node3 and node4 symmetrical to node1 and node2 are in two aggregation areas B and C respectively, then node1 is deleted and an edge is added between node2 and node3, or node2 is deleted and an edge is added between node1 and node3, so as to maintain the integrity of the abstract map.

7. A map hierarchical path planning method based on aggregated quadtree according to claim 6, characterized in that: The step 4 includes: calculating the optimal path between the boundaries of the aggregation areas as the inner edge; directly connecting the adjacent pass nodes on the boundaries of two adjacent aggregation areas to form an outer edge; storing the calculation results in the local data table; after completing the edge construction, an abstract map G = {V, E, C} is formed, where V is the set of pass nodes, E is the set of edges, and C is the pass cost corresponding to the edge.

8. A map hierarchical path planning method based on aggregated quadtree according to claim 7, characterized in that: The step 4 comprises: A. On the border of adjacent aggregation areas, adjacent pass nodes are connected to form an outer edge, and its pass cost is the pass cost corresponding to the unit grid unit; B. Calculate the inner edge of the equal-weighted aggregation area. Given any two different nodes node1(X1, Y1) and node2(X2, Y2) on the boundary of the equal-weighted aggregation area, and the travel cost g on the unit grid, the travel nodes are connected in a straight line to form an inner edge. The calculation formula for its travel cost cost is as follows: C. Calculate the inner edges of the unequal-weight aggregation area, and use the A* algorithm to calculate the optimal path between two pass nodes within the aggregation area. The sum of the pass costs of each grid unit passed by the path is added up and recorded as the total pass cost between the two pass nodes, and the correspondence between the optimal path and the original grid unit is cached in the local data table.

9. A map hierarchical path planning method based on aggregated quadtree according to claim 8, characterized in that: In step 5, inserting the starting point and the end point includes: A. When the starting point is in an equal-weight aggregation area, the shortest path is a straight line connecting all the boundary nodes; B. When the starting point is in an unequal weight aggregation area, use the A* algorithm to calculate the edge from the starting point to each node on the aggregation area boundary and add it to the abstract map; C. When the end point is in an equal-weight aggregation area, the shortest path is a straight line connecting all the boundary nodes; D. When the end point is in an unequal weight aggregation area, use the A* algorithm to calculate the edges from the end point to each node on the aggregation area boundary and add them to the abstract map to form a complete abstract map.

10. A map hierarchical path planning method based on aggregated quadtree according to claim 9, characterized in that: In step 6, the final pass path is calculated, including: first, based on the complete abstract map, the A* algorithm is used to calculate the optimal abstract path between the starting point and the end point in real time; then, by querying the local data table cached in advance, the original grid path corresponding to each edge in the unequal weight aggregation area on the abstract path is found; the edges in the equal weight aggregation area only include the two nodes of the starting point and the end point, and no refinement is required; the entire path refinement process is completed at one time, or it is gradually refined in sections as needed; after refinement, the final pass path is obtained.

Citation Information

Cited By

  • Greenhouse intelligent control path planning method based on Go strategy

    CN120538551A

  • A greenhouse intelligent management and control path planning method based on go strategy

    CN120538551B

  • Intelligent push processing method based on GIS city data mining

    CN120687688A

  • Airspace navigation marking and grid calculation method based on Beidou grid code

    CN121207188A