A method, device and medium for determining whether a path in a map is passable
By classifying the map paths according to the driving direction and judging the closed loop, the problem of unreasonable paths in the electronic map is solved, and the path rationality verification efficiency is improved.
Patent Information
- Application Number
- CN202310329713.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-03-30
AI Technical Summary
During the electronic map construction process, unreasonable paths such as dead-end roads, dead ends and isolated areas have problems such as low path rationality verification efficiency.
Classify the paths in the map according to the number of driving directions, determine whether the path can form a closed loop, and determine the passivity of the path through the definition of one-way path and two-way path.
The efficiency of path rationality verification is improved, and it is easy and efficient to determine whether the path is passable.
Smart Images

Figure CN116380074B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of map construction technology and provides a method, device, and medium for determining whether a path in a map is passable. Background Art
[0002] Nowadays, electronic maps have become a necessity in people's lives. Whether driving or walking, people can refer to electronic maps to find and go to their desired destination. Therefore, in the field of mapping, the construction of electronic maps is becoming increasingly important.
[0003] Since there are many objects to be built into the map and the relationships between them are complex, in the process of building an electronic map, multiple people usually work together to build the map, and then merge the maps together to form the final map. Especially when the map is relatively large, the workload of building the map is very large, and it is easy to cause unreasonable paths in the map, such as impassable dead-end roads, dead-end areas, isolated areas, areas that can only be entered but not exited, etc. Summary of the Invention
[0004] The embodiments of the present disclosure provide a method, device, and medium for determining whether a path in a map is passable, so as to improve the efficiency of verifying the rationality of the path.
[0005] The specific technical solutions provided by this disclosure are as follows:
[0006] In a first aspect, an embodiment of the present disclosure provides a method for determining whether a path in a map is navigable, comprising:
[0007] Classify multiple paths in the map according to the number of driving directions they have;
[0008] For any path in the same category, determine whether it forms a closed loop when combined with at least one other path in the same category. A closed loop is defined as a loop consisting of the paths traveled from the starting point in a clockwise or counterclockwise direction back to the starting point.
[0009] Any path is considered passable if it forms a closed loop after being spliced with at least one other path in the same class.
[0010] Optionally, before classifying the multiple paths in the map according to the number of driving directions the paths have, the method further includes:
[0011] Determine the starting points and end points of each path included in the map;
[0012] If any path start point and any path end point are connected by a straight line, a path segment is determined based on the path start point, the path end point and the straight line;
[0013] The direction from the start of the route to the end of the route is determined as the driving direction of the route segment.
[0014] Optionally, multiple paths in the map are classified according to the number of driving directions the paths have, including:
[0015] Determining the number of driving directions provided by each path segment included in the map;
[0016] If the number of driving directions is determined to be one, the type of the path is set to a one-way path;
[0017] If the number of driving directions is determined to be two, the type of the route is set to a bidirectional route.
[0018] Optionally, if the path type is a bidirectional path, for any path in the same class, determining whether any path forms a closed loop after being spliced with at least one other path in the same class includes:
[0019] For the same bidirectional path, if the starting point and the end point of any of the two path segments of the bidirectional path coincide, it is determined whether one path segment of the bidirectional path and the other path segment of the bidirectional path form a closed loop after being spliced together.
[0020] Optionally, if the path type is a bidirectional path, any path is determined to be passable if it is connected to at least one other path of the same type to form a closed loop, including:
[0021] If the path segment included in the bidirectional path and another path segment included in the bidirectional path are spliced together to form a closed loop, then the bidirectional path is determined to be passable;
[0022] If the path segment included in the bidirectional path and the other path segment included in the bidirectional path cannot form a closed loop after being spliced together, the bidirectional path is determined to be impassable, and the type of the path segment included in the bidirectional path and the other path segment included in the bidirectional path are both set to unidirectional paths.
[0023] Optionally, if the path type is a unidirectional path, for any path in the same category, determining whether any path forms a closed loop after being spliced with at least one other path in the same category includes:
[0024] If the endpoints of the path segments included in the first unidirectional path and the starting points of the path segments included in the second unidirectional path coincide with each other, and the endpoints of the path segments included in the second unidirectional path and the starting points of the path segments included in at least one third unidirectional path coincide with each other, then the first unidirectional path, the second unidirectional path, and the at least one third unidirectional path are all unidirectional paths;
[0025] It is then determined whether the first unidirectional path, the second unidirectional path, and at least one third unidirectional path form a closed loop after being spliced according to the driving direction.
[0026] Optionally, if the path type is a one-way path, any path is determined to be passable if it is connected to at least one other path of the same type to form a closed loop, including:
[0027] If the first one-way path, the second one-way path, and the at least one third one-way path can form a closed loop after being spliced according to the travel direction, then it is determined that the first one-way path, the second one-way path, and the at least one third one-way path are all passable;
[0028] If the first one-way path, the second one-way path and the at least one third one-way path cannot form a closed loop after being spliced according to the driving direction, it is determined that the first one-way path, the second one-way path and the at least one third one-way path are all impassable.
[0029] In a second aspect, an embodiment of the present disclosure further provides a device for determining whether a path in a map is passable, comprising:
[0030] A classification unit, for classifying multiple paths in the map according to the number of driving directions the paths have;
[0031] a determination unit configured to determine, for any path in the same category, whether the path, when combined with at least one other path in the same category, forms a closed loop, wherein a closed loop is a loop formed by paths traveled from a starting point in a clockwise or counterclockwise direction and then back to the starting point;
[0032] The determining unit is configured to determine that any path is passable if the path is connected with at least one other path in the same category to form a closed loop.
[0033] Optionally, before classifying the multiple paths in the map according to the number of driving directions the paths have, the method further includes:
[0034] Determine the starting points and end points of each path included in the map;
[0035] If any path start point and any path end point are connected by a straight line, a path segment is determined based on the path start point, the path end point and the straight line;
[0036] The direction from the start of the route to the end of the route is determined as the driving direction of the route segment.
[0037] Optionally, multiple paths in the map are classified according to the number of driving directions possessed by the paths, and the classification unit is used to:
[0038] Determining the number of driving directions provided by each path segment included in the map;
[0039] If the number of driving directions is determined to be one, the type of the path is set to a one-way path;
[0040] If the number of driving directions is determined to be two, the type of the route is set to a bidirectional route.
[0041] Optionally, if the path type is a bidirectional path, for any path in the same category, determining whether any path forms a closed loop after being spliced with at least one other path in the same category, the determining unit is configured to:
[0042] For the same bidirectional path, if the starting point and the end point of any of the two path segments of the bidirectional path coincide, it is determined whether one path segment of the bidirectional path and the other path segment of the bidirectional path form a closed loop after being spliced together.
[0043] Optionally, if the path type is a bidirectional path, then if any path is connected with at least one other path of the same type to form a closed loop, then the any path is determined to be passable, and the determining unit is configured to:
[0044] If the path segment included in the bidirectional path and another path segment included in the bidirectional path are spliced together to form a closed loop, then the bidirectional path is determined to be passable;
[0045] If the path segment included in the bidirectional path and the other path segment included in the bidirectional path cannot form a closed loop after being spliced together, the bidirectional path is determined to be impassable, and the type of the path segment included in the bidirectional path and the other path segment included in the bidirectional path are both set to unidirectional paths.
[0046] Optionally, if the path type is a unidirectional path, for any path in the same category, determining whether any path forms a closed loop after being spliced with at least one other path in the same category, the determining unit is configured to:
[0047] If the endpoints of the path segments included in the first unidirectional path and the starting points of the path segments included in the second unidirectional path coincide with each other, and the endpoints of the path segments included in the second unidirectional path and the starting points of the path segments included in at least one third unidirectional path coincide with each other, then the first unidirectional path, the second unidirectional path, and the at least one third unidirectional path are all unidirectional paths;
[0048] It is then determined whether the first unidirectional path, the second unidirectional path, and at least one third unidirectional path form a closed loop after being spliced according to the driving direction.
[0049] Optionally, if the path type is a one-way path, then if any path is connected with at least one other path of the same type to form a closed loop, then the any path is determined to be passable, and the determining unit is configured to:
[0050] If the first one-way path, the second one-way path, and the at least one third one-way path can form a closed loop after being spliced according to the travel direction, then it is determined that the first one-way path, the second one-way path, and the at least one third one-way path are all passable;
[0051] If the first one-way path, the second one-way path and the at least one third one-way path cannot form a closed loop after being spliced according to the driving direction, it is determined that the first one-way path, the second one-way path and the at least one third one-way path are all impassable.
[0052] In a third aspect, a smart terminal includes:
[0053] a memory for storing executable instructions;
[0054] A processor is used to read and execute executable instructions stored in a memory to implement any method of the first aspect.
[0055] In a fourth aspect, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor, the processor is enabled to execute the method described in any one of the first aspects above.
[0056] The beneficial effects of the present disclosure are as follows:
[0057] In summary, in an embodiment of the present disclosure, a method, device and medium for determining whether a path in a map is passable are provided. The method includes: classifying multiple paths in the map according to the number of driving directions possessed by the paths, and for any path in the same category, determining whether any path forms a closed loop after being spliced with at least one other path in the same category, wherein a closed loop is a loop composed of paths traversed in the process of driving from a driving starting point in a clockwise or counterclockwise direction and then returning to the driving starting point. If any path forms a closed loop after being spliced with at least one other path in the same category, then it is determined that any path is passable. In the above scheme, the paths are divided into one-way paths and two-way paths, and on this basis, the method of separately verifying whether each path is passable through a closed loop is simple and efficient, thereby improving the efficiency of verifying the rationality of the path.
[0058] Other features and advantages of the present disclosure will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present disclosure. The purposes and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0060] Figure 1 A schematic diagram of a system architecture for determining whether a path in a map is passable in an embodiment of the present disclosure;
[0061] Figure 2 Schematic diagram of a flow chart of a method for determining whether a path in a map is navigable in an embodiment of the present disclosure;
[0062] Figure 3 A schematic diagram of a process for determining a path segment and a driving direction in an embodiment of the present disclosure;
[0063] Figure 4 This is a flow chart of classifying paths according to the number of travel directions they have in an embodiment of the present disclosure;
[0064] Figure 5 Schematic diagram of the logical architecture of a device for determining whether a path in a map is passable according to an embodiment of the present disclosure;
[0065] Figure 6 Schematic diagram of the physical architecture of the smart terminal in the embodiment of the present disclosure. DETAILED DESCRIPTION
[0066] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the technical solutions of the present disclosure, but not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments described in this disclosure without making any creative efforts shall fall within the scope of protection of the technical solutions of the present disclosure.
[0067] The terms "first," "second," and the like in the description and claims of the present invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the present invention described herein can be practiced using orders other than those illustrated or described herein.
[0068] The preferred embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0069] See Figure 1 As shown, in the disclosed embodiment, the system includes at least one intelligent terminal. During implementation, each path in the map is input into the intelligent terminal, which then performs further processing such as classification and determination on each path. In the disclosed embodiment, a method for determining whether a path in a map is navigable is primarily implemented on the intelligent terminal side and is described in detail below.
[0070] See Figure 2 As shown, in the embodiment of the present disclosure, a specific process for determining whether a path in a map is passable is as follows:
[0071] Step 201: Classify multiple paths in the map according to the number of driving directions the paths have.
[0072] In an actual area (e.g., a city), roads are usually built along the terrain of the area (or building). For example, there is a river in XX city, so the direction of the roads in XX city is along the direction of the river. Specific road styles include but are not limited to one-way roads, two-way roads, three-way roads, and roads passing through intersections, etc. The above-mentioned various types of roads are intertwined.
[0073] In the embodiment of the present application, in order to uniformly consider the roads in the map, the lines used to represent the roads (i.e., paths) in the map are represented by multiple connected line segments, and the length of the line segments is not specifically limited. If the road in the map is a straight line, then the straight line can be directly cut into multiple continuous connected line segments according to a preset length. If the road in the map is not a straight line, then the bends of the road are set as interception points, and the road can be cut into multiple line segments connected at a certain angle according to a preset length (or a length less than the preset length).
[0074] Based on this, before classifying the multiple paths in the map according to the number of driving directions they have, refer to Figure 3 As shown, it also includes:
[0075] Step 1011: Determine the starting points and end points of each path included in the map.
[0076] In the process of drawing a map, in order to better identify the line segments representing the roads, the path starting point representing one endpoint of the line segment is usually represented by one symbol, and the path ending point representing the other endpoint of the line segment is represented by another symbol. It should be noted that in the embodiments of the present application, the above line segments are referred to as path segments.
[0077] During implementation, to accurately identify each road on the map, the starting points of each route on the map are first determined, for example, by searching the map one by one for symbols identical to the preset symbol A representing the route starting point. The end points of each route on the map are then determined, for example, by searching the map one by one for symbols identical to the preset symbol B representing the route ending point, and so on.
[0078] Step 1012: If any path start point and any path end point are connected by a straight line, a path segment is determined based on the path start point, the path end point and the straight line.
[0079] After determining multiple path starting points and multiple path end points included in the map, it is necessary to compare any of the path starting points and any of the path end points one by one to see whether they all belong to the same path segment. Specifically, if any of the multiple path starting points is connected to any of the multiple path end points by a straight line, then the above-mentioned any of the path starting points, any of the path end points, and the straight line will be determined as a path segment, that is, the starting point of the path segment is any of the above-mentioned path starting points, the end point of the path segment is any of the above-mentioned path end points, and the length of the path segment is the length of the above-mentioned straight line.
[0080] Considering the large number of roads in the map, the number of path segments determined according to the path starting point, the path end point, and a straight line is also multiple.
[0081] Step 1013: Determine the direction from the path starting point to the path end point as the driving direction of the path segment.
[0082] After determining the plurality of path segments, the driving direction of the path segment is further determined. The driving direction is the direction from the starting point of the path to the end point of the path. The specific direction of the driving direction is not specifically limited.
[0083] Since a path segment corresponds to only one path starting point and one path ending point, the driving direction of a path segment is also uniquely determined.
[0084] Then, the multiple paths in the map are classified according to the number of driving directions they have. Figure 4 Shown, including:
[0085] Step 2011: Determine the number of driving directions included in the path segments of each path in the map.
[0086] In this embodiment of the present application, after dividing a path into multiple segments based on length, the number of travel directions for each segment is also counted. For example, a path corresponding to a one-way street has one segment and, accordingly, one travel direction, which is the direction from the starting point of the segment to the end point.
[0087] Taking into account the inevitable errors in the mapping process, for example, the driving direction of a path segment is marked as pointing from the path start point to the path end point, and at the same time marked as pointing from the path end point to the path start point. In order to effectively detect such errors, during the implementation process, for each path in the map, the number of path segments included in the path and the number of driving directions of each path segment are determined.
[0088] Step 2012: If it is determined that the number of driving directions is one, the type of the path is set to a one-way path.
[0089] During the implementation process, for any path, if the number of determined driving directions is one, it means that the path includes one path segment, and the path segment corresponds to one driving direction. In this case, the path type is set to a one-way path.
[0090] It should be noted that for any path, if there are two determined driving directions and the path consists of only one segment, the segment is considered impassable. Alternatively, if the determined driving direction does not point from the path starting point to the path ending point, the segment is also considered impassable.
[0091] Step 2013: If it is determined that the number of driving directions is two, the type of the path is set to a bidirectional path.
[0092] During the implementation process, for any path, if the number of determined driving directions is two, and at the same time, the number of path segments included in the path is determined to be two, and the driving direction corresponding to each path segment is from the path starting point to the path end point, in this case, the path type is set to a bidirectional path.
[0093] It should be noted that, for any path, if the number of determined driving directions is greater than two, that is, a line segment has at least three directions at the same time, in this case, the path segment is determined to be impassable.
[0094] Step 202: For any path in the same category, determine whether any path forms a closed loop after being spliced with at least one other path in the same category, where a closed loop is a loop formed by the paths traveled in the process of traveling from the starting point in a clockwise or counterclockwise direction and then returning to the starting point.
[0095] In the embodiment of the present application, after the paths are divided into bidirectional paths and unidirectional paths, whether the bidirectional paths constitute a closed loop is first determined, and then whether the unidirectional paths constitute a closed loop is determined.
[0096] Case 1: If the path type is a bidirectional path, for any path in the same class, determine whether the path forms a closed loop when spliced with at least one other path in the same class, including:
[0097] For the same bidirectional path, if the starting point and the end point of any of the two path segments of the bidirectional path coincide, it is determined whether one path segment of the bidirectional path and the other path segment of the bidirectional path form a closed loop after being spliced together.
[0098] Considering that the same bidirectional route includes two path segments and the travel directions of the two path segments are opposite, during implementation, it is first determined whether any path starting point and any path ending point of the two path segments of the same bidirectional route coincide with each other.
[0099] For example, a bidirectional path a includes two path segments a1 and a2. The starting point of path segment a1 is a11, and the end point of path segment a1 is a12. The starting point of path segment a2 is a21, and the end point of path segment a2 is a22. A determination is made as to whether any starting point and any end point in the two path segments coincide, i.e., whether the distance between the starting point a11 and the end point a22 is less than a preset distance. Alternatively, a determination is made as to whether the distance between the starting point a12 and the end point a21 is less than a preset distance. If either distance is less than the preset distance, it is determined that any starting point and any end point in the two path segments coincide.
[0100] Furthermore, it is determined whether a path segment included in the bidirectional path and another path segment included in the bidirectional path form a closed loop after being spliced together. That is, the overlapping path starting point and path end point are abstracted as a single point, and it is determined whether the path segment and the other path segment form a closed loop after being spliced together.
[0101] Case 2: If the path type is a one-way path, for any path in the same class, determine whether the path forms a closed loop when combined with at least one other path in the same class, including:
[0102] If the path endpoints of the path segments included in the first unidirectional path coincide with the path starting points of the path segments included in the second unidirectional path, and the path endpoints of the path segments included in the second unidirectional path coincide with the path starting points of the path segments included in at least one third unidirectional path, then the first unidirectional path, the second unidirectional path, and the at least one third unidirectional path are all unidirectional paths.
[0103] Considering that at least three line segments of the unidirectional path type can form a closed loop, in the embodiment of the present application, a first unidirectional path, a second unidirectional path and at least one third unidirectional path of the unidirectional path type are used for illustration.
[0104] During implementation, a determination is first made as to whether the endpoints of the path segments included in the first unidirectional path coincide with the starting points of the path segments included in the second unidirectional path. Specifically, a determination is made as to whether the distance between the endpoints and starting points is less than a preset distance. If this distance is less than the preset distance, the determination is made as to whether the endpoints of the path segments included in the first unidirectional path coincide with the starting points of the path segments included in the second unidirectional path. The same determination is then continued using the same method to determine whether the endpoints of the path segments included in the second unidirectional path coincide with the starting points of the path segments included in at least one third unidirectional path, until the last unidirectional path participating in the current splicing is reached.
[0105] It is then determined whether the first unidirectional path, the second unidirectional path, and at least one third unidirectional path form a closed loop after being spliced according to the driving direction.
[0106] When it is determined that the path end point of the path segment included in the first one-way path and the path starting point of the path segment included in the second one-way path coincide with each other, and the path end point of the path segment included in the second one-way path and the path starting point of the path segment included in at least one third one-way path also coincide with each other, it is determined whether the first one-way path, the second one-way path and the at least one third one-way path form a closed loop after being spliced together according to the direction of travel, that is, each of the above-mentioned overlapping path starting points and path end points is abstracted as a point, and it is determined whether the above-mentioned first one-way path, the second one-way path and the at least one third one-way path form a closed loop after being spliced together according to the direction of travel and passing through the above-mentioned overlapping points in sequence.
[0107] Step 203: If any path is connected with at least one other path in the same category to form a closed loop, then the any path is determined to be passable.
[0108] Since, in the embodiment of the present application, the types of paths include unidirectional paths and bidirectional paths, the corresponding passability determination situations are also divided into the following two situations:
[0109] Case 1: If the path type is a bidirectional path, any path is considered passable if it is connected to at least one other path of the same type to form a closed loop, including:
[0110] (1) If a path segment included in a bidirectional path and another path segment included in a bidirectional path are spliced together to form a closed loop, then the bidirectional path is determined to be passable.
[0111] During the implementation process, if, taking the path starting point of a path segment included in the bidirectional path as the starting point, after passing through the overlapping points, that is, the path end point of one path segment and the path starting point of another path segment in sequence, that is, after splicing in the above-mentioned direction, the path starting point of the above-mentioned path segment and the path end point of the above-mentioned path segment can also coincide, then it is determined that the path segment included in the bidirectional path and the other path segment included in the bidirectional path can form a closed loop after splicing. In this case, it is determined that the bidirectional path is passable.
[0112] It should be noted that the above direction may be the driving direction or the opposite direction of the driving direction.
[0113] (2) If the path segment included in the bidirectional path and the other path segment included in the bidirectional path cannot form a closed loop after being spliced together, the bidirectional path is determined to be impassable, and the types of the path segment included in the bidirectional path and the other path segment included in the bidirectional path are both set to unidirectional paths.
[0114] During implementation, if, taking the path starting point of a path segment included in the bidirectional path as the starting point, after passing through the overlapping points, that is, the path end point of one path segment and the path starting point of another path segment in sequence, that is, after splicing in the above-mentioned direction, the path starting point of the above-mentioned one path segment and the path end point of the above-mentioned other path segment cannot coincide, then it is determined that the path segment included in the bidirectional path and the other path segment included in the bidirectional path cannot form a closed loop after splicing. In this case, it is determined that the bidirectional path is not passable.
[0115] Considering that the impassability of a two-way path may be caused by mistakenly drawing a one-way path as a two-way path, based on this, during the implementation process, on the basis of determining that the two-way path is impassable, the path segment included in the two-way path and the other path segment included in the two-way path are further set to the type of a one-way path. In this way, the above two path segments can be judged again as one-way paths to determine whether they are impassable. If they are impassable, the two path segments are determined to be reasonable one-way paths; if they are determined to be impassable, the one-way paths corresponding to the two path segments are determined to be impassable one-way paths.
[0116] Case 2: If the path type is a one-way path, any path is considered passable if it is connected to at least one other path of the same type to form a closed loop, including:
[0117] 1) If the first one-way path, the second one-way path, and the at least one third one-way path can form a closed loop after being spliced according to the travel direction, then it is determined that the first one-way path, the second one-way path, and the at least one third one-way path are all passable.
[0118] During the implementation process, if, taking the starting point of the first one-way path as the starting point, the paths pass through the overlapping points in sequence, i.e., the overlapping point between the first one-way path and the second one-way path, the overlapping point between the second one-way path and the third one-way path...the overlapping point between the Nth one-way path and the N+1th one-way path included in at least one third one-way path, that is, after splicing according to the driving direction, the starting point of the first one-way path and the end point of the last third one-way path can also coincide, then it is determined that the first one-way path, the second one-way path and the at least one third one-way path can form a closed loop after splicing. In this case, it is determined that the first one-way path, the second one-way path and the at least one third one-way path are all passable.
[0119] 2) If the first one-way path, the second one-way path, and the at least one third one-way path cannot form a closed loop after being spliced according to the travel direction, then it is determined that the first one-way path, the second one-way path, and the at least one third one-way path are all impassable.
[0120] During implementation, if, taking the starting point of the first one-way path as the starting point, the paths pass through the overlapping points in sequence, i.e., the overlapping point between the first one-way path and the second one-way path, the overlapping point between the second one-way path and the third one-way path...the overlapping point between the Nth one-way path and the N+1th one-way path included in at least one third one-way path, that is, after splicing according to the driving direction, the starting point of the first one-way path and the end point of the last third one-way path cannot overlap, then it is determined that the first one-way path, the second one-way path and the at least one third one-way path cannot form a closed loop after splicing. In this case, it is determined that the first one-way path, the second one-way path and the at least one third one-way path are impassable.
[0121] Based on the same inventive concept, see Figure 5 As shown, an embodiment of the present disclosure provides a device for determining whether a path in a map is passable, including:
[0122] A classification unit 501 is used to classify multiple paths in the map according to the number of driving directions the paths have;
[0123] A determination unit 502 is configured to determine, for any path in the same category, whether the path, when combined with at least one other path in the same category, forms a closed loop, where a closed loop is defined as a loop formed by paths traveled from a starting point in a clockwise or counterclockwise direction and then back to the starting point.
[0124] The determining unit 503 is configured to determine that any path is passable if any path is connected with at least one other path in the same category to form a closed loop.
[0125] Optionally, before classifying the multiple paths in the map according to the number of driving directions the paths have, the method further includes:
[0126] Determine the starting points and end points of each path included in the map;
[0127] If any path start point and any path end point are connected by a straight line, a path segment is determined based on the path start point, the path end point and the straight line;
[0128] The direction from the start of the route to the end of the route is determined as the driving direction of the route segment.
[0129] Optionally, the multiple paths in the map are classified according to the number of driving directions possessed by the paths, and the classification unit 501 is configured to:
[0130] Determining the number of driving directions provided by each path segment included in the map;
[0131] If the number of driving directions is determined to be one, the type of the path is set to a one-way path;
[0132] If the number of driving directions is determined to be two, the type of the route is set to a bidirectional route.
[0133] Optionally, if the path type is a bidirectional path, for any path in the same category, determining whether any path forms a closed loop after being spliced with at least one other path in the same category, the determining unit 502 is configured to:
[0134] For the same bidirectional path, if the starting point and the end point of any of the two path segments of the bidirectional path coincide, it is determined whether one path segment of the bidirectional path and the other path segment of the bidirectional path form a closed loop after being spliced together.
[0135] Optionally, if the path type is a bidirectional path, then if any path is connected with at least one other path of the same type to form a closed loop, then the any path is determined to be passable, and the determining unit 503 is configured to:
[0136] If the path segment included in the bidirectional path and another path segment included in the bidirectional path are spliced together to form a closed loop, then the bidirectional path is determined to be passable;
[0137] If the path segment included in the bidirectional path and the other path segment included in the bidirectional path cannot form a closed loop after being spliced together, the bidirectional path is determined to be impassable, and the type of the path segment included in the bidirectional path and the other path segment included in the bidirectional path are both set to unidirectional paths.
[0138] Optionally, if the path type is a unidirectional path, for any path in the same category, determining whether any path forms a closed loop after being spliced with at least one other path in the same category, the determining unit 502 is configured to:
[0139] If the endpoints of the path segments included in the first unidirectional path and the starting points of the path segments included in the second unidirectional path coincide with each other, and the endpoints of the path segments included in the second unidirectional path and the starting points of the path segments included in at least one third unidirectional path coincide with each other, then the first unidirectional path, the second unidirectional path, and the at least one third unidirectional path are all unidirectional paths;
[0140] It is then determined whether the first unidirectional path, the second unidirectional path, and at least one third unidirectional path form a closed loop after being spliced according to the driving direction.
[0141] Optionally, if the path type is a one-way path, if any path is connected with at least one other path of the same type to form a closed loop, then the any path is determined to be passable, and the determining unit 503 is configured to:
[0142] If the first one-way path, the second one-way path, and the at least one third one-way path can form a closed loop after being spliced according to the travel direction, then it is determined that the first one-way path, the second one-way path, and the at least one third one-way path are all passable;
[0143] If the first one-way path, the second one-way path and the at least one third one-way path cannot form a closed loop after being spliced according to the driving direction, it is determined that the first one-way path, the second one-way path and the at least one third one-way path are all impassable.
[0144] Based on the same inventive concept, see Figure 6 As shown, an embodiment of the present disclosure provides a smart terminal, including: a memory 601 for storing executable instructions; a processor 602 for reading and executing the executable instructions stored in the memory, and executing any one of the methods of the first aspect above.
[0145] Based on the same inventive concept, an embodiment of the present disclosure provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute the method described in any one of the first aspects above.
[0146] In summary, in an embodiment of the present disclosure, a method, device and medium for determining whether a path in a map is passable are provided. The method includes: classifying multiple paths in the map according to the number of driving directions possessed by the paths, and for any path in the same category, determining whether any path forms a closed loop after being spliced with at least one other path in the same category, wherein a closed loop is a loop composed of paths traversed in the process of driving from a driving starting point in a clockwise or counterclockwise direction and then returning to the driving starting point. If any path forms a closed loop after being spliced with at least one other path in the same category, then it is determined that any path is passable. In the above scheme, the paths are divided into one-way paths and two-way paths, and on this basis, the method of separately verifying whether each path is passable through a closed loop is simple and efficient, thereby improving the efficiency of verifying the rationality of the path.
[0147] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program product systems. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product system implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0148] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program product systems according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0149] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0151] Obviously, those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include these modifications and variations.
Claims
1. A method for determining whether a path in a map is navigable, characterized in that: The method comprises: Classify multiple paths in the map according to the number of driving directions they have; For any path in the same category, determine whether the path, when combined with at least one other path in the same category, forms a closed loop, where the closed loop is defined as a loop consisting of paths traveled from a starting point in a clockwise or counterclockwise direction and then back to the starting point; If any one of the paths is connected with at least one other path in the same category to form a closed loop, then the any one of the paths is determined to be passable.
2. The method according to claim 1, wherein Before classifying the multiple paths in the map according to the number of travel directions possessed by the paths, the method further includes: Determine the starting points and end points of each path included in the map; If any one of the path starting points and any one of the path end points are connected by a straight line, a path segment is determined based on the path starting point, the path end point and the straight line; The direction from the path starting point to the path end point is determined as the driving direction of the path segment.
3. The method according to claim 2, wherein The method of classifying the multiple paths in the map according to the number of driving directions the paths have includes: Determining the number of driving directions provided by the path segments included in each path in the map; If it is determined that the number of the driving directions is one, the type of the path is set to a one-way path; If it is determined that the number of the driving directions is two, the type of the path is set to a bidirectional path.
4. The method according to claim 3, wherein If the path type is a bidirectional path, determining, for any path in the same category, whether the path forms a closed loop after being spliced with at least one other path in the same category includes: For the same bidirectional path, if the starting point and the end point of any one of the two path segments included in the bidirectional path coincide with each other, it is determined whether one of the path segments included in the bidirectional path and the other path segment included in the bidirectional path form a closed loop after being spliced together.
5. The method according to claim 3, wherein If the type of the path is a bidirectional path, then if any one of the paths is connected with at least one other path of the same type to form a closed loop, determining that the any one of the paths is passable includes: If the path segment included in the bidirectional path and another path segment included in the bidirectional path are spliced to form a closed loop, then the bidirectional path is determined to be passable; If the path segment included in the bidirectional path and the other path segment included in the bidirectional path cannot form a closed loop after splicing, the bidirectional path is determined to be impassable, and the types of the path segment included in the bidirectional path and the other path segment included in the bidirectional path are both set to unidirectional paths.
6. The method according to claim 3, wherein If the path type is a unidirectional path, determining, for any path in the same category, whether the path forms a closed loop after being spliced with at least one other path in the same category includes: If the path endpoint of the path segment included in the first unidirectional path and the path starting point of the path segment included in the second unidirectional path coincide with the path endpoint of the path segment included in the second unidirectional path and the path starting point of the path segment included in at least one third unidirectional path coincide with each other, wherein the first unidirectional path, the second unidirectional path, and the at least one third unidirectional path are all unidirectional paths; It is then determined whether the first unidirectional path, the second unidirectional path, and at least one third unidirectional path form a closed loop after being spliced according to the driving direction.
7. The method according to claim 6, wherein If the type of the path is a one-way path, then if any one of the paths is spliced with at least one other path of the same type to form a closed loop, then determining that any one of the paths is passable includes: If the first one-way path, the second one-way path, and the at least one third one-way path can form a closed loop after being spliced according to the travel direction, then it is determined that the first one-way path, the second one-way path, and the at least one third one-way path are all passable; If the first one-way path, the second one-way path and the at least one third one-way path cannot form a closed loop after being spliced according to the driving direction, it is determined that the first one-way path, the second one-way path and the at least one third one-way path are all impassable.
8. A device for determining whether a path in a map is passable, characterized in that: include: A classification unit, for classifying multiple paths in the map according to the number of driving directions the paths have; a determination unit, configured to determine, for any path in the same category, whether the path, when combined with at least one other path in the same category, forms a closed loop, wherein the closed loop is a loop formed by paths traveled from a starting point in a clockwise or counterclockwise direction and then back to the starting point; A determining unit is configured to determine that the any one path is passable if the any one path is connected with at least one other path in the same category to form a closed loop.
9. An intelligent terminal, characterized in that: include: a memory for storing executable instructions; A processor, configured to read and execute the executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor, the processor is enabled to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Roundabout path planning method and device
CN114894207A
Systems, methods, and computer-readable media for verifying traffic designations of roads
US8825359B1