Method, device and equipment for carrying out path search in airspace map

By performing 3D discretization and connected component detection on the airspace map, a multi-layer 2D raster map is constructed. Combined with the A* algorithm for pruning and searching the space, the memory consumption and computation speed issues of the A* algorithm in large-scale urban airspace scenarios are solved, and efficient path search is achieved.

CN121521142APending Publication Date: 2026-02-13LOW-ALTITUDE ECONOMIC BRANCH OF GUANGDONG-HONG KONG-MACAO GREATER BAY AREA DIGITAL ECONOMY RESEARCH INSTITUTE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510934711.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

The existing A* algorithm suffers from high memory consumption and high time complexity in large-scale urban spatial scenarios, making it difficult to effectively balance data memory consumption and computation speed.

Method used

By performing three-dimensional discretization on the spatial map, a multi-layer two-dimensional raster map is constructed. The search space is then pruned using connected component detection, and the A* algorithm is combined to perform path search in traversable areas, reducing the search for invalid areas.

Benefits of technology

It achieves reduced memory usage and improved search efficiency in obstacle-dense scenarios, while ensuring the optimality of the output path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121521142A_ABST
    Figure CN121521142A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device and equipment for searching a path in an airspace map, and relates to the technical field of intelligent navigation and path planning. The invention discloses a method for searching paths in an airspace map. The method comprises the following steps: acquiring a two-dimensional grid map corresponding to a preset airspace; constructing a search area in the two-dimensional grid map based on the current point and a preset end point, and judging whether a passage exists between the current point and the end point or not; determining a passable area according to a passage judgment result between the current point and the terminal point; and performing path search in the passable area through a preset first algorithm. According to the embodiment of the invention, invalid region search can be reduced, and the path search efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent navigation and path planning, in particular to a method and device for searching a path in a space map. BACKGROUND

[0002] A* algorithm is a classical heuristic search algorithm, which guides the search direction by a function f(n) = g(n) + h(n) that combines the actual cost g(n) of the path and the heuristic estimated cost h(n) (such as Manhattan distance), significantly improves the search efficiency while ensuring optimality, and is widely used in game AI, autonomous driving and other fields. However, in the urban large-scale airspace scenario, the existing A* and its improved algorithms still face the following problems:

[0003] 1) Large memory occupation

[0004] A* algorithm needs to maintain open list and closed list to store all nodes to be expanded, which easily leads to memory overflow in large-scale map. To solve this problem, Swamps can be used to detect "swamp area" in map preprocessing to accurately prune the search space, but this method has long map preprocessing time, significantly increases the initialization time, and raises the lower limit of the time complexity of pathfinding.

[0005] 2) High time complexity of pathfinding

[0006] The large scale of urban airspace map leads to exponential growth of node expansion number in A* pathfinding process, resulting in long calculation time. To solve this problem, HPA* method can be used to preprocess the map in a coarse-grained manner, first plan the rough path between regions, and then splice the optimal path within the sub-region to improve the calculation speed, but this method has high data memory occupation in the pre-processing stage. JPS method can be used to identify key jump points in the map to significantly reduce the number of expanded nodes, but this method has low pruning efficiency in the dense obstacle environment of urban map, and the performance improvement effect is limited.

[0007] Therefore, the existing methods are difficult to effectively balance the large data memory occupation in A* algorithm preprocessing and the high time complexity of pathfinding. SUMMARY

[0008] According to an aspect of the present application, a method for searching a path in a space map is provided, comprising: obtaining a two-dimensional grid map corresponding to a preset space; constructing a search area based on a current point and a preset end point in the two-dimensional grid map, and determining whether there is a passageway between the current point and the end point; determining a passable area according to the passageway determination result between the current point and the end point; and searching for a path in the passable area by a preset first algorithm.

[0009] According to some embodiments, the method for obtaining the grid map corresponding to the preset airspace comprises: performing three-dimensional discretization processing on the preset airspace to obtain a plurality of three-dimensional grid units corresponding to the preset airspace; performing binary labeling on the plurality of three-dimensional grid units according to preset flight evaluation information to obtain foreground and background corresponding to the preset airspace; performing layering processing on the plurality of three-dimensional grid units that have been binary labeled within a preset height range of the preset airspace to obtain a plurality of two-dimensional grid maps of multiple layers corresponding to the preset airspace, wherein the two-dimensional grid maps comprise a plurality of planar grid units corresponding to the plurality of three-dimensional grid units.

[0010] According to some embodiments, the method for constructing a search region in the two-dimensional grid map based on the current point and the preset terminal point and determining whether there is a passageway between the current point and the terminal point comprises: obtaining a label value matrix corresponding to the planar grid units in the search region; determining a connected region in the search region according to the label value matrix; and determining whether there is a passageway between the current point and the terminal point based on the connected region in the search region.

[0011] According to some embodiments, the method for obtaining the label value matrix corresponding to the planar grid units in the search region comprises: obtaining a label value corresponding to each planar grid unit in the search region by using a preset second algorithm, wherein different planar grid units with the same label value correspond to a connected region, and different planar grid units with different label values correspond to a non-connected region; and constructing a label value matrix based on the label value corresponding to each planar grid unit, wherein the label value matrix is consistent with the layout of the search region.

[0012] According to some embodiments, the method for determining the connected region in the search region according to the label value matrix comprises: scanning the search region to determine whether any planar grid unit in the search region belongs to the foreground corresponding to the preset airspace; in the case where any planar grid unit belongs to the foreground, obtaining the label values corresponding to the planar grid units in the neighborhood of any planar grid unit in the label value matrix to determine the label value of any planar grid unit; and determining the connected region in the search region according to the label value of any planar grid unit.

[0013] According to some embodiments, in the case that any planar grid cell belongs to the foreground, the label value corresponding to any planar grid cell in the neighborhood of any planar grid cell is obtained in the label value matrix to determine the label value of any planar grid cell, including: determining whether the scanned planar grid cells in the neighborhood of any planar grid cell belong to the foreground; in the case that none of the scanned planar grid cells in the neighborhood has a label value, or there is no scanned planar grid cell in the neighborhood, a new label value is assigned to any planar grid cell; in the case that only one of the scanned planar grid cells in the neighborhood belongs to the foreground, the label value of the scanned planar grid cell belonging to the foreground is determined as the label value of any planar grid cell; in the case that multiple planar grid cells belonging to the foreground are included in the scanned planar grid cells in the neighborhood, the minimum label value of the multiple planar grid cells belonging to the foreground is determined as the label value of any planar grid cell.

[0014] According to some embodiments, the connected region in the search region is determined according to the label value of any planar grid cell, including: after determining the label value of any planar grid cell, equivalent labels in the neighborhood are determined; the equivalent labels in the search region are merged to obtain multiple union-find sets in the search region, wherein any union-find set in the multiple union-find sets corresponds to a root label; the connected region is determined according to the multiple union-find sets.

[0015] According to some embodiments, whether there is a path between the current point and the terminal point is determined based on the connected region in the search region, including: based on the label value matrix, the label value corresponding to each planar grid cell in the connected region is replaced by the label value of the root label; the label value matrix is sorted in a predetermined order according to the label value of the root label; the label values corresponding to the current point and the terminal point are queried in the sorted label value matrix; in the case that the label value corresponding to the current point is consistent with the label value corresponding to the terminal point, it is determined that there is a path between the current point and the terminal point.

[0016] According to some embodiments, the passable region is determined according to the path determination result between the current point and the terminal point, including: obtaining a search region in the two-dimensional grid map based on the current point and the terminal point; in the case that there is a path between the current point and the terminal point, the search region is determined as the passable region, and the region outside the search region is determined as the impassable region; in the case that there is no path between the current point and the terminal point, the impassable planar grid cells in the search region are marked.

[0017] According to some embodiments, in the case that there is no path between the current point and the terminal point, the impassable planar grid cells in the search region are marked, including: in the case that the coordinates of the current planar grid cell are different from the coordinates of the current point, and the current planar grid cell and the current point belong to the same connected region, the current planar grid cell is determined as an impassable planar grid cell and is marked.

[0018] According to some embodiments, the path searching in the passable area by the preset first algorithm comprises: dynamically updating the passable area; performing iterative searching of the path between the current point and the end point in the dynamically updated passable area by the first algorithm; and determining the optimal path between the current point and the end point according to the result of the iterative searching.

[0019] According to an aspect of the present application, an apparatus for path searching in an airspace map is provided, comprising: a first execution module configured to acquire a two-dimensional grid map corresponding to a preset airspace; a second execution module configured to construct a search area in the two-dimensional grid map based on a current point and a preset end point, to determine whether there is a passable path between the current point and the end point; a third execution module configured to determine a passable area according to the determination result of the passable path between the current point and the end point; and a fourth execution module configured to perform path searching in the passable area by a preset first algorithm.

[0020] According to an aspect of the present application, an electronic device is provided, comprising: one or more processors; a storage device configured to store one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0021] According to an aspect of the present application, a computer readable storage medium is provided, which stores a computer program or instructions, and the computer program or instructions are executed by a processor to implement the method as described above.

[0022] According to the embodiments of the present application, the scene with dense obstacles can be adapted, the search space can be pruned by connected component detection, the search of invalid areas is reduced, only the local area of the map needs to be processed, the space-time overhead of map operation is small, and the memory efficiency and A* algorithm search efficiency are improved while ensuring the performance of the output path being still the optimal path.

[0023] It should be understood that the foregoing general description and the following detailed description are only exemplary and do not limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description only illustrate some embodiments of the present application.

[0025] Figure 1 A flow chart of a method for path searching in an airspace map according to an example embodiment of the present application is shown.

[0026] Figure 2 A label value matrix first embodiment according to an example embodiment of the present application is shown.

[0027] Figure 3 A label value matrix second embodiment is shown according to an example embodiment of the present application.

[0028] Figure 4 A schematic diagram of an apparatus for path search in a spatial map is shown according to an example embodiment of the present application.

[0029] Figure 5 A block diagram of an electronic device is shown according to an example embodiment of the present application. DETAILED DESCRIPTION

[0030] Example embodiments now will be described more fully hereinafter with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example embodiments to those skilled in the art. Like reference numerals refer to like elements throughout the figures, and descriptions of the same or similar elements can be not be repeated.

[0031] The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In other instances, well-known structures, methods, devices, implementations, materials, and so forth have not been described in detail in order to avoid obscuring aspects of the application.

[0032] The flow diagrams shown in the figures are merely examples and do not have to include all of the described steps or operations, nor do they have to be performed in the order described. For example, some operations can be performed in parallel, some operations can be omitted, and some operations can be combined or partially combined with other operations, and the order of some operations can be changed.

[0033] The terms "first", "second", "third", etc., in the specification and claims of the present application and the above drawings are used to distinguish different objects, and are not used to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a list of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or device.

[0034] The present application provides a method, apparatus and device for path search in a spatial map, which can improve memory efficiency and A* algorithm search efficiency.

[0035] A method, device and equipment for path searching in a spatial map according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0036] Figure 1 A flow chart of a method for path searching in a spatial map according to an example embodiment of the present application is shown.

[0037] As shown in step S100, a two-dimensional grid map corresponding to a preset spatial domain is acquired. Figure 1

[0038] For example, in step S100, the path searching device discretizes the preset spatial domain and binarizes the grid cells obtained after the discretization to form a two-dimensional grid map corresponding to the preset spatial domain.

[0039] The path searching device acquires a preset spatial domain within a preset height range of a city and discretizes the preset spatial domain in three dimensions to acquire a plurality of grid cells corresponding to the preset spatial domain.

[0040] According to some embodiments, the preset spatial domain can be a cubic space formed by a preset range of length, width and height. The path searching device uniformly divides the cubic space corresponding to the preset spatial domain along the x-axis, y-axis and z-axis into a plurality of voxels to complete the three-dimensional discretization of the preset spatial domain. Each voxel is a three-dimensional grid cell, and the size thereof can be determined according to actual scene requirements.

[0041] According to preset flight evaluation information, the path searching device binarizes the plurality of three-dimensional grid cells to acquire a foreground and a background corresponding to the preset spatial domain.

[0042] According to some embodiments, the flight evaluation information includes city geographical information, building data and no-fly zone regulations, etc.

[0043] According to some embodiments, according to the flight evaluation information, the path searching device marks a three-dimensional grid cell without obstacles and allowing flight as a passable region, and the corresponding gray value thereof is 255 and the color thereof is white. The passable region in the plurality of three-dimensional grid cells is the foreground corresponding to the preset spatial domain.

[0044] Similarly, according to the flight evaluation information, the path searching device marks a three-dimensional grid cell with obstacles or no-fly as an impassable region, and the corresponding gray value thereof is 0 and the color thereof is black. The impassable region in the plurality of three-dimensional grid cells is the background corresponding to the preset spatial domain.

[0045] ​The path searching device performs layered processing on the plurality of stereoscopic grid cells that have been binarized and marked, in a preset height range of the preset airspace, to obtain a plurality of two-dimensional grid maps of multiple layers corresponding to the preset airspace.

[0046] According to some embodiments, each of the plurality of two-dimensional grid maps of multiple layers corresponding to the preset airspace includes a plurality of planar grid cells, and the plurality of planar grid cells correspond one-to-one to the plurality of stereoscopic grid cells.

[0047] In step S200, a search area is constructed in the two-dimensional grid map based on the current point and the preset end point, and it is determined whether there is a path between the current point and the end point.

[0048] For example, in step S200, the path searching device constructs a search area in the two-dimensional grid map based on the current point and the preset end point, and determines whether there is a path between the current point and the end point in the search area.

[0049] The path searching device constructs a minimum enclosing rectangular area in the two-dimensional grid map based on the current point and the preset end point, and takes the minimum enclosing rectangular area as the search area.

[0050] The path searching device obtains a label value corresponding to each planar grid cell in the search area by a preset second algorithm.

[0051] According to some embodiments, the second algorithm can use a CCL (Connected Component Labeling) algorithm. The path searching device can obtain the label value of each planar grid cell by the second algorithm, to determine the connected regions in the search area. Wherein, the regions corresponding to different planar grid cells with the same label value are connected, and the regions corresponding to different planar grid cells with different label values are not connected.

[0052] The path searching device constructs a label value matrix based on the label value corresponding to each planar grid cell, wherein the label value matrix is consistent with the layout of the search area.

[0053] The path searching device scans the search area to determine whether any planar grid cell in the search area belongs to the foreground corresponding to the preset airspace.

[0054] According to some embodiments, the path searching device scans each planar grid cell containing the current planar grid cell and its neighborhood in the search area in the order from left to right and from top to bottom. Wherein, the neighborhood of the current planar grid cell includes the planar grid cells adjacent to the current planar grid cell in the four directions of up, down, left and right, and the planar grid cells in the four diagonal directions of top-left, top-right, bottom-left and bottom-right.

[0055] The path search device determines whether the scanned planar grid cells in the neighborhood of any planar grid cell belong to the foreground corresponding to a preset spatial domain.

[0056] If none of the scanned planar grid cells in the neighborhood have a label value, or if there are no scanned planar grid cells in the neighborhood, the path search device assigns a new label value to any planar grid cell in the label value matrix.

[0057] For example, such as Figure 2 The label value matrix shown corresponds one-to-one with multiple planar grid cells in the search area. The white areas represent the foreground, and the numbers in the white areas represent the label values ​​for each planar grid cell. The black areas represent the background, and each planar grid cell in the black areas has no label value. In the initial label value matrix, the label value corresponding to the current planar grid cell 100 is 0.

[0058] The path search device scans each planar grid cell in the search area containing the current planar grid cell and its neighbors in the order from left to right and from top to bottom. The planar grid cells in the upper left, left and upper neighboring areas of the current planar grid cell 100 will be scanned before the current planar grid cell 100.

[0059] like Figure 2 As shown, the planar grid cells to the left of the current planar grid cell 100 belong to the background and have no label values. There are no planar grid cells to its upper left or upper right. Therefore, the path search device assigns a new label value to the current planar grid cell 100. Since the maximum label value in the current label value matrix is ​​1, the path search device sets the label value of the current planar grid cell 100 to 2. This process continues until all label values ​​in the initial label value matrix have been updated.

[0060] If there is one and only one scanned planar grid cell in the neighborhood that belongs to the foreground, the path search device determines the label value of that planar grid cell in the label value matrix as the label value of any planar grid cell.

[0061] When a scanned planar grid cell in the neighborhood contains multiple planar grid cells belonging to the foreground, the path search device determines the minimum label value among the multiple planar grid cells belonging to the foreground in the label value matrix as the label value of any planar grid cell.

[0062] For example, such as Figure 3The label value matrix shown corresponds one-to-one with multiple planar grid cells in the search area. The white areas represent the foreground, and the numbers in the white areas represent the label values ​​for each planar grid cell. The black areas represent the background, and each planar grid cell in the black areas has no label value. In the initial label value matrix, the label value corresponding to the current planar grid cell 200 is 0.

[0063] The path search device scans each planar grid cell in the search area that contains the current planar grid cell and its neighbors in the order from left to right and from top to bottom. The planar grid cells in the upper left, left and upper neighboring areas of the current planar grid cell 200 will be scanned before the current planar grid cell 200.

[0064] like Figure 3 As shown, the planar grid cells in the upper left neighborhood of the current planar grid cell 200 belong to the background and have no label value. The label values ​​of the planar grid cells in its left and upper neighborhoods are 1 and 2, respectively. Therefore, the path search device sets the label value of the current planar grid cell 200 to the smallest label value of 1 among the label values ​​of the planar grid cells in its left and upper neighborhoods. This process continues until all label values ​​in the initial label value matrix have been updated.

[0065] After determining the label value of any planar grid cell, the path search device determines the equivalent label in the neighborhood of the current planar grid cell.

[0066] According to some embodiments, such as Figure 3 As shown, within the initial label value matrix, the label values ​​of the neighboring planar grid cells of the current planar grid cell 200 are different, but they can pass each other. The path search device determines that the label corresponding to the neighboring planar grid cell of the current planar grid cell 200 is an equivalent label.

[0067] The path search device merges equivalent labels in the search area to obtain multiple disjoint sets within the search area.

[0068] According to some embodiments, the path search device merges the equivalent labels in the current planar grid cell 200 and its neighboring planar grid cells into a disjoint set, and uses the minimum label value in this disjoint set as the root label of this disjoint set.

[0069] Similarly, the pathfinding device merges all equivalent labels in the search area to generate multiple disjoint sets within the search area. Each disjoint set corresponds to a root label.

[0070] The path search device determines the connected regions within the search area based on multiple disjoint sets within the search area.

[0071] According to some embodiments, each disjoint-set data structure (DFS) corresponding to a planar grid cell can form a connected region. The number of connected regions within the search region is consistent with the number of DFS elements and root labels corresponding to the search region.

[0072] Based on the label value matrix, the path search device replaces the label value corresponding to each planar grid cell in the connected region with the label value of the root label.

[0073] For example, such as Figure 3 As shown, after setting the label value of the current planar grid cell 200 to 1, the path search device sets the current planar grid cell 200 as the parent node, and the planar grid cells in the neighborhood of the current planar grid cell 200 with a label value of 2 as child nodes. The current planar grid cell 200 and its neighboring planar grid cells belong to the same connected region, and the label value of the root label corresponding to this connected region is 1.

[0074] The path search device uses a disjoint-set data structure to query the parent node (i.e., the current planar grid cell 200) corresponding to the planar grid cell (i.e., the child node) with a label value of 2, and the label value of its root label is 1. The path search device then replaces the label value of this child node in the label value matrix with the label value 1 of the root label.

[0075] Similarly, the pathfinding device replaces the label value of each planar grid cell in this connected region with 1, such as... Figure 3 The updated label value matrix is ​​shown in the figure.

[0076] Based on the tag values ​​of the root tags, the path search device sorts the tag value matrix in a preset order.

[0077] According to some embodiments, the path search device obtains all root labels with unique label values ​​in the search area, sorts them according to the order of appearance of the root labels or the order of label value size, and maps them to a label value matrix.

[0078] The path search device queries the label values ​​corresponding to the current point and the destination in the sorted label value matrix, and determines that there is a path between the current point and the destination if the label value corresponding to the current point and the label value corresponding to the destination are the same.

[0079] In step S300, the passable area is determined based on the path judgment result between the current point and the destination.

[0080] For example, in step S300, the path search device determines whether the search area is a passable area based on the path judgment result between the current point and the destination.

[0081] The path search device acquires a search area in a two-dimensional raster map based on the current point and the destination.

[0082] In the case that there is a path between the current point and the end point, the path searching device determines the search region as a passable region and determines the region outside the search region as an impassable region to perform pruning of the search region.

[0083] In the case that there is no path between the current point and the end point, the path searching device acquires the coordinates of the planar grid cells in the search region.

[0084] In the case that the coordinates of the current planar grid cell in the search region are different from the coordinates of the current point and the current planar grid cell and the current point belong to the same connected region, the path searching device determines the current planar grid cell as an impassable planar grid cell and marks it to perform pruning of the search region.

[0085] According to some embodiments, after marking the impassable planar grid cells in the search region, the path searching device re-determines whether there is a path between the current point and the end point in the two-dimensional grid map range corresponding to the preset airspace according to the method of steps S100 to S300. If there is no path between the current point and the end point in the two-dimensional grid map range, the path searching device cancels the marking of the impassable planar grid cells.

[0086] In step S400, path searching is performed in the passable region by a preset first algorithm.

[0087] For example, in step S400, the path searching device performs path searching in the determined passable region by a preset first algorithm to obtain an optimal path.

[0088] The path searching device dynamically updates the determined passable region.

[0089] According to some embodiments, the path searching device can adaptively adjust the update frequency of the passable region according to the two-dimensional grid map, which is expressed in the formula as follows.

[0090]

[0091] wherein n is the number of update intervals, λ is a dynamic adjustment coefficient, which can be 20, L map is the shortest side length of the two-dimensional grid map, L block is the side length of the planar grid cell in the two-dimensional grid map.

[0092] The path searching device performs iterative searching of the path between the current point and the end point in the dynamically updated passable region by a preset first algorithm.

[0093] According to some embodiments, the first algorithm employs the A* algorithm. The path-finding device iteratively searches within a dynamically updated traversable region using the first algorithm to determine the path between the current point and the destination.

[0094] Based on the results of the iterative search, the path search device determines the optimal path between the current point and the destination.

[0095] According to some embodiments, after performing multiple iterative searches using the first algorithm, if a path between the current point and the destination is still not found, the path search device repeats steps S100 to S400 until the optimal path is output.

[0096] According to embodiments of this application, the search space can be pruned through connected component detection, reducing the search of invalid regions and improving memory efficiency and search efficiency.

[0097] Figure 4 This diagram illustrates an apparatus for performing path search in an airspace map according to an example embodiment of this application.

[0098] like Figure 4 As shown, the path search device 300 includes a first execution module 310, a second execution module 320, a third execution module 330, and a fourth execution module 340.

[0099] The first execution module 310 acquires a preset airspace within a preset height range of the city and performs three-dimensional discretization processing on the preset airspace to obtain multiple raster units corresponding to the preset airspace.

[0100] Based on the preset flight evaluation information, the first execution module 310 performs binarization marking on multiple three-dimensional grid units to obtain the foreground and background corresponding to the preset airspace.

[0101] Within a preset height range of a preset airspace, the first execution module 310 performs layered processing on multiple three-dimensional raster units that have been binarized and marked, in order to obtain a multi-layered two-dimensional raster map corresponding to the preset airspace.

[0102] The second execution module 320 constructs a minimum bounding rectangle region in the two-dimensional grid map based on the current point and the preset endpoint, and uses this as the search area.

[0103] The second execution module 320 obtains the label value corresponding to each planar grid cell in the search area through a preset second algorithm.

[0104] The second execution module 320 constructs a tag value matrix based on the tag value corresponding to each planar grid cell, wherein the tag value matrix is ​​consistent with the layout of the search area.

[0105] The second execution module 320 scans the search region to determine whether any planar grid cell in the search region belongs to the foreground corresponding to the preset empty space.

[0106] The second execution module 320 determines whether the scanned planar grid cells in the neighborhood of any planar grid cell belong to the foreground corresponding to the preset empty space.

[0107] In a case where none of the scanned planar grid cells in the neighborhood has a label value, or there is no scanned planar grid cell in the neighborhood, the second execution module 320 assigns a new label value to any planar grid cell in the label value matrix.

[0108] In a case where only one of the scanned planar grid cells in the neighborhood belongs to the foreground, the second execution module 320 determines the label value of the planar grid cell in the label value matrix as the label value of any planar grid cell.

[0109] In a case where the scanned planar grid cells in the neighborhood include multiple planar grid cells belonging to the foreground, the second execution module 320 determines the minimum label value of the multiple planar grid cells belonging to the foreground in the label value matrix as the label value of any planar grid cell.

[0110] After determining the label value of any planar grid cell, the second execution module 320 determines the equivalent label in the neighborhood of the current planar grid cell.

[0111] The second execution module 320 merges the equivalent labels in the search region to obtain multiple union sets in the search region.

[0112] The second execution module 320 determines a connected region in the search region according to the multiple union sets in the search region.

[0113] Based on the label value matrix, the second execution module 320 replaces the label values of the planar grid cells in the connected region with the label value of the root label.

[0114] According to the label value of the root label, the second execution module 320 sorts the label value matrix in a preset order.

[0115] The second execution module 320 queries the label values corresponding to the current point and the terminal point in the sorted label value matrix, and determines that there is a path between the current point and the terminal point in a case where the label value corresponding to the current point is consistent with the label value corresponding to the terminal point.

[0116] In a case where there is a path between the current point and the terminal point, the third execution module 330 determines that the search region is a passable region, and determines that the region outside the search region is an impassable region, to prune the search region.

[0117] In the case that there is no path between the current point and the end point, the third execution module 330 acquires the coordinates of the planar grid cell in the search area.

[0118] In the case that the coordinates of the current planar grid cell in the search area are different from the coordinates of the current point, and the current planar grid cell and the current point belong to the same connected region, the third execution module 330 determines that the current planar grid cell is an impassable planar grid cell, and marks it for pruning of the search area.

[0119] The fourth execution module 340 dynamically updates the determined passable region.

[0120] The fourth execution module 340 performs iterative search of the path between the current point and the end point in the dynamically updated passable region through a preset first algorithm.

[0121] According to the result of the iterative search, the fourth execution module 340 determines the optimal path between the current point and the end point.

[0122] Figure 5 A block diagram of an electronic device according to an example embodiment of the present application is shown.

[0123] As shown in Figure 5 , the electronic device 600 is merely an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.

[0124] As shown in Figure 5 , the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 can include, but are not limited to, at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc. The storage unit stores program code that can be executed by the processing unit 610, so that the processing unit 610 performs the methods according to various example embodiments of the present application described in the present specification. For example, the processing unit 610 can perform the method as shown in Figure 1 .

[0125] The storage unit 620 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 6201 and / or a cache memory unit 6202, and can further include a read-only memory (ROM) 6203.

[0126] The storage unit 620 can also include a number of program modules 6205 that are stored in the memory 6204, including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or a combination of which can include implementation of a network environment.

[0127] The bus 630 can represent one or more of several types of bus structures, including a storage unit bus or bus for storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit bus, or a local bus using any of a variety of bus architectures.

[0128] The electronic device 600 can also communicate with one or more external devices 700 such as a keyboard, a pointing device, a Bluetooth device, etc.; other devices that enable a user to interact with the electronic device 600; and / or one or more devices that enable the electronic device 600 to communicate with one or more other computing devices. Such communication can be facilitated by an Input / Output (I / O) interface 650. Additionally, the electronic device 600 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the public network, such as the Internet, through a network adapter 660. The network adapter 660 can communicate with the other modules of the electronic device 600 through the bus 630. It should be appreciated that although not shown, other hardware and / or software modules could be used in connection with the electronic device 600. These include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0129] Those skilled in the art will readily understand that the example embodiments described herein can be implemented by software and / or by software in combination with the necessary hardware. The technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the methods according to the embodiments of the present application.

[0130] The software product can employ any combination of one or more computer readable media. The computer readable media can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0131] The computer readable storage medium can include a computer-readable medium in the form of a data signal embodied in a carrier wave, wherein the data signal modulates an electromagnetic wave, a magnetic field, or other transport mechanism. The computer readable storage medium can also include any computer-readable medium excluding propagated signals per se.

[0132] The program code can be executed by using one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, microcontrollers, programmable logic devices, application specific integrated circuits (ASICs), or the like. More generally, the program code can be executed by any one or combination of: a microprocessor, a controller, a microcontroller, a programmable logic device (PLD), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), or the like. The program code can be written in any form of programming language, including compiled or interpreted languages, and executed by using any one of the above-mentioned processors or a combination thereof.

[0133] The above-mentioned computer readable medium stores one or more programs, and when the one or more programs are executed by the device, the computer readable medium realizes the above-mentioned functions.

[0134] Those skilled in the art can understand that the above modules can be distributed in the device as described in the embodiment, and can also be changed in one or more devices different from the embodiment. The modules of the above embodiment can be combined into one module, or further split into multiple sub-modules.

[0135] The above describes the embodiments of the present application in detail, and the above embodiment is only used to help understand the method and the core idea thereof. Meanwhile, the changes or deformations made by the person skilled in the art according to the idea of the present application, based on the specific implementation and the application range of the present application, all belong to the protection range of the present application. In summary, the content of the specification should not be understood as the limitation of the present application.

Claims

1. A method of path search in a spatial map, characterized by, The method comprises: acquiring a two-dimensional grid map corresponding to a preset airspace; constructing a search area in the two-dimensional grid map based on a current point and a preset terminal point, and determining whether there is a passageway between the current point and the terminal point; determining a passable area according to a passageway determination result between the current point and the terminal point; performing path search in the passable area through a preset first algorithm.

2. The method of claim 1, wherein, The method comprises: acquiring a label value matrix corresponding to a planar grid unit in the search area; determining a connected area in the search area according to the label value matrix; determining whether there is a passageway between the current point and the terminal point based on the connected area in the search area.

3. The method of claim 2, wherein, The method comprises: scanning the search area to determine whether any planar grid unit in the search area belongs to a foreground corresponding to the preset airspace; in a case where the any planar grid unit belongs to the foreground, acquiring label values corresponding to planar grid units in a neighborhood of the any planar grid unit in the label value matrix to determine a label value of the any planar grid unit; determining a connected area in the search area according to the label value of the any planar grid unit.

4. The method of claim 3, wherein, The method comprises: determining whether the scanned planar grid units in the neighborhood belong to the foreground; in a case where none of the scanned planar grid units in the neighborhood has a label value, or there is no scanned planar grid unit in the neighborhood, assigning a new label value to the any planar grid unit; in a case where only one of the scanned planar grid units in the neighborhood belongs to the foreground, determining a label value of the scanned planar grid unit belonging to the foreground as the label value of the any planar grid unit; in a case where the scanned planar grid units in the neighborhood include multiple planar grid units belonging to the foreground, determining a minimum label value of the multiple planar grid units belonging to the foreground as the label value of the any planar grid unit.

5. The method of claim 4, wherein, The method comprises: after determining the label value of the any planar grid unit, determining equivalent labels in the neighborhood; merging equivalent labels in the search area to acquire a plurality of union-find sets in the search area, wherein any union-find set in the plurality of union-find sets corresponds to a root label; determining the connected area according to the plurality of union-find sets.

6. The method of claim 5, wherein, The method comprises: replacing, based on the label value matrix, label values corresponding to each plane grid cell in the connected region with a label value of the root label; ordering the label value matrix according to the label value of the root label in a preset order; querying, in the ordered label value matrix, label values corresponding to the current point and the terminal point respectively; in a case where the label value corresponding to the current point is consistent with the label value corresponding to the terminal point, determining that there is a path between the current point and the terminal point.

7. The method of claim 1, wherein, determining a passable region according to the path determination result between the current point and the terminal point, including: obtaining a search region constructed based on the current point and the terminal point in the two-dimensional grid map; in a case where there is a path between the current point and the terminal point, determining that the search region is the passable region, and determining that a region outside the search region is an impassable region; in a case where there is no path between the current point and the terminal point, marking plane grid cells that are impassable in the search region.

8. An apparatus for path search in a spatial map, characterized by comprising: including: a first execution module configured to obtain a two-dimensional grid map corresponding to a preset airspace; a second execution module configured to construct a search region based on a current point and a preset terminal point in the two-dimensional grid map to determine whether there is a path between the current point and the terminal point; a third execution module configured to determine a passable region according to a path determination result between the current point and the terminal point; a fourth execution module configured to perform path search in the passable region through a preset first algorithm.

9. An electronic device, comprising: including: one or more processors; a storage device configured to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method in any one of claims 1-7.

10. A computer readable storage medium having stored thereon a computer program or instructions, characterized in that, The computer program or instructions implement the method in any one of claims 1-7 when executed by a processor.