A path planning method and system based on hash query neighbor point passability
By constructing a hash table of accessible points in sub-partitions through hash lookup and performing distributed processing, the problem of high computational overhead in determining the accessibility of neighboring points in path planning is solved, thus achieving efficient and fast path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- COMP APPL TECH INST OF CHINA NORTH IND GRP
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-21
Smart Images

Figure CN122429802A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of path planning technology, and in particular to a path planning method and system based on hash query of neighbor point traversability. Background Technology
[0002] Path planning is typically a core function of Geographic Information Systems (GIS). Search-based path planning algorithms, including Dijkstra's algorithm and A* algorithm, aim to find the optimal path from a starting point to a destination using search methods. These algorithms are widely used in mobile robotics, autonomous driving, and other fields. They usually start from the starting point as the current point, iteratively assessing the descentability of neighboring points. Descentable neighboring points are linked forward to the current point, adding them to the candidate space. Points in the candidate space are then sorted by cost, and the optimal point is selected as the starting point for further iterations until the target point is encountered, thus forming the optimal path from the starting point to the destination and completing the entire path planning process. Therefore, assessing the descentability of neighboring points is an essential and crucial step in each round of the search.
[0003] Common methods for determining the drivability of neighboring points include geometric methods and grid methods. Geometric methods represent environmental obstacles using geometric shapes such as polygons and circles, and use collision detection algorithms like ray tracing and distance methods to check the drivability of neighboring points and obstacles. However, this method has a high computational cost and cannot meet the requirements for rapid planning in environments with complex obstacle geometry. Grid methods divide the entire environment into a grid at a certain resolution, marking each cell as drivable or impassable. They use coordinate indexing to determine the drivability of neighboring points. This method requires a predefined grid of fixed size. The grid state can only be dynamically updated when environmental changes occur within the grid area, and when the environment needs to expand outwards, the entire grid and its parameters need to be updated, which cannot meet the needs of dynamic environmental adjustments. Summary of the Invention
[0004] Based on the above analysis, the embodiments of the present invention aim to provide a search-like path planning method based on hash query neighbor point traversability, in order to solve the problems of low efficiency and insufficient dynamic adjustment capability of search-like path planning in the prior art.
[0005] The objective of this invention is mainly achieved through the following technical solutions: On one hand, embodiments of the present invention provide a path planning method based on hash query neighbor traversal, comprising the following steps: The initial set of accessible path points is converted into integer-spaced coordinates and divided into N sub-partitions with accessible path points. Based on the passable path points of the transformed N sub-partitions and the obtained dynamic passable points and / or obstacle points, construct and update the hash table of the passable point set of each sub-partition; Starting from the path origin, an iterative path planning expansion task is performed. In each round, the drivability of the expanded neighbor points is queried from the hash table of the drivable point set of the corresponding sub-partition. The path is planned based on the drivable neighbor nodes until the optimal global path from the origin to the destination is obtained.
[0006] Furthermore, the sub-partition is associated with N pre-defined hosts; the optimal global path from the starting point to the ending point is obtained, including: Initialize the host for executing the path planning extension task and the planned candidate space, and add the path start point as the current point to the candidate space; During each round of expansion, the point with the minimum path cost is selected from the candidate space as the current point for this round, and this current point is removed from the candidate space. The host associated with the sub-partition where the current point is located is identified. If the host performing the path planning expansion task in this round is not the associated host, the path planning expansion task is transferred to the associated host. The eight-neighbor expansion is used to search for the neighbor points of the current point in this round, and the drivability of the expanded neighbor points is queried from the hash table of the drivable point set of the sub-partition corresponding to the associated host. The path cost of the drivable neighbor nodes is calculated, they are forward connected to the current point in this round, and added to the candidate space. The process of iterating through each round of expansion continues until the candidate space is empty or the destination is found. The forward link of the current point is then obtained to arrive at the optimal global path.
[0007] Furthermore, the center point of each sub-partition is used as the identifier of the associated host; during each round of expansion, the host associated with the sub-partition where the current point is located is identified, including: calculating the center point C of the sub-partition where the current point is located; if the center point C is different from the identifier of the host executing the path planning expansion task in this round, the path planning expansion task is transferred to the host with the corresponding identifier.
[0008] Furthermore, the center point of the sub-partition containing any point is calculated based on the following formula. : , in, The coordinates of any point are equal intervals. and These are the basic elements in two orthogonal directions with equal spacing, respectively. , k∈Z; Divide by element, Element-wise multiplication.
[0009] Furthermore, construct and update the hash table of the passable point set for each sub-partition, including: Obtain the integer-spaced coordinates of the passable path points in each sub-partition, and construct a hash table of the passable point set for each sub-partition using the integer-spaced coordinates as the key; After converting the acquired dynamic passable points and / or obstacle points into the integer spacing coordinates, the sub-partition to which they belong is identified, and passable points are added or deleted in the corresponding sub-partition passable point set hash table to obtain the updated sub-partition passable point set hash table.
[0010] Furthermore, identifying the sub-zone to which the dynamically passable points and / or obstacle points belong includes: Calculate the center point corresponding to the transformed dynamic passable point and / or obstacle point; The set of center points of the sub-partition to which the center point belongs is determined based on the center point, and the sub-partition to which the center point belongs is identified based on the set of center points.
[0011] Furthermore, construct a hash table of the passable point set for the corresponding sub-partition, including: The corresponding hash value is calculated based on the integer interval coordinates of each passable path point in the corresponding sub-partition, and the corresponding index value to be stored is obtained by combining the hash table mask of the hash table of the passable point set of the sub-partition. Each index value to be stored is judged sequentially. If the slot status of the hash table array of the passable point set hash table of the corresponding index value is an empty slot or a marked slot, then the corresponding integer spacing coordinates and hash value are stored in the slot to obtain the corresponding passable point set hash table of the sub-partition.
[0012] Furthermore, the descentability of any extended neighbor point is queried from the corresponding sub-partition descentable point set hash table, including: Calculate the corresponding hash value based on the integer interval coordinates of the neighboring points to obtain the first hash value. Combine this with the hash table mask of the hash table of the traversable point set of the sub-partition to obtain the initial index value. Using the initial index value as the current index, sequentially probe the status of each slot in the hash table of the traversable point set of the sub-partition, and determine the traversability of the path point according to the following query conditions: If the slot corresponding to the hash table of the traversable point set of the current index sub-partition is an empty slot, then the neighboring point is an intraversable point. When the slot is active, if the hash value of the slot is different from the first hash value, then the neighboring point is an inaccessible point; if the hash value of the slot is the same as the first hash value, and the coordinates stored in the slot are the same as the integer interval coordinates of the neighboring point, then the neighboring point is an accessible point; if the coordinates stored in the slot are different from the integer interval coordinates of the neighboring point, then the current index is updated using perturbation detection and linear detection methods, and the query condition judgment process is returned. When the slot status is a deleted marked slot, skip the slot, update the current index using perturbation detection and linear detection methods, and return to the query condition judgment process.
[0013] Furthermore, the initial passable path point set, dynamic passable points, and / or obstacle points are obtained through topic subscription.
[0014] On the other hand, embodiments of the present invention provide a path planning system based on hash query neighbor traversal, including: The subscription module is used to obtain the initial set of passable path points, and also to obtain dynamic passable points and / or obstacle points; The preprocessing module is used to convert the initial set of passable path points into integer-spaced coordinates and obtain passable path points for N sub-partitions; The hash table maintenance module is used to construct a corresponding hash table of traversable points for the sub-partition based on the traversable path points of the transformed sub-partition; it is also used to update the hash table of traversable points for the sub-partition in combination with the dynamic traversable points and / or obstacle points; The path planning module is used to perform iterative path planning and expansion tasks starting from the path origin. In each round, it queries the drivability of the expanded neighbor points from the hash table of the drivable point set of the corresponding sub-partition, and plans the path based on the drivable neighbor nodes until the optimal global path from the origin to the destination is obtained.
[0015] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects: 1. This invention proposes a hash table method to store the initial set of passable points, the dynamically acquired obstacle points, and the dynamically passable points as a hash table of passable points. This hash table can determine the passability of the current point's neighboring points during the path planning process through an efficient hash query method. Thus, while ensuring the success rate of planning, it supports efficient path search in arbitrarily complex obstacle or passable environments, improves the path search efficiency of GIS systems, and meets the corresponding dynamic requirements.
[0016] 2. To ensure that the path planning expansion calculation in each round is located in the central region and to avoid the reduction in optimality caused by boundary interference, this invention proposes a hash table approach for the set of traversable points in sub-partitions. By deploying distributed execution hosts, the corresponding hash tables of sub-partitions are associated and stored. Path planning expansion tasks are dynamically allocated among the hosts through central point identification, and global path planning is completed collaboratively. Even when faced with a large set of traversable points and high-concurrency path planning tasks, the efficiency and scalability of path planning can be guaranteed.
[0017] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0018] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0019] Figure 1 This is a flowchart of a path planning method based on the décorability of neighbor points according to an embodiment of the present invention; Figure 2 This is a logical block diagram of the path planning method based on hash query neighbor point traversability in an embodiment of the present invention; Figure 3 A schematic diagram of a traversable path sub-partition constructed for an embodiment of the present invention; Figure 4 A flowchart illustrating the addition of points to the point set hash table in this embodiment of the invention; Figure 5 This is a flowchart of point deletion in a point set hash table according to an embodiment of the present invention; Figure 6 This is a flowchart of a point set hash table point lookup according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the path planning results in a complex environment according to an embodiment of the present invention. Detailed Implementation
[0020] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0021] Example 1 A specific embodiment of the present invention discloses a search-like path planning method based on hash query neighbor traversability, such as... Figure 1As shown, it includes the following steps: Step S1: Convert the obtained initial set of passable path points into integer equally spaced coordinates and divide them to obtain passable path points for N sub-partitions; Step S2: Based on the passable path points of the transformed N sub-partitions and the obtained dynamic passable points and / or obstacle points, construct and update the hash table of the passable point set of each sub-partition; Step S3: Determine the starting point and ending point of the path. Start the iterative path planning expansion task from the starting point of the path. In each round, query the drivability of the expanded neighbor points from the hash table of the drivable point set of the corresponding sub-partition. Plan the path based on the drivable neighbor nodes until the optimal global path from the starting point to the ending point is obtained.
[0022] Using the above method, the initial set of passable points, the dynamically acquired obstacle points in real time, and the dynamically passable points are all uniformly stored as a hash table of passable point sets, and sub-partition management is implemented. During path planning, the passability of the current point's neighboring points can be quickly determined through the sub-partition identification mechanism and the efficient query characteristics of the hash table. This significantly improves the efficiency and speed of path planning while maintaining scalability.
[0023] Specifically, in step S1, search-based path planning tasks typically require expanding the search of neighboring points round by round and determining the drivability of each neighboring point. To meet the needs of dynamic environmental adjustments and ensure the operational closure of each round of expanded search calculations, forming a closed cavity of square regular tessellation, the obtained initial drivable point set, the obtained dynamic obstacle points and drivable points, and the path start and end points need to be constructed as equally spaced densely distributed points. More generally, they are constructed as an integer grid. The definition of equally spaced points is as follows: , in, For all primitives and The set of points is formed by linear combinations of integers, where a and b are the integer coefficients of equally spaced grid points along two basis vectors; when constructed as an integer grid... , .
[0024] The original coordinates of any path point in the initial set of accessible path points are converted into integer-spaced coordinates using the following formula: , in, Original coordinates These are the converted integer-spaced coordinates; and These are the primitives in two orthogonal directions; Dividing by elements means dividing corresponding components of a vector. Element-wise multiplication.
[0025] Furthermore, in order to address the issues of a large set of passable points and high-concurrency path planning tasks, this invention employs a distributed processing approach to enhance overall scalability. This involves converting the initial passable path points into integer intervals and dividing them into several sub-partitions of passable path points. In subsequent path planning expansion tasks, the passability can be quickly determined by identifying the corresponding sub-partitions.
[0026] For example, to ensure that the path planning expansion calculations in each round are located in the central region and to avoid the reduction in optimality caused by boundary interference, a partitioned grid with uniform spacing is constructed according to the large-scale eight-neighborhood concept, represented as follows. ,in, , k∈Z, is positively correlated with the host's processing power. Based on this, the initial set of passable points is divided into 9 sub-partitions, such as... Figure 3 As shown. When implementing distributed processing, 9 hosts are pre-defined, and each sub-partition is associated with a host to construct a distributed hash mapping of hosts. That is, for all hosts, the identifier of the associated host is constructed with the center point of each sub-partition, and the center point is constructed as a hash point to realize the host mapping, denoted as C_hash.
[0027] Specifically, in step S2, on the one hand, the integer spacing coordinates of the passable path points in each sub-partition are obtained, and a hash table of the passable point set of each sub-partition is constructed using the integer spacing coordinates as the key. The specific process is as follows: S211. Initialize the passable point set hash table for each sub-partition. The passable point set hash table for any sub-partition includes the hash points to be stored, slot status, hash table mask, and hash table array. For example, a hashable point is defined based on the binary coordinates of the integer equal margins of the passable path points. The hashable point is defined as an integer structure containing the X coordinate point_x, the Y coordinate point_y, and the hash value point_hashvalue. The hash value point_hashvalue is calculated as follows: point_hashvalue = rol_13(rol_13(prime_5 + point_x * prime_2) * prime_1 +point_y *prime_2) * prime_1, In the formula: point_x and point_y are the X and Y coordinates of the equilateral distance of the path point, respectively; point_hashvalue is the hash value corresponding to the path point; rol_13(x) means to circularly shift x to the left by 13 bits; prime_5 is the prime constant 374761393, prime_2 is the prime constant 2246822519; prime_1 is the prime constant 2654435761.
[0028] The hash table slots include empty slots, active slots, and marked slots; the total number of active and marked slots is equal to the number of occupied slots; the marked slot is the slot for the deleted element and is counted as a dummy. The specific definition of the dot-set hash table is shown in Table 1.
[0029] Table 1
[0030] S212. Calculate the initial index using the hash table mask of the hash table of the passable point set of the corresponding sub-partition and the passable hash points to be added: Calculate the corresponding hash value based on the integer interval coordinates of each passable path point in the corresponding sub-partition to obtain the passable hash points to be added, and combine the hash table mask of the hash table of the passable point set of the sub-partition to obtain the corresponding index value to be stored. S213. Sequentially judge each index value to be stored. If the slot status of the hash table array of the sub-partition passable point set hash table under the corresponding index value is an empty slot or a marked slot, then store the corresponding integer spacing coordinates and hash value in the slot to obtain the corresponding sub-partition passable point set hash table.
[0031] It should be noted that if the available point set hash table slot under the current index is not an empty slot or a marked slot, it is necessary to determine whether the hashable point stored in the slot is completely consistent with the available hashable point to be added (i.e., the hash value, the key value of the storage point X coordinate point_x, and the key value of the point Y coordinate point_y are all equal). If they are consistent, an active slot is found, and the available hashable point already exists. If the hash value of the available point set hash table slot under the current index is consistent with the available hashable point to be added, but the key values of the storage point X coordinate point_x and the key value of the point Y coordinate point_y are different, a hash collision is considered. The current index is updated using perturbation probing and linear probing methods, and the process returns to S212 for judgment and filling.
[0032] For example, the process of constructing a hash table of the passable point set for each sub-partition is encapsulated as follows: Figure 4 The point addition process shown involves adding elements to the hash table of accessible point sets for each passable point in any sub-partition, until all passable path points in the sub-partition are added, resulting in the corresponding hash table of accessible point sets.
[0033] On the other hand, updating the corresponding sub-partition passable point set hash table based on the acquired dynamic passable points and / or obstacle points includes: converting the acquired dynamic passable points and / or obstacle points into integer-spaced coordinates, identifying the sub-partition to which they belong, and adding or deleting passable points in the corresponding sub-partition passable point set hash table to obtain the updated sub-partition passable point set hash table. The specific process is as follows: S221. Obtain dynamic passable points and / or obstacle points; It should be noted that in the field of robotics or autonomous driving, in order to build a complete autonomous system architecture, it usually includes several core functional nodes, such as perception nodes, data distribution nodes, planning nodes, etc. The search-based path planning method based on hash query neighbor point drivability of the present invention is applied to the planning node, and obtains the initial drivable path point set, real-time dynamic drivable points and / or obstacle points through a topic subscription triggering mechanism. The nodes that publish dynamic passable points and obstacle points, and the planning node where this method is located, are referred to as "this node". They are matched through a unified dynamic passable point topic and dynamic obstacle point topic identifier. That is, when the publishing node publishes the dynamic passable point and obstacle point topics to the data space, the subscribing node will obtain the corresponding topic data. For example, when subscribing on a single machine, the data is written to the historical cache of this node using shared memory, or when subscribing across machines, the data is transmitted using UDP. This triggers the dynamic passable point acquisition callback function and the dynamic obstacle point acquisition callback function. The dynamic passable point acquisition callback function executes the point addition method of the point set hash table to update the corresponding sub-partition passable point set hash table, and the dynamic obstacle point acquisition callback function executes the point deletion method of the point set hash table to update the corresponding sub-partition passable point set hash table.
[0034] S222. Convert the acquired dynamic passable points and / or obstacle points into integer-spaced coordinates as described in step S1, and identify their respective sub-regions; wherein, identifying the sub-regions to which the dynamic passable points and / or obstacle points belong includes: Calculate the center point corresponding to the transformed dynamic passable point and / or obstacle point; The set of center points of the sub-partition to which the center point belongs is determined based on the center point, and the sub-partition to which the center point belongs is identified based on the set of center points.
[0035] For example, in distributed processing, for any dynamically passable point or obstacle point P, the set S of center points of its sub-partition is calculated. C For set S C In each host identified by a given identifier, a point addition or deletion operation is performed on the hash table of the passable point set for the sub-partition. The center of the sub-partition containing that point is the set S composed of host identifiers. C Represented as: , in, Let (x, y) be the center point of the sub-region where the dynamic passable point or obstacle point is located; (x, y) are the coordinates of the eight neighboring points or the coordinates of the sub-region where the center point of the dynamic passable point or obstacle point is located at an integer interval. In other words, x belongs to -1, 0, 1 and has 3 values, y belongs to -1, 0, 1 and has 3 values, for a total of 3×3=9 values, which are defined as the coordinates of the eight neighboring points and the values of the sub-region itself.
[0036] S223. Add or delete passable points in the corresponding sub-partition passable point set hash table to obtain the updated sub-partition passable point set hash table; wherein, the addition of passable points adopts the method of... Figure 4 The methods for adding points and deleting passable points are shown below. Figure 5 As shown, the process is as follows: 1) Calculate the initial index i using the hash table mask of the corresponding sub-partition passable point set hash table and the passable hash point to be deleted. Determine whether the slot of the corresponding sub-partition passable point set hash table under the current index is an empty slot. If it is, it is considered that the passable hash point does not exist and no processing is required; otherwise, continue to 2).
[0037] 2) If the slot in the hash table of the passable point set of the corresponding sub-partition under the current index is a deleted marked slot, then skip the slot, update the current index using perturbation probing and linear probing methods, and then re-judge and delete, i.e., return 1).
[0038] 3) If the hash value of the slot in the hash table of the passable point set of the corresponding sub-partition under the current index is inconsistent with the hash value of the passable hash point, it is considered that the hashable point does not exist and no processing is required; otherwise, proceed to the next step, 4).
[0039] 4) If the slot in the hash table of the passable point set of the corresponding sub-partition under the current index is exactly the same as the passable hash point to be deleted, then set the slot as a marked slot to be deleted, and perform parameter changes and judgment to shrink the size. 5) If the hash value of the slot in the hash table of the passable point set under the current index is the same as the hash value of the passable hash point, but the key values of the storage point X coordinate point_x and point Y coordinate point_y are different, then consider that a hash collision has occurred. Update the current index using perturbation probing and linear probing methods, and then re-judge and delete, returning 1).
[0040] Specifically, in step S3, the hash table of the traversable point set of each sub-partition is used to perform search-like path planning based on the input start and end points, thereby generating the optimal collision-free global path. For example... Figure 2 As shown, the specific steps include: (1) Determine the starting and ending points of the path; (2) Initialize the candidate space of the plan, set the starting point of the path to cost 0 and add it to the candidate space; (3) Calculate the path cost function for each path point in the candidate space based on the preset path cost function, set the point with the lowest cost in the candidate space as the current point, and remove it from the candidate space; (4) Determine if the current point is the destination. If it is, obtain the forward link of the current point to get the final path and end the path planning. If not, continue to execute step (5). (5) Identify the sub-partition where the current point is located, and use the eight-neighbor extended search to calculate the eight neighboring points of the current point; (6) Use the point query method of the hash table of the traversable point set of the corresponding sub-partition to determine the traversability of neighboring points and obtain all traversable neighboring points; (7) Calculate the cost of each passable point, link the current point forward, add it to the candidate space, and return to step (3); where linking the current point forward to each passable point is to set the current point as the parent node of the passable point, which helps to switch uniformly when the shorter path changes, and also supports the acquisition of the final shortest path point.
[0041] For example, in a distributed implementation, the process of obtaining the optimal global path from the starting point to the destination includes: first, initializing the host executing the path planning and expansion task and the planned candidate space, and adding the path starting point as the current point to the candidate space; then entering the iterative expansion process: in each round of expansion, selecting the point with the minimum path cost from the candidate space as the current point for this round, and removing the current point from the candidate space; identifying the host associated with the sub-partition where the current point is located, and if the host executing the path planning and expansion task in this round is not the associated host, transferring the path planning and expansion task to the associated host, such as calculating the current point. If the center point C of the sub-partition is different from the identifier of the host executing the path planning extension task in this round, the path planning extension task is transferred to the host with the corresponding identifier. The eight-neighbor expansion is used to search for the neighbor points of the current point in this round, and the drivability of the extended neighbor points is queried from the hash table of the drivable point set of the sub-partition corresponding to the associated host. The path cost of the drivable neighbor nodes is calculated, and they are forward connected to the current point in this round and added to the candidate space. The process of each round of expansion is iterated until the candidate space is empty or the destination is found, the forward link of the current point is obtained, and the optimal global path is obtained.
[0042] Furthermore, the center point is calculated based on the following formula: , in, Let be the integer equally spaced coordinates of any point; Let P be the center point; and These are the basic elements in two orthogonal directions with equal spacing, respectively. , k∈Z; Divide by element, Element-wise multiplication.
[0043] Through the above distributed implementation, each host is mapped with a host identifier and a hash table of accessible points in the associated sub-partitions is stored. Different rounds of path planning extension calculation tasks and accessible point hash query tasks are dynamically allocated among the hosts to collaboratively complete the global path planning. Especially when facing environments with more abundant obstacles and greater complexity, the scalability and planning efficiency are greatly improved.
[0044] Furthermore, in step (6), when determining the traversability of neighboring points by executing the point query method of the point set hash table, the point query method is as follows: Figure 6 As shown, the specific process is as follows: a) Calculate the corresponding hash value based on the integer interval coordinates of the neighboring points to be queried, and obtain the form of the passable hash point corresponding to the point; use the mask of the passable point set hash table and the passable hash point to be queried to calculate the initial index i, and determine whether the slot of the passable point set hash table under the current index is an empty slot. If it is, it proves that the point is impassable, return and end, otherwise continue to execute b). b) If the slot in the passable point set hash table under the current index is a deleted marked slot, then skip the slot, update the current index using perturbation probing and linear probing methods, and then re-perform the point query judgment, returning to a); c) If the hash value of the slot in the hash table of the passable point set under the current index is inconsistent with the hash value of the passable hash point, it proves that the point is impassable. Return and end; otherwise, continue to the next step and execute d). d) If the slot in the hash table of the traversable point set under the current index is exactly the same as the traversable hash point to be queried, then the point is traversable, return and end; otherwise, continue to the next step and execute e). e) If the hash value of the slot in the hash table of the traversable point set under the current index is the same as the hash value of the traversable hash point, but the key values of the stored point X coordinate point_x and point Y coordinate point_y are different, then consider that a hash collision has occurred. Update the current index using perturbation probing and linear probing methods, and then re-perform the point query judgment, and return a).
[0045] Furthermore, to achieve dynamic path planning and ensure that the path planning process responds quickly to the updated passable hash tables of each sub-partition, the time when each path planning begins is recorded during the path planning process. The time when the hash table of each passable point set is updated is ,when When the number of change points meets a certain ratio, the possibility of changes in the accessibility of path points is considered, and then the final path points are replanned.
[0046] For example, in a distributed implementation, a pre-defined transfer host hash table is used to store the hosts and tasks involved in the transfer of computational tasks. During each round of path planning and expansion, if the center point C of the current point in this round differs from the identifier of the host executing the path planning and expansion task in this round, the path planning and expansion task is transferred to the host with the corresponding identifier. Simultaneously, the host identifier and the task at the time of transfer are stored in the transfer host hash table L. C (If the host identifier does not exist in the hash table), when route replanning is required, check the traversable points involved, i.e., whether the changed traversable points are located in the transfer host hash table L. C If so, then from L C If the path planning task for that round is extracted, it will restart for path planning extension calculation and query; otherwise, the original replanning trigger method will still be used for judgment.
[0047] Compared with existing technologies, this embodiment provides a search-based path planning method based on hash-query neighbor point descent. It unifies the initial descent point set, real-time acquired dynamic obstacle points, and dynamically descent points into a hash table of descent point sets for multiple sub-partitions, and deploys these tables on a distributed execution host. During path planning, a central point identification mechanism dynamically allocates path planning extension computation tasks among the hosts. Leveraging the efficient query and expansion characteristics of hash tables, it can quickly determine the descentability of neighbor points and plan a global path from the starting point to the destination. Figure 7 As shown, this ultimately improves the efficiency and speed of path planning.
[0048] Example 2 Another specific embodiment of the present invention discloses a path planning system based on hash query neighbor descent traversability, comprising: The subscription module is used to obtain the initial set of passable path points, and also to obtain dynamic passable points and / or obstacle points; The preprocessing module is used to convert the initial set of passable path points into integer-spaced coordinates and obtain passable path points for N sub-partitions; The hash table maintenance module is used to construct a corresponding hash table of traversable points for the sub-partition based on the traversable path points of the transformed sub-partition; it is also used to update the hash table of traversable points for the sub-partition in combination with the dynamic traversable points and / or obstacle points; The path planning module is used to perform iterative path planning and expansion tasks starting from the path origin. In each round, it queries the drivability of the expanded neighbor points from the hash table of the drivable point set of the corresponding sub-partition, and plans the path based on the drivable neighbor nodes until the optimal global path from the origin to the destination is obtained.
[0049] The system can perform path planning according to any of the methods described in Embodiment 1. Related aspects can be referenced from each other, but are not repeated in this embodiment.
[0050] Compared with the prior art, the path planning system based on hash query of neighbor point descent provided in this embodiment makes full use of the efficient query characteristics of hash table through the cooperation between various sub-modules, realizes the descent judgment of search-type path planning, greatly reduces the computational overhead, and fully meets the planning and dynamic adjustment requirements of complex obstacle environments.
[0051] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0052] 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 changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A path planning method based on hash query of neighbor traversability, characterized in that, Includes the following steps: The initial set of accessible path points is converted into integer-spaced coordinates and divided into N sub-partitions with accessible path points. Based on the passable path points of the transformed N sub-partitions and the obtained dynamic passable points and / or obstacle points, construct and update the hash table of the passable point set of each sub-partition; Starting from the path origin, an iterative path planning expansion task is performed. In each round, the drivability of the expanded neighbor points is queried from the hash table of the drivable point set of the corresponding sub-partition. The path is planned based on the drivable neighbor nodes until the optimal global path from the origin to the destination is obtained.
2. The method according to claim 1, characterized in that, Associate the sub-partition with a pre-defined N hosts; The optimal global path from the starting point to the ending point is obtained, including: Initialize the host for executing the path planning extension task and the planned candidate space, and add the path start point as the current point to the candidate space; During each round of expansion, the point with the minimum path cost is selected from the candidate space as the current point for this round, and this current point is removed from the candidate space. The host associated with the sub-partition where the current point is located is identified. If the host performing the path planning expansion task in this round is not the associated host, the path planning expansion task is transferred to the associated host. The eight-neighbor expansion is used to search for the neighbor points of the current point in this round, and the drivability of the expanded neighbor points is queried from the hash table of the drivable point set of the sub-partition corresponding to the associated host. The path cost of the drivable neighbor nodes is calculated, they are forward connected to the current point in this round, and added to the candidate space. The process of iterating through each round of expansion continues until the candidate space is empty or the destination is found. The forward link of the current point is then obtained to arrive at the optimal global path.
3. The method according to claim 2, characterized in that, The center point of each sub-partition is used as the identifier of the associated host. During each round of expansion, the host associated with the sub-partition where the current point is located is identified, including: calculating the center point C of the sub-partition where the current point is located; if the center point C is different from the identifier of the host that performs the path planning expansion task in this round, the path planning expansion task is transferred to the host with the corresponding identifier.
4. The method according to claim 3, characterized in that, The center point of the sub-partition containing any point is calculated based on the following formula. : , in, The coordinates of any point are equal intervals. and These are the basic elements in two orthogonal directions with equal spacing, respectively. , k∈Z; Divide by element, Element-wise multiplication.
5. The method according to any one of claims 1-4, characterized in that, Build and update the hash table of the passable point set for each sub-partition, including: Obtain the integer-spaced coordinates of the passable path points in each sub-partition, and construct a hash table of the passable point set for each sub-partition using the integer-spaced coordinates as the key; After converting the acquired dynamic passable points and / or obstacle points into the integer spacing coordinates, the sub-partition to which they belong is identified, and passable points are added or deleted in the corresponding sub-partition passable point set hash table to obtain the updated sub-partition passable point set hash table.
6. The method according to claim 5, characterized in that, Identifying the sub-zone to which the dynamically accessible points and / or obstacle points belong includes: Calculate the center point corresponding to the transformed dynamic passable point and / or obstacle point; The set of center points of the sub-partition to which the center point belongs is determined based on the center point, and the sub-partition to which the center point belongs is identified based on the set of center points.
7. The method according to claim 5, characterized in that, Construct a hash table of the passable point set for the corresponding sub-partition, including: The corresponding hash value is calculated based on the integer interval coordinates of each passable path point in the corresponding sub-partition, and the corresponding index value to be stored is obtained by combining the hash table mask of the hash table of the passable point set of the sub-partition. Each index value to be stored is judged sequentially. If the slot status of the hash table array of the passable point set hash table of the corresponding index value is an empty slot or a marked slot, then the corresponding integer spacing coordinates and hash value are stored in the slot to obtain the corresponding passable point set hash table of the sub-partition.
8. The method according to claim 1, characterized in that, Query the traversability of any extended neighbor point from the corresponding sub-partition traversable point set hash table, including: Calculate the corresponding hash value based on the integer interval coordinates of the neighboring points to obtain the first hash value. Combine this with the hash table mask of the hash table of the traversable point set of the sub-partition to obtain the initial index value. Using the initial index value as the current index, sequentially probe the status of each slot in the hash table of the traversable point set of the sub-partition, and determine the traversability of the path point according to the following query conditions: If the slot corresponding to the hash table of the traversable point set of the current index sub-partition is an empty slot, then the neighboring point is an intraversable point. When the slot is active, if the hash value of the slot is different from the first hash value, then the neighboring point is an inaccessible point; if the hash value of the slot is the same as the first hash value, and the coordinates stored in the slot are the same as the integer interval coordinates of the neighboring point, then the neighboring point is an accessible point; if the coordinates stored in the slot are different from the integer interval coordinates of the neighboring point, then the current index is updated using perturbation detection and linear detection methods, and the query condition judgment process is returned. When the slot status is a deleted marked slot, skip the slot, update the current index using perturbation detection and linear detection methods, and return to the query condition judgment process.
9. The method according to claim 1, characterized in that, The initial set of passable path points, dynamic passable points, and / or obstacle points are obtained through topic subscription.
10. A path planning system based on hash query neighbor traversal, characterized in that, include: The subscription module is used to obtain the initial set of passable path points, and also to obtain dynamic passable points and / or obstacle points; The preprocessing module is used to convert the initial set of passable path points into integer-spaced coordinates and obtain passable path points for N sub-partitions; The hash table maintenance module is used to construct a corresponding hash table of traversable points for the sub-partition based on the traversable path points of the transformed sub-partition; it is also used to update the hash table of traversable points for the sub-partition in combination with the dynamic traversable points and / or obstacle points; The path planning module is used to perform iterative path planning and expansion tasks starting from the path origin. In each round, it queries the drivability of the expanded neighbor points from the hash table of the drivable point set of the corresponding sub-partition, and plans the path based on the drivable neighbor nodes until the optimal global path from the origin to the destination is obtained.