CN109974725B - Road network topology construction method, navigation path calculation method and device - Google Patents

Road network topology construction method, navigation path calculation method and device Download PDF

Info

Publication number
CN109974725B
CN109974725B CN201711454514.4A CN201711454514A CN109974725B CN 109974725 B CN109974725 B CN 109974725B CN 201711454514 A CN201711454514 A CN 201711454514A CN 109974725 B CN109974725 B CN 109974725B
Authority
CN
China
Prior art keywords
point
road network
boundary
obstacle
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711454514.4A
Other languages
Chinese (zh)
Other versions
CN109974725A (en
Inventor
刘册
杨凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201711454514.4A priority Critical patent/CN109974725B/en
Publication of CN109974725A publication Critical patent/CN109974725A/en
Application granted granted Critical
Publication of CN109974725B publication Critical patent/CN109974725B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3446Details of route searching algorithms, e.g. Dijkstra, A*, arc-flags, using precalculated routes

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Navigation (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application provides a road network topology construction method, a navigation path calculation method and a navigation path calculation device. The road network topology construction method comprises the following steps: acquiring a two-dimensional coordinate point array corresponding to a target scene; each coordinate point in the two-dimensional coordinate point array corresponds to a data identifier, and the data identifier is an obstacle identifier or a road identifier; determining the boundary of each obstacle in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array; determining a vertex of each obstacle based on the boundary of each obstacle; generating a road network topology of the target scene by taking the top point of each obstacle as a road network node and taking the area corresponding to each target set as a road network road section; and any target set comprises coordinate points between two road network nodes which can be communicated. By the road network topology construction method, the high-precision road network topology of the target scene can be efficiently constructed.

Description

Road network topology construction method, navigation path calculation method and device
Technical Field
The application relates to the technical field of spatial information, in particular to a road network topology construction method, a navigation path calculation method and a navigation path calculation device.
Background
With the development of mobile internet technology and geographic information technology, location services are increasingly gaining importance. Among other things, for certain target scenarios, such as a particular outdoor environment or a complex building interior, providing accurate navigation paths for users has become a rigid requirement, which has a great market potential.
For the navigation path, the navigation path has a great relationship with the road network topology of the target scene, and the navigation path is mainly represented as follows: the accuracy of the road network topology of the target scene directly influences the accuracy of the navigation path.
Therefore, how to efficiently construct the high-precision road network topology of the target scene is an urgent problem to be solved.
Disclosure of Invention
In view of this, the present application provides a road network topology construction method and apparatus, so as to efficiently construct a high-precision road network topology of a target scene; in addition, the application also provides a navigation path calculation method so as to provide an accurate navigation path.
Specifically, the method is realized through the following technical scheme:
in a first aspect, the present application provides a road network topology construction method, including:
acquiring a two-dimensional coordinate point array corresponding to a target scene; each coordinate point in the two-dimensional coordinate point array corresponds to a data identifier, and the data identifier is an obstacle identifier or a road identifier;
determining the boundary of each obstacle in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array;
determining a vertex of each obstacle based on the boundary of each obstacle;
generating a road network topology of the target scene by taking the top point of each obstacle as a road network node and taking the area corresponding to each target set as a road network road section; and any target set comprises coordinate points between two road network nodes which can be communicated.
Optionally, the step of determining the boundary of each obstacle in the target scene based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array includes:
determining a boundary point set of each obstacle in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array;
determining the boundary of each obstacle based on the boundary point set of each obstacle.
Optionally, the step of determining a set of boundary points of each obstacle in the target scene based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array includes:
traversing target coordinate points in the two-dimensional coordinate point array, taking the currently traversed target coordinate points as starting points, and searching boundary points by using a width-first search algorithm BFS; the target coordinate point is a coordinate point of which the corresponding data identifier is an obstacle identifier;
and after the traversal is finished, obtaining a boundary point set of each obstacle in the target scene based on the searched boundary points.
Optionally, the step of determining the boundary of each obstacle based on the set of boundary points of each obstacle includes:
for each obstacle, the following operations are performed:
selecting a boundary point from the boundary point set corresponding to the obstacle as an initial detection starting point;
starting from the current detection starting point, and detecting by taking the target direction as an initial detection direction;
in the detection process, if a coordinate point which does not belong to the boundary point set is detected or a boundary point which belongs to the boundary point set but is marked is detected, the detection is continued after the detection direction is adjusted according to a preset direction adjustment sequence;
if an object boundary point which belongs to the boundary point set and is not marked is detected, marking the object boundary point, taking the object boundary point as a new detection starting point, taking the detection direction in which the object boundary point is detected as a new object direction, returning to execute the steps of starting from the current detection starting point and taking the object direction as an initial detection direction for detection until no new object boundary point is detected or the initial detection starting point is found.
Optionally, the step of determining the vertex of each obstacle based on the boundary of each obstacle includes:
for each obstacle, the following operations are performed:
selecting one boundary point in the boundary of the obstacle as an initial query starting point;
constructing a first straight line by taking a current query starting point and an auxiliary point corresponding to the current query starting point as end points, determining a first boundary point which is farthest away from the first straight line in all boundary points which are passed by the current query starting point and the corresponding auxiliary point, and if the distance between the first boundary point and the first straight line is greater than a preset threshold value, determining the first boundary point as a vertex of the obstacle; the auxiliary point corresponding to the current query starting point is a boundary point which is reached when the current query starting point starts to advance to the target step length according to the preset advancing direction in the boundary of the obstacle;
after any vertex is determined, a second straight line is constructed by taking a current query starting point and the vertex as end points, a second boundary point which is farthest away from the second straight line is determined from boundary points which are passed by the vertex and are advanced from the current query starting point, and if the distance between the second boundary point and the second straight line is larger than the preset threshold value, the second boundary point is determined as a vertex of the obstacle until the vertex is determined not to be out;
and taking a boundary point adjacent to the current query starting point in the boundary of the barrier in the preset advancing direction as a new query starting point, returning to the step of constructing a first straight line by taking the current query starting point and an auxiliary point corresponding to the current query starting point as end points, and ending when the new query starting point is the initial query starting point.
Optionally, the process of determining whether any two road network nodes are connectable includes:
constructing a linear equation about the first road network node and the second road network node; the first road network node and the second road network node are any two road network nodes;
calculating each coordinate point of a straight line crossing between the first road network node and the second road network node based on the straight line equation;
and when the data identifications corresponding to all the coordinate points spanned by the straight line are road identifications, determining that the first road network node and the second road network node can be communicated.
Optionally, before the step of determining the boundary of each obstacle in the target scene based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array, the method further includes:
traversing each coordinate point in the two-dimensional coordinate point array, determining the data identification of the coordinate point in the preset range corresponding to the currently traversed coordinate point, counting the first times of the appearance of the obstacle identification and the second times of the appearance of the road identification in the determined data identification, and updating the data identification corresponding to the times with larger numerical values in the first times and the second times into the data identification corresponding to the currently traversed coordinate point until the data identification corresponding to each coordinate point is not changed.
In a second aspect, the present application further provides a navigation path calculation method, including:
determining an initial position point and a target position point in the target road network topology; the target road network topology is a road network topology constructed based on the road network topology construction method of the first aspect of the application;
updating the target road network topology based on the starting position point and the target position point;
and determining a navigation path between the starting position point and the target position point through a preset path finding algorithm based on the updated target road network topology.
Optionally, the step of updating the target road network topology based on the starting location point and the destination location point includes:
judging whether the initial position point can be communicated with each road network node in the target road network topology;
determining a first set between the initial position point and the communicable road network nodes, and adding an area corresponding to the first set as a road network section into the target road network topology;
judging whether the target position point can be communicated with each road network node in the target road network topology;
and determining a second set between the destination position point and the connectable road network nodes, and adding the area corresponding to the second set into the target road network topology as a road network section.
Optionally, after determining the navigation path between the starting position point and the destination position point by a preset routing algorithm based on the updated target road network topology, the method further includes:
and restoring the updated target road network topology.
In a third aspect, the present application further provides a road network topology constructing apparatus, including:
the array obtaining module is used for obtaining a two-dimensional coordinate point array corresponding to the target scene; each coordinate point in the two-dimensional coordinate point array corresponds to a data identifier, and the data identifier is an obstacle identifier or a road identifier;
the barrier boundary determining unit is used for determining the boundary of each barrier in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array;
an obstacle vertex determination unit configured to determine a vertex of each of the obstacles based on a boundary of the each of the obstacles;
a road network topology generating unit, configured to generate a road network topology of the target scene, with vertices of the obstacles as road network nodes and areas corresponding to the target sets as road network links; and any target set comprises coordinate points between two road network nodes which can be communicated.
In a fourth aspect, the present application further provides a navigation path calculation apparatus, including:
the position point determining unit is used for determining a starting position point and a target position point in the target road network topology; the target road network topology is a road network topology constructed based on the road network topology construction method of the first aspect of the application;
a road network topology updating unit, configured to update the target road network topology based on the starting position point and the destination position point;
and the navigation path calculation unit is used for determining a navigation path between the initial position point and the target position point through a preset path finding algorithm based on the updated target road network topology.
In a fifth aspect, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the road network topology construction method according to the first aspect is implemented.
In a sixth aspect, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the navigation path calculation method according to the second aspect is implemented.
In a seventh aspect, the present application further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is used to execute the road network topology construction method according to the first aspect.
In an eighth aspect, the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program for executing the navigation path calculating method according to the second aspect.
In the road network topology construction method, after a two-dimensional coordinate point array corresponding to a target scene is obtained, in order to ensure the accuracy of the boundary and the vertex of each obstacle, the boundary of each obstacle in the target scene is determined based on a data identifier corresponding to each coordinate point in the two-dimensional coordinate point array, and the vertex of each obstacle is determined based on the boundary of each obstacle; furthermore, the top points of the obstacles are used as road network nodes, and the areas corresponding to the target sets are used as road network links, so that the road network topology of the target scene is generated, and the fine modeling of the road network is completed. Therefore, the road network topology construction method can efficiently construct the high-precision road network topology of the target scene.
In addition, in the navigation path calculation method provided by the application, after an initial position point and a target position point in the target road network topology are determined, the target road network topology is updated based on the initial position point and the target position point; and determining a navigation path between the initial position point and the target position point by a preset path finding algorithm based on the updated target road network topology. In the navigation path calculation method, before the path is searched, the target road network topology is updated based on the starting position point and the target position point, so that the target road network topology is fused with the related topology information of the starting position point and the target position point, and therefore, an accurate navigation path can be provided.
Drawings
Fig. 1 is a flowchart of a road network topology construction method provided in the present application;
FIG. 2 is a schematic diagram of an image effect corresponding to a two-dimensional coordinate point array in the present application;
FIG. 3 is a schematic diagram of an image effect after data cleaning of a two-dimensional coordinate point array corresponding to the image effect schematic diagram shown in FIG. 2;
FIG. 4 is a schematic diagram of the location relationships of boundary points in an exemplary set of boundary nodes in the present application;
FIG. 5 is a schematic diagram of an image effect after determining a boundary of an obstacle for a two-dimensional coordinate point array corresponding to the schematic diagram of the image effect shown in FIG. 3;
FIG. 6 is a schematic diagram of the query of the vertices of obstacles in the present application;
FIG. 7 is a schematic diagram of an image effect after determining a vertex of an obstacle for a two-dimensional coordinate point array corresponding to the schematic diagram of the image effect shown in FIG. 5;
FIG. 8 is a flow chart of a navigation path computation method provided herein;
FIG. 9 is a schematic diagram of a navigation path calculated by a navigation path calculation method provided in the present application;
fig. 10 is a schematic structural diagram of a road network topology construction device provided in the present application;
FIG. 11 is a schematic structural diagram of a navigation path calculation apparatus provided in the present application;
fig. 12 is a schematic structural diagram of an electronic device corresponding to the road network topology construction method provided in the present application;
fig. 13 is a schematic structural diagram of an electronic device corresponding to the navigation path calculation method provided in the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the prior art, the first scheme provides a path planning algorithm based on grid division and composition, and the basic idea is as follows: carrying out grid division during map modeling, wherein each grid without obstacles is used as a node in a road network; constructing a road by adjacent nodes; and, on this basis, Dijkstra's algorithm or bidirectional Dijkstra's algorithm is used for routing.
The second scheme provides a path determining method, and the basic idea is as follows: the method comprises the steps of obtaining a starting point and an end point of a path, obtaining barrier data corresponding to the starting point and the end point, obtaining a through view according to the starting point and the end point, calculating an adjacency matrix of the through view, and calculating an optimal path according to the adjacency matrix.
For the first solution, the technical disadvantages are as follows: if the grid selection is large, the grid method composition causes that a road finding result is mechanical and is not an optimal path, and is not a fine modeling of a road network; if the selected grid is small, the nodes in the road network are increased sharply, the performance of the road-finding algorithm is greatly reduced, and the road-finding result comprises a plurality of steps.
For the second scheme, the technical disadvantages are as follows: global obstacle information (including the top points and the boundaries of obstacles) is used as known information to influence the accuracy of the constructed road network topology; moreover, whether straight lines intersect with all boundaries of the obstacles needs to be judged when a road is constructed according to the vertexes of the obstacles, and the algorithm performance is low; when the road is searched, the topology of the road network is not updated by adding a starting point and a terminal point, and the road searching is not accurate enough.
Based on the above disadvantages of the prior art, the present application provides a road network topology construction method, a road network topology construction device, and an electronic device, and a navigation path calculation method, a navigation path calculation device, and an electronic device.
In a first aspect, the present application provides a road network topology construction method to efficiently construct a high-precision road network topology of a target scene.
It should be noted that the road network topology construction method provided by the present application may be applied to electronic devices. It is reasonable that the electronic device may be a terminal device or a server in a specific application.
It is emphasized that the target scenarios to which the present application relates may be indoor scenarios with respect to multi-storey buildings, single-storey buildings or cross-buildings, for example: the indoor scene can be a shopping mall, an underground parking lot, an office building and the like; of course, the target scene may also be an outdoor scene, and specifically, the outdoor scene may be a small scene area, for example: the outdoor scene may be an open parking lot, a park, a factory, a residential quarter, a school, etc.
As shown in fig. 1, the present application provides a road network topology construction method, which may include the following steps:
s101, obtaining a two-dimensional coordinate point array corresponding to a target scene; each coordinate point in the two-dimensional coordinate point array corresponds to a data identifier, and the data identifier is an obstacle identifier or a road identifier;
when the road network topology of the target scene needs to be constructed, firstly, a worker can scan the target scene through a specific scanning device to obtain map scanning data corresponding to the target scene, and then the electronic device can obtain a two-dimensional coordinate point array [ M ] [ N ] determined based on the map scanning data, wherein the two-dimensional coordinate point array comprises M × N coordinate points, the position of each coordinate point is determined through coordinate values, each coordinate point corresponds to a data identifier, and the data identifier is a road identifier or an obstacle identifier. It will be appreciated that it is reasonable that the electronic device may be a different device than the scanning device or may be the same device as the scanning device. Including but not limited to radar or laser devices.
It should be noted that, in a specific application, for convenience of machine identification, the data identifier may include two types of 0 and 1, where the obstacle identifier may be 0 and the road identifier may be 1, or the obstacle identifier may be 1 and the road identifier may be 0, which is reasonable. For example: if the obstacle identifier is 0 and the road identifier is 1, the image effect schematic diagram corresponding to the two-dimensional coordinate point array can be shown in fig. 2, wherein the pixel value of the pixel point in fig. 2 is the data identifier of the corresponding coordinate point, that is, 0 or 1, the pixel point with the pixel value of 0 is black, and the pixel point with the pixel value of 1 is white.
Optionally, in order to ensure reliability of the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array, thereby further improving accuracy of the road network topology, data cleaning may be performed on the two-dimensional coordinate point array, and then, the two-dimensional coordinate point data after data cleaning is used to construct the network topology. In order to perform data cleaning on the two-dimensional coordinate point array, the network topology construction method provided by the application may further include, after the step of obtaining the two-dimensional coordinate point array corresponding to the target scene, before the step of determining the boundary of each obstacle in the target scene based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array, the step of:
traversing each coordinate point in the two-dimensional coordinate point array, determining the data identification of the coordinate point in the preset range corresponding to the currently traversed coordinate point, counting the first times of the appearance of the obstacle identification and the second times of the appearance of the road identification in the determined data identification, and updating the data identification corresponding to the times with larger numerical values in the first times and the second times into the data identification corresponding to the currently traversed coordinate point until the data identification corresponding to each coordinate point is not changed.
By the steps, data cleaning is carried out on each coordinate point in the two-dimensional coordinate point array, and the reliability of the data identification corresponding to each coordinate point can be improved. As for the effect graph of data cleaning, referring to fig. 3, fig. 3 is a schematic diagram of the image effect after data cleaning is performed on the two-dimensional coordinate point array corresponding to the schematic diagram of the image effect shown in fig. 2.
It should be noted that the predetermined range corresponding to any coordinate point may be a range of at least one layer of coordinate points in four directions around the coordinate point, or a range of at least one layer of coordinate points in eight directions around the coordinate point, or may be another area range related to the coordinate point, and so on. The four directions around any coordinate point may be, but are not limited to, above, to the right, below, and to the left of the coordinate point; and the eight directions around any coordinate point may be above, below, to the left, to the right, above-left, below-left, above-right, and below-right of the coordinate point. For example, when data cleaning is performed, each coordinate point in the two-dimensional coordinate point array may be traversed, data identifiers of two layers of coordinate points in eight directions around the currently traversed coordinate point are determined, a first number of times that an obstacle identifier appears and a second number of times that a road identifier appears in the determined data identifiers are counted, and a data identifier corresponding to a number of times with a larger value in the first number of times and the second number of times is updated to a data identifier corresponding to the currently traversed coordinate point until the data identifier corresponding to each coordinate point does not change.
It should be emphasized that the specific implementation of data cleansing on the two-dimensional coordinate point array given above is only an example and should not be construed as limiting the present application.
S102, determining the boundary of each obstacle in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array;
after the two-dimensional coordinate point array is obtained or data cleaning is performed on the two-dimensional coordinate point array, the boundary of each obstacle in the target scene may be determined based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array.
Optionally, the step of determining the boundary of each obstacle in the target scene based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array may include:
determining a boundary point set of each barrier in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array;
and determining the boundary of each obstacle based on the boundary point set of each obstacle.
When determining the boundary of each obstacle in the target scene, a disordered boundary point set of each obstacle may be determined first, and then the disordered boundary point set is analyzed to obtain the boundary of each obstacle with ordered boundary points.
In a specific implementation manner, the step of determining a boundary point set of each obstacle in the target scene based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array may include:
traversing a target coordinate point in the two-dimensional coordinate point array, taking the currently traversed target coordinate point as an initial point, and searching a boundary point by using a BFS (Breadth First Search algorithm); the target coordinate point is a coordinate point of which the corresponding data identifier is an obstacle identifier;
and after the traversal is finished, obtaining a boundary point set of each obstacle in the target scene based on the searched boundary points.
In this specific implementation manner, the coordinate point whose corresponding data identifier is the obstacle identifier is used as a starting point, and the BFS is used to search for the boundary point, it can be understood that the searched boundary point is the coordinate point whose first corresponding data identifier searched in each direction is the road identifier. Taking the obstacle identifier as 0 and the road identifier as 1 as an example, when determining the boundary point set of each obstacle, traversing the coordinate point of which the corresponding data identifier is 0 in the two-dimensional coordinate point data, taking the coordinate point of which the currently traversed corresponding data identifier is 0 as a starting point, and searching the boundary point by using the BFS, namely the coordinate point of which the first corresponding data identifier searched in each direction is 1. It is understood that BFS belongs to a blind search method, which aims to systematically develop and check all nodes in the graph for a result; in other words, the BFS does not take into account the possible locations of the results and searches through the entire graph until a result is found.
In a specific implementation manner, the step of determining the boundary of each obstacle based on the set of boundary points of each obstacle may include:
for each obstacle, the following operations are performed:
selecting a boundary point from the boundary point set corresponding to the obstacle as an initial detection starting point;
starting from the current detection starting point, and detecting by taking the target direction as an initial detection direction;
in the detection process, if a coordinate point which does not belong to the boundary point set is detected or a boundary point which belongs to the boundary point set but is marked is detected, the detection is continued after the detection direction is adjusted according to a preset direction adjustment sequence;
if the target boundary point which belongs to the boundary point set and is not marked is detected, marking the target boundary point, taking the target boundary point as a new detection starting point, taking the detection direction in which the target boundary point is detected as a new target direction, returning to execute the steps of starting from the current detection starting point and taking the target direction as an initial detection direction for detection until no new target boundary point is detected or the initial detection starting point is found.
Since the boundary of the obstacle is a closed boundary, a boundary point may be selected from the set of boundary points corresponding to the obstacle as an initial detection starting point in a random selection manner, which is not limited to this. Moreover, after the initial detection starting point is determined, it is reasonable to randomly select a direction as the target direction corresponding to the initial detection starting point, or to use a predetermined direction as the target direction corresponding to the initial detection starting point. The predetermined direction adjustment sequence may be a clockwise sequence or a counterclockwise sequence. Taking the initial probing direction as the left side as an example, the clockwise order may be: left, upper right, lower left, or clockwise in order: left, above, right, below, etc.; and the counterclockwise order may be: left, below right, above left, or, in a counterclockwise order: left, below, right, above, etc.
For convenience of understanding, a specific implementation manner of determining the boundary of each obstacle based on the boundary point set of each obstacle is described, in which the boundary point set 1 includes four coordinate points ABCD as an example, how to specifically detect the boundary is described. As shown in fig. 4, after the boundary point set 1 is determined, selecting a point B from the boundary point set 1 as an initial detection starting point, starting with the point B, and detecting with the right side as an initial detection direction, and detecting a coordinate point on the right side of the point B, where the coordinate point on the right side of the point B does not belong to the boundary point set 1, so that the detection direction is changed to be below, and a point C is detected, and the point C belongs to the boundary point set 1 and is not marked, so that the point C is marked as a target boundary point; then, the point C is used as a new detection starting point, the lower part of the point C is used as a detection direction, a coordinate point below the point C is detected, the coordinate point below the point C does not belong to the boundary point set 1, therefore, the detection direction is changed to the left, the point D is detected, and the point D belongs to the boundary point set 1 and is not marked, therefore, the point D is marked as a target boundary point; then, the point D is set as a new detection start point, the left side of the point D is set as a detection direction, the coordinate point to the left of the point D is detected, the coordinate point to the left of the point D does not belong to the boundary point set 1, the detection direction is changed to the upper side, the point a is detected, the point a belongs to the boundary point set 1 and is not marked, the point a is marked as a target boundary point, the point a is set as a new detection start point, the upper side of the a is set as a detection direction, the coordinate point above the a is detected, the coordinate point above the point a does not belong to the boundary point set 1, the detection direction is changed to the right side, the point B is detected, the point B is set as an initial detection start point, the detection process is ended, and the boundary of the marked obstacle is BCDA.
In addition, as for the schematic effect diagram of the boundary of each obstacle, see fig. 5, fig. 5 is a schematic image effect diagram after determining the obstacle boundary for the two-dimensional coordinate point array corresponding to the schematic image effect diagram shown in fig. 3.
It should be emphasized that the specific implementation manner of the step of determining the boundary of each obstacle in the target scene based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array is given as an example only, and should not be construed as a limitation of the present application; the specific implementation of the step of determining the boundary point set of each obstacle in the target scene based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array and the specific implementation of the step of determining the boundary of each obstacle based on the boundary point set of each obstacle are also given as examples, and should not be construed as limiting the present application.
S103, determining the top point of each obstacle based on the boundary of each obstacle;
after the boundaries of each obstacle are determined, the vertices of each obstacle may be determined based on each coordinate point in the boundaries.
Optionally, the step of determining the vertex of each obstacle based on the boundary of each obstacle may include:
for each obstacle, the following operations are performed:
selecting one boundary point in the boundary of the obstacle as an initial query starting point;
constructing a first straight line by taking a current query starting point and an auxiliary point corresponding to the current query starting point as end points, determining a first boundary point which is farthest away from the first straight line in all boundary points which are passed by the current query starting point and the corresponding auxiliary point, and if the distance between the first boundary point and the first straight line is greater than a preset threshold value, determining the first boundary point as a vertex of the obstacle; the auxiliary point corresponding to the current query starting point is a boundary point which is reached when the current query starting point starts to advance to the target step length according to the preset advancing direction in the boundary of the obstacle;
after any vertex is determined, a second straight line is constructed by taking the current query starting point and the vertex as end points, a second boundary point which is farthest away from the second straight line is determined from boundary points which are passed by the vertex and are advanced from the current query starting point, and if the distance between the second boundary point and the second straight line is larger than the preset threshold value, the second boundary point is determined as a vertex of the obstacle until the vertex is determined not to be out;
and taking a boundary point adjacent to the current query starting point in the boundary of the barrier in the preset advancing direction as a new query starting point, returning to the step of constructing a first straight line by taking the current query starting point and an auxiliary point corresponding to the current query starting point as end points, and ending when the new query starting point is the initial query starting point.
It is understood that, since the boundary of the obstacle is closed, one boundary point in the boundary of the obstacle may be selected as the initial query starting point in a random manner, but is not limited thereto. In addition, in order to avoid the situation that the vertex searched based on the first straight line is incomplete, after any vertex is determined, a second straight line is constructed based on the vertex, and whether other vertices exist is inquired based on the second straight line. Describing a vertex detection idea by taking a point E in a boundary as a starting point, advancing a target step length according to a preset advancing direction and then reaching a point F to construct a straight line EF, wherein the point G is farthest from the straight line EF in each boundary point through which the point E advances to the point F, and is determined as a vertex; moreover, a straight line EG is constructed, and the condition that the EG directly has no vertex is judged; further, taking a boundary point H adjacent to the point E in the boundary of the obstacle in the preset propelling direction as a new query starting point, and repeating the query process; progress is made to determine new query starting points until the original query starting point is returned.
As for the schematic diagram of the effect of the vertex of the obstacle, see fig. 7, fig. 7 is a schematic diagram of the image effect after determining the vertex of the obstacle for the two-dimensional coordinate point array corresponding to the schematic diagram of the image effect shown in fig. 5.
It should be emphasized that the specific implementation manner for determining the vertex of each obstacle based on the boundary of each obstacle is given above only as an example, and should not be construed as limiting the present application.
S104, generating a road network topology of the target scene by taking the top point of each obstacle as a road network node and taking the area corresponding to each target set as a road network road section; and any target set comprises coordinate points between two road network nodes which can be communicated.
After the vertices of the obstacles are determined, the vertices of the obstacles may be used as road network nodes, and the areas corresponding to the target sets may be used as road network links, so as to generate a road network topology of the target scene.
Optionally, the process of determining whether any two road network nodes are connectable may include:
constructing a linear equation about the first road network node and the second road network node; the first road network node and the second road network node are any two road network nodes;
calculating each coordinate point of the straight line crossing between the first network node and the second network node based on the straight line equation;
and when the data identifications corresponding to all the coordinate points spanned by the straight line are road identifications, determining that the first road network node and the second road network node can be communicated.
Taking the obstacle identifier as 0 and the road identifier as 1 as an example, when the data identifiers corresponding to all the coordinate points spanned by the straight lines corresponding to the first road network node and the second road network node are all 1, it is determined that the first road network node and the second road network node can be communicated.
It should be emphasized that the specific implementation manner for determining whether any two road network nodes are connectable is given above only as an example, and should not be construed as a limitation to the present application.
In the road network topology construction method, after a two-dimensional coordinate point array corresponding to a target scene is obtained, in order to ensure the accuracy of the boundary and the vertex of each obstacle, the boundary of each obstacle in the target scene is determined based on a data identifier corresponding to each coordinate point in the two-dimensional coordinate point array, and the vertex of each obstacle is determined based on the boundary of each obstacle; furthermore, the top points of the obstacles are used as road network nodes, and the areas corresponding to the target sets are used as road network links, so that the road network topology of the target scene is generated, and the fine modeling of the road network is completed. Therefore, the road network topology construction method can efficiently construct the high-precision road network topology of the target scene.
In a second aspect, based on the road network topology construction method, the application further provides a navigation path calculation method to provide an accurate navigation path.
It should be noted that the navigation path calculation method provided by the present application may be applied to an electronic device. It is reasonable that the electronic device may be a terminal device or a server in a specific application.
As shown in fig. 8, a navigation path calculation method provided by the present application may include the following steps:
s201, determining an initial position point and a target position point in the target road network topology; the target road network topology is a road network topology constructed based on the road network topology construction method;
when calculating the navigation path, a starting position point and a destination position point in the target road network topology may be determined first, and then calculation of the navigation path between the starting position point and the destination position point may be performed.
It can be understood that there are various ways to determine the starting location point and the destination location point in the target road network topology. For example: in one implementation, the user can input the starting position point and the destination position point through a human-computer interaction interface; in one implementation, the user may click on the selected start location point and the destination location point in the target road network topology, and so on.
It should be emphasized that the specific implementation manner for obtaining the departure position and the destination position for the target scene is only given as an example and should not be construed as limiting the embodiments of the present invention.
S202, updating the target road network topology based on the initial position point and the target position point;
after the start position point and the destination position point are determined, the target road network topology may be updated based on the start position point and the destination position point, that is, the connectivity between the start position point and the destination position point and each road network node and road network sections between the communicable road network nodes are analyzed, so that road network sections about the start position point and the destination position point are added to the target road network topology, and the target road network topology is updated.
Specifically, the step of updating the target road network topology based on the start position point and the destination position point may include:
judging whether the initial position point can be communicated with each road network node in the target road network topology;
determining a first set between the initial position point and the communicable road network nodes, and adding an area corresponding to the first set into the target road network topology as a road network road section;
judging whether the target position point can be communicated with each road network node in the target road network topology;
and determining a second set between the destination position point and the connectable road network nodes, and adding the area corresponding to the second set into the target road network topology as a road network section.
For a specific implementation manner of determining whether the start position point and each road network node in the target road network topology can be communicated, reference may be made to the above specific implementation manner of determining whether any two road network nodes can be communicated, which is not described herein again.
And S203, determining a navigation path between the initial position point and the target position point through a preset path finding algorithm based on the updated target road network topology.
After the target road network topology is updated, a navigation path between the initial position point and the target position point can be determined through a preset road finding algorithm based on the updated target road network topology; the preset routing algorithm may be: dijkstra algorithm, best-first search (best-first search) algorithm, a-algorithm, etc. Among them, dijkstra (dijkstra) algorithm, which is a shortest path algorithm from one vertex to the rest of vertices, solves the shortest path problem in the directed graph, and briefly, the algorithm is: and accessing other adjacent nodes from the starting point, adding the node into the node set to be checked, and updating the path length value of the node to be checked by using a relaxation algorithm. Preferably, the preferential search algorithm is similar to dijkstra (dijkstra) algorithm, but has an estimated value (heuristic value) for the distance between the target points, and preferably, the preferential search algorithm does not select a node close to the starting point from the node set to be checked for the next calculation, but selects a node close to the target point; moreover, the optimal path can not be found by the prior search algorithm, but the path finding speed can be greatly improved because the heuristic method is used for guiding the path trend. The A-algorithm is the synthesis of Dijkstra algorithm and the best priority search algorithm, the A-algorithm adopts a heuristic mode, integrates the advantages of Dijkstra algorithm and the best priority search algorithm, and still can ensure that the optimal path is found.
As shown in fig. 9, fig. 9 is a schematic diagram of a navigation path calculated by using the navigation path calculation method provided by the present application, and it can be seen that the navigation path has fewer road turning points, smoother road and shorter distance.
It should be noted that, after the navigation path between the start position point and the destination position point is determined by the preset route searching algorithm based on the updated target road network topology, the updated target road network topology may be restored to provide a topology basis for subsequent route searching.
According to the navigation path calculation method, after an initial position point and a target position point in a target road network topology are determined, the target road network topology is updated based on the initial position point and the target position point; and determining a navigation path between the initial position point and the target position point by a preset path finding algorithm based on the updated target road network topology. In the navigation path calculation method, before the path is searched, the target road network topology is updated based on the starting position point and the target position point, so that the target road network topology is fused with the related topology information of the starting position point and the target position point, and therefore, an accurate navigation path can be provided.
In a third aspect, corresponding to the road network topology construction method, the present application further provides a road network topology construction device, as shown in fig. 10, the device may include:
an array obtaining module 1010, configured to obtain a two-dimensional coordinate point array corresponding to a target scene; each coordinate point in the two-dimensional coordinate point array corresponds to a data identifier, and the data identifier is an obstacle identifier or a road identifier;
an obstacle boundary determining unit 1020, configured to determine a boundary of each obstacle in the target scene based on a data identifier corresponding to each coordinate point in the two-dimensional coordinate point array;
an obstacle vertex determination unit 1030 configured to determine a vertex of each of the obstacles based on a boundary of the each of the obstacles;
a road network topology generating unit 1040, configured to generate a road network topology of the target scene, where a vertex of each obstacle is used as a road network node, and a region corresponding to each target set is used as a road network link; and any target set comprises coordinate points between two road network nodes which can be communicated.
After a two-dimensional coordinate point array corresponding to a target scene is obtained, in order to ensure the accuracy of the boundary and the vertex of each obstacle, the road network topology construction device determines the boundary of each obstacle in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array, and determines the vertex of each obstacle based on the boundary of each obstacle; furthermore, the top points of the obstacles are used as road network nodes, and the areas corresponding to the target sets are used as road network links, so that the road network topology of the target scene is generated, and the fine modeling of the road network is completed. Therefore, the road network topology construction method can efficiently construct the high-precision road network topology of the target scene.
Optionally, the obstacle boundary determination unit 1020 may include:
a boundary point set determining subunit, configured to determine, based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array, a boundary point set of each obstacle in the target scene;
a boundary determining subunit, configured to determine a boundary of each obstacle based on the set of boundary points of each obstacle.
Optionally, the boundary point set determines a subunit, and is specifically configured to:
traversing target coordinate points in the two-dimensional coordinate point array, taking the currently traversed target coordinate points as starting points, and searching boundary points by using a width-first search algorithm BFS; the target coordinate point is a coordinate point of which the corresponding data identifier is an obstacle identifier;
and after the traversal is finished, obtaining a boundary point set of each obstacle in the target scene based on the searched boundary points.
Optionally, the boundary determining subunit is specifically configured to:
for each obstacle, the following operations are performed:
selecting a boundary point from the boundary point set corresponding to the obstacle as an initial detection starting point;
starting from the current detection starting point, and detecting by taking the target direction as an initial detection direction;
in the detection process, if a coordinate point which does not belong to the boundary point set is detected or a boundary point which belongs to the boundary point set but is marked is detected, the detection is continued after the detection direction is adjusted according to a preset direction adjustment sequence;
if an object boundary point which belongs to the boundary point set and is not marked is detected, marking the object boundary point, taking the object boundary point as a new detection starting point, taking the detection direction in which the object boundary point is detected as a new object direction, returning to execute the steps of starting from the current detection starting point and taking the object direction as an initial detection direction for detection until no new object boundary point is detected or the initial detection starting point is found.
Optionally, the obstacle vertex determining unit 1030 is specifically configured to:
for each obstacle, the following operations are performed:
selecting one boundary point in the boundary of the obstacle as an initial query starting point;
constructing a first straight line by taking a current query starting point and an auxiliary point corresponding to the current query starting point as end points, determining a first boundary point which is farthest away from the first straight line in all boundary points which are passed by the current query starting point and the corresponding auxiliary point, and if the distance between the first boundary point and the first straight line is greater than a preset threshold value, determining the first boundary point as a vertex of the obstacle; the auxiliary point corresponding to the current query starting point is a boundary point which is reached when the current query starting point starts to advance to the target step length according to the preset advancing direction in the boundary of the obstacle;
after any vertex is determined, a second straight line is constructed by taking a current query starting point and the vertex as end points, a second boundary point which is farthest away from the second straight line is determined from boundary points which are passed by the vertex and are advanced from the current query starting point, and if the distance between the second boundary point and the second straight line is larger than the preset threshold value, the second boundary point is determined as a vertex of the obstacle until the vertex is determined not to be out;
and taking a boundary point adjacent to the current query starting point in the boundary of the barrier in the preset advancing direction as a new query starting point, returning to the step of constructing a first straight line by taking the current query starting point and an auxiliary point corresponding to the current query starting point as end points, and ending when the new query starting point is the initial query starting point.
Optionally, the process of determining, by the road network topology generating unit 1040, whether any two road network nodes are connectable includes:
constructing a linear equation about the first road network node and the second road network node; the first road network node and the second road network node are any two road network nodes;
calculating each coordinate point of a straight line crossing between the first road network node and the second road network node based on the straight line equation;
and when the data identifications corresponding to all the coordinate points spanned by the straight line are road identifications, determining that the first road network node and the second road network node can be communicated.
Optionally, the road network topology constructing device may further include:
and a data cleaning unit, configured to traverse each coordinate point in the two-dimensional coordinate point array before the obstacle boundary determination unit 1020 determines the boundary of each obstacle in the target scene based on the data identifier corresponding to each coordinate point in the two-dimensional coordinate point array, determine the data identifier of the coordinate point within the predetermined range corresponding to the currently traversed coordinate point, count a first number of times that the obstacle identifier appears and a second number of times that the road identifier appears in the determined data identifier, and update the data identifier corresponding to the number of times with a larger value in the first number of times and the second number of times to the data identifier corresponding to the currently traversed coordinate point until the data identifier corresponding to each coordinate point does not change.
In a fourth aspect, corresponding to the above navigation path calculating method, the present application further provides a navigation path calculating apparatus, as shown in fig. 11, the apparatus may include:
a location point determining unit 1110, configured to determine a starting location point and a destination location point in the target road network topology; the target road network topology is a road network topology constructed based on the road network topology construction method;
a road network topology updating unit 1120, configured to update the target road network topology based on the starting position point and the destination position point;
and a navigation path calculating unit 1130, configured to determine, based on the updated target road network topology, a navigation path between the start position point and the destination position point through a preset road finding algorithm.
The navigation path calculation device provided by the application updates the target road network topology based on the initial position point and the target position point after the initial position point and the target position point in the target road network topology are determined; and determining a navigation path between the initial position point and the target position point by a preset path finding algorithm based on the updated target road network topology. According to the navigation path calculation device, before the path is searched, the target road network topology is updated based on the starting position point and the target position point, so that the related topology information of the starting position point and the target position point is fused in the target road network topology, and therefore an accurate navigation path can be provided.
Optionally, the road network topology updating unit 1120 may include:
the first judging subunit is configured to judge whether the start position point is communicable with each road network node in the target road network topology;
the first joining subunit is used for determining a first set between the initial position point and the communicable road network nodes, and joining the region corresponding to the first set into the target road network topology as a road network section;
the second judging subunit is configured to judge whether the destination location point is communicable with each road network node in the target road network topology;
and the second joining subunit is used for determining a second set between the destination location point and the communicable road network nodes, and joining the region corresponding to the second set into the target road network topology as a road network section.
Optionally, the navigation path calculation device may further include:
and the restoring unit is used for restoring the updated target road network topology after the navigation path calculation unit determines the navigation path between the starting position point and the target position point through a preset road finding algorithm based on the updated target road network topology.
In a fifth aspect, corresponding to the road network topology construction method, the application further provides an electronic device. Referring to fig. 12, at the hardware level, the electronic device includes a processor 1210, an internal bus 1220, a network interface 1230, a memory 1240 and a non-volatile memory 1250, although it may also include hardware required for other services. The processor 1210 reads a corresponding computer program from the non-volatile memory 1250 into the memory 1240 and then runs the computer program to execute the road network topology construction method provided by the present application, so as to form a road network topology construction device on a logical level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
In a sixth aspect, corresponding to the navigation path calculation method, the application further provides an electronic device. Referring to fig. 13, at the hardware level, the electronic device includes a processor 1310, an internal bus 1320, a network interface 1330, a memory 1340, and a non-volatile storage 1350, but may also include hardware required for other services. The processor 1310 reads a corresponding computer program from the non-volatile memory 1350 into the memory 1340 and then operates to execute the navigation path calculation method provided by the present application, forming a navigation path calculation device on a logical level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
In a seventh aspect, the present application further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is used to execute the above road network topology construction method.
In an eighth aspect, the present application further provides a computer-readable storage medium storing a computer program for executing the navigation path calculating method.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (15)

1. A road network topology construction method is characterized by comprising the following steps:
acquiring a two-dimensional coordinate point array corresponding to a target scene; each coordinate point in the two-dimensional coordinate point array corresponds to a data identifier, and the data identifier is an obstacle identifier or a road identifier;
determining the boundary of each obstacle in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array;
determining a vertex of each obstacle based on the boundary of each obstacle;
generating a road network topology of the target scene by taking the top point of each obstacle as a road network node and taking the area corresponding to each target set as a road network road section; any target set comprises coordinate points between two road network nodes which can be communicated;
the step of determining the vertex of each obstacle based on the boundary of each obstacle comprises:
for each obstacle, the following operations are performed:
selecting one boundary point in the boundary of the obstacle as an initial query starting point;
constructing a first straight line by taking a current query starting point and an auxiliary point corresponding to the current query starting point as end points, determining a first boundary point which is farthest away from the first straight line in all boundary points which are passed by the current query starting point and the corresponding auxiliary point, and if the distance between the first boundary point and the first straight line is greater than a preset threshold value, determining the first boundary point as a vertex of the obstacle; the auxiliary point corresponding to the current query starting point is a boundary point which is reached when the current query starting point starts to advance to the target step length according to the preset advancing direction in the boundary of the obstacle;
after any vertex is determined, a second straight line is constructed by taking a current query starting point and the vertex as end points, a second boundary point which is farthest away from the second straight line is determined from boundary points which are passed by the vertex and are advanced from the current query starting point, and if the distance between the second boundary point and the second straight line is larger than the preset threshold value, the second boundary point is determined as a vertex of the obstacle until the vertex is determined not to be out;
and taking a boundary point adjacent to the current query starting point in the boundary of the barrier in the preset advancing direction as a new query starting point, returning to the step of constructing a first straight line by taking the current query starting point and an auxiliary point corresponding to the current query starting point as end points, and ending when the new query starting point is the initial query starting point.
2. The method of claim 1, wherein the step of determining the boundaries of the obstacles in the target scene based on the data identifications corresponding to the coordinate points in the two-dimensional array of coordinate points comprises:
determining a boundary point set of each obstacle in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array;
determining the boundary of each obstacle based on the boundary point set of each obstacle.
3. The method of claim 2, wherein the step of determining a set of boundary points for each obstacle in the target scene based on the data identifications corresponding to each coordinate point in the two-dimensional array of coordinate points comprises:
traversing target coordinate points in the two-dimensional coordinate point array, taking the currently traversed target coordinate points as starting points, and searching boundary points by using a width-first search algorithm BFS; the target coordinate point is a coordinate point of which the corresponding data identifier is an obstacle identifier;
and after the traversal is finished, obtaining a boundary point set of each obstacle in the target scene based on the searched boundary points.
4. The method of claim 3, wherein the step of determining the boundary of each obstacle based on the set of boundary points of each obstacle comprises:
for each obstacle, the following operations are performed:
selecting a boundary point from the boundary point set corresponding to the obstacle as an initial detection starting point;
starting from the current detection starting point, and detecting by taking the target direction as an initial detection direction;
in the detection process, if a coordinate point which does not belong to the boundary point set is detected or a boundary point which belongs to the boundary point set but is marked is detected, the detection is continued after the detection direction is adjusted according to a preset direction adjustment sequence;
if an object boundary point which belongs to the boundary point set and is not marked is detected, marking the object boundary point, taking the object boundary point as a new detection starting point, taking the detection direction in which the object boundary point is detected as a new object direction, returning to execute the steps of starting from the current detection starting point and taking the object direction as an initial detection direction for detection until no new object boundary point is detected or the initial detection starting point is found.
5. The method according to any of claims 1-4, wherein the step of determining whether any two road network nodes are connectable comprises:
constructing a linear equation about the first road network node and the second road network node; the first road network node and the second road network node are any two road network nodes;
calculating each coordinate point of a straight line crossing between the first road network node and the second road network node based on the straight line equation;
and when the data identifications corresponding to all the coordinate points spanned by the straight line are road identifications, determining that the first road network node and the second road network node can be communicated.
6. The method of claim 1, wherein prior to the step of determining the boundaries of the obstacles in the target scene based on the data identifications corresponding to the respective coordinate points in the two-dimensional array of coordinate points, the method further comprises:
traversing each coordinate point in the two-dimensional coordinate point array, determining the data identification of the coordinate point in the preset range corresponding to the currently traversed coordinate point, counting the first times of the appearance of the obstacle identification and the second times of the appearance of the road identification in the determined data identification, and updating the data identification corresponding to the times with larger numerical values in the first times and the second times into the data identification corresponding to the currently traversed coordinate point until the data identification corresponding to each coordinate point is not changed.
7. A navigation path calculation method is characterized by comprising the following steps:
determining an initial position point and a target position point in the target road network topology; wherein the target road network topology is a road network topology constructed based on the method of any one of claims 1-6;
updating the target road network topology based on the starting position point and the target position point;
and determining a navigation path between the starting position point and the target position point through a preset path finding algorithm based on the updated target road network topology.
8. The method according to claim 7, wherein said step of updating said target road network topology based on said starting location point and said destination location point comprises:
judging whether the initial position point can be communicated with each road network node in the target road network topology;
determining a first set between the initial position point and the communicable road network nodes, and adding an area corresponding to the first set as a road network section into the target road network topology;
judging whether the target position point can be communicated with each road network node in the target road network topology;
and determining a second set between the destination position point and the connectable road network nodes, and adding the area corresponding to the second set into the target road network topology as a road network section.
9. The method according to claim 7 or 8, wherein after determining the navigation path between the start position point and the destination position point by a preset routing algorithm based on the updated target road network topology, the method further comprises:
and restoring the updated target road network topology.
10. A road network topology construction device is characterized by comprising:
the array obtaining module is used for obtaining a two-dimensional coordinate point array corresponding to the target scene; each coordinate point in the two-dimensional coordinate point array corresponds to a data identifier, and the data identifier is an obstacle identifier or a road identifier;
the barrier boundary determining unit is used for determining the boundary of each barrier in the target scene based on the data identification corresponding to each coordinate point in the two-dimensional coordinate point array;
an obstacle vertex determination unit configured to determine a vertex of each of the obstacles based on a boundary of the each of the obstacles;
a road network topology generating unit, configured to generate a road network topology of the target scene, with vertices of the obstacles as road network nodes and areas corresponding to the target sets as road network links; any target set comprises coordinate points between two road network nodes which can be communicated;
the obstacle vertex unit is specifically configured to, for each obstacle, perform the following: selecting one boundary point in the boundary of the obstacle as an initial query starting point; constructing a first straight line by taking a current query starting point and an auxiliary point corresponding to the current query starting point as end points, determining a first boundary point which is farthest away from the first straight line in all boundary points which are passed by the current query starting point and the corresponding auxiliary point, and if the distance between the first boundary point and the first straight line is greater than a preset threshold value, determining the first boundary point as a vertex of the obstacle; the auxiliary point corresponding to the current query starting point is a boundary point which is reached when the current query starting point starts to advance to the target step length according to the preset advancing direction in the boundary of the obstacle; after any vertex is determined, a second straight line is constructed by taking a current query starting point and the vertex as end points, a second boundary point which is farthest away from the second straight line is determined from boundary points which are passed by the vertex and are advanced from the current query starting point, and if the distance between the second boundary point and the second straight line is larger than the preset threshold value, the second boundary point is determined as a vertex of the obstacle until the vertex is determined not to be out; and taking a boundary point adjacent to the current query starting point in the boundary of the barrier in the preset advancing direction as a new query starting point, returning to the step of constructing a first straight line by taking the current query starting point and an auxiliary point corresponding to the current query starting point as end points, and ending when the new query starting point is the initial query starting point.
11. A navigation path calculation apparatus, comprising:
the position point determining unit is used for determining a starting position point and a target position point in the target road network topology; wherein the target road network topology is a road network topology constructed based on the method of any one of claims 1-6;
a road network topology updating unit, configured to update the target road network topology based on the starting position point and the destination position point;
and the navigation path calculation unit is used for determining a navigation path between the initial position point and the target position point through a preset path finding algorithm based on the updated target road network topology.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the road network topology construction method according to any one of claims 1 to 6.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the navigation path calculation method according to any one of claims 7 to 9 when executing the program.
14. A computer-readable storage medium, characterized in that said storage medium stores a computer program for executing the road network topology construction method according to any one of the above claims 1 to 6.
15. A computer-readable storage medium, characterized in that the storage medium stores a computer program for executing the navigation path calculation method according to any one of claims 7 to 9.
CN201711454514.4A 2017-12-28 2017-12-28 Road network topology construction method, navigation path calculation method and device Active CN109974725B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711454514.4A CN109974725B (en) 2017-12-28 2017-12-28 Road network topology construction method, navigation path calculation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711454514.4A CN109974725B (en) 2017-12-28 2017-12-28 Road network topology construction method, navigation path calculation method and device

Publications (2)

Publication Number Publication Date
CN109974725A CN109974725A (en) 2019-07-05
CN109974725B true CN109974725B (en) 2022-03-08

Family

ID=67074142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711454514.4A Active CN109974725B (en) 2017-12-28 2017-12-28 Road network topology construction method, navigation path calculation method and device

Country Status (1)

Country Link
CN (1) CN109974725B (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110686693A (en) * 2019-10-14 2020-01-14 泰牛汽车技术(苏州)有限公司 Method for constructing road network information in closed scene
CN110910501B (en) * 2019-11-28 2023-10-03 深圳市信义科技有限公司 Network analysis model construction and path analysis method based on panoramic map
CN111192352B (en) * 2019-12-26 2023-07-04 广州文远知行科技有限公司 Map rendering method, map rendering device, computer equipment and storage medium
CN111750883B (en) * 2019-12-30 2022-05-10 广州极飞科技股份有限公司 Method and device for determining job path, storage medium and electronic equipment
CN111259100B (en) * 2020-01-10 2021-01-12 滴图(北京)科技有限公司 Road network topological structure construction method and device
CN111860885B (en) * 2020-07-07 2024-04-05 智能云科(沈阳)信息科技有限公司 Method for identifying process route abnormality
CN111859587B (en) * 2020-07-10 2024-04-19 万物镜像(北京)计算机***有限公司 Method and device for constructing traffic simulation road network, storage medium and electronic equipment
CN112257916B (en) * 2020-10-19 2021-06-15 上海现代建筑设计集团工程建设咨询有限公司 Method and device for generating field earthwork scheduling path based on search and electronic equipment
CN112525208B (en) * 2020-11-27 2022-06-28 青岛泛钛客科技有限公司 Method, device and equipment for quickly constructing urban road map
CN112697161A (en) * 2020-12-15 2021-04-23 上海电机学院 AGV path planning method, storage medium and terminal
CN112948517B (en) * 2021-02-26 2023-06-23 北京百度网讯科技有限公司 Regional position calibration method and device and electronic equipment
CN113159433B (en) * 2021-04-28 2022-02-22 中国科学院沈阳应用生态研究所 Dynamic navigation path searching method for integrated indoor mixed three-dimensional road network
CN113465601A (en) * 2021-05-13 2021-10-01 上海师范大学 Indoor navigation based on visual path
CN113607161B (en) * 2021-09-30 2022-03-18 深圳市普渡科技有限公司 Robot navigation path width acquisition system, method, robot and storage medium
CN113932825B (en) * 2021-09-30 2024-04-09 深圳市普渡科技有限公司 Robot navigation path width acquisition system, method, robot and storage medium
CN114119904B (en) * 2021-12-03 2022-10-04 苏州工业园区测绘地理信息有限公司 Indoor road network construction method and device and storage medium
CN114582124B (en) * 2022-03-02 2023-08-04 北京京东乾石科技有限公司 Scene editing method, device, medium and electronic equipment
CN115424446B (en) * 2022-11-03 2023-02-14 深圳市城市交通规划设计研究中心股份有限公司 Road network topology simplification method for traffic organization evaluation
CN115438453B (en) * 2022-11-03 2023-03-24 南京感动科技有限公司 Method for constructing road network facility topological structure by using observation data
CN116036603B (en) * 2023-01-28 2023-05-30 腾讯科技(深圳)有限公司 Data processing method, device, computer and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270233A (en) * 2011-07-29 2011-12-07 中国航天科技集团公司第五研究院第五一三研究所 Searching method for convex hull
CN105046052A (en) * 2015-06-19 2015-11-11 南京航空航天大学 Minimum distance calculating method of moving object in restricted space
CN106444773A (en) * 2016-10-25 2017-02-22 大连理工大学 Environment modeling method based on recursive reduced visibility graph
CN106548484A (en) * 2016-10-27 2017-03-29 济宁学院 Product model dispersion point cloud Boundary characteristic extraction method based on two-dimentional convex closure

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270233A (en) * 2011-07-29 2011-12-07 中国航天科技集团公司第五研究院第五一三研究所 Searching method for convex hull
CN105046052A (en) * 2015-06-19 2015-11-11 南京航空航天大学 Minimum distance calculating method of moving object in restricted space
CN106444773A (en) * 2016-10-25 2017-02-22 大连理工大学 Environment modeling method based on recursive reduced visibility graph
CN106548484A (en) * 2016-10-27 2017-03-29 济宁学院 Product model dispersion point cloud Boundary characteristic extraction method based on two-dimentional convex closure

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Global Path Planning for Autonomous Robots using Modified Visibility-graph";Nguyet Tran;《ICCAIS2013》;20140127;正文第317-320页 *
基于可视图的移动机器人路径规划;许斯军等;《计算机应用与软件》;20110315(第03期);正文第220-222页 *

Also Published As

Publication number Publication date
CN109974725A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN109974725B (en) Road network topology construction method, navigation path calculation method and device
CN106980633B (en) Indoor map data generation method and device
WO2017162036A1 (en) Yawing recognition method, terminal and storage medium
KR102604108B1 (en) Methods and systems for generating parking routes
CN110220521B (en) High-precision map generation method and device
CN107389079B (en) High-precision path planning method and system
CN109059924A (en) Adjoint robot Incremental Route method and system for planning based on A* algorithm
CN103186710B (en) Optimum route search method and system
CN108444490B (en) Robot path planning method based on depth fusion of visible view and A-x algorithm
CN105043400A (en) Route planning method and device
CN109668561B (en) Indoor path planning method, terminal and readable storage medium
CN103596263B (en) Method and device for position acquisition in indoor positioning
CN103714234A (en) Method and equipment for determining moving paths of objects in games
CN111123198A (en) User positioning and navigation method and system in building
JP6181595B2 (en) Map network data automatic generation device, network data automatic generation method, and network data automatic generation program
JP6999588B2 (en) Travel route prediction system, travel route prediction method, computer program
CN112114584A (en) Global path planning method of spherical amphibious robot
CN109341698B (en) Path selection method and device for mobile robot
CN105973239A (en) Method for searching shortest path of unmanned aerial vehicle
CN105698796B (en) A kind of method for searching path of multirobot scheduling system
US9047422B2 (en) Graph based routing for open areas
CN116958316B (en) Topology map generation method, device, computer equipment and storage medium
CN112800161B (en) Road network matching method and device, storage medium and electronic equipment
CN112417070B (en) Road network topology construction method and device, electronic equipment and storage medium
CN113256029A (en) In-building path finding method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant