Route identification method, device, electronic device and storage medium
By obtaining and analyzing the associated information of closed areas, entrances and exits and key sections, identifying whether the route to be identified crosses the closed areas, the problem of crossing the closed areas in path planning is solved, and the accuracy and user experience of route planning are improved.
Patent Information
- Application Number
- CN202110328697.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-26
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2041-03-26
AI Technical Summary
In the existing path planning methods, the planned routes are prone to crossing closed areas, resulting in poor user experience.
By obtaining the associated information of the route to be identified and pre-generated, it is determined whether the multiple route to be identified contains critical road sections, and whether the route to be identified passes through the closed area. Related information determines whether the route passes through the closed area by establishing the relationship between the closed area, entrance and exit and key sections.
Improve the accuracy of path planning, avoid routes through closed areas, and improve user experience.
Smart Images

Figure CN115129798B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a route identification method, device, electronic device and storage medium. Background Art
[0002] With the continuous development of electronic map technology, electronic map services have provided great convenience to people. Electronic maps are maps that are stored and accessed digitally using computer technology. Electronic maps can be used in many areas, including urban planning and construction, transportation, tourism, and navigation.
[0003] In actual applications, when planning walking and cycling routes, sometimes there are situations where the planned route passes through closed areas in order to take shortcuts. However, these closed areas usually have access control or require security clearance, so such routes are actually not passable. For example, refer to Figure 1 , shows a schematic diagram of a route in the prior art. Figure 1 As shown, the solid line represents the route obtained by path planning, and the dotted line represents the actual driving route. It can be seen that the planned route passes through a closed area, so the actual driving is not in accordance with the planned route.
[0004] Therefore, in the current path planning method, the planned route is inaccurate, resulting in a poor user experience. Summary of the Invention
[0005] In view of the above problems, embodiments of the present invention are proposed to provide a route identification method, device, electronic device, and storage medium that overcome the above problems or at least partially solve the above problems.
[0006] In a first aspect, an embodiment of the present invention discloses a route identification method, comprising:
[0007] Obtaining a route to be identified and pre-generated association information; the route to be identified includes multiple road sections to be identified, and the association information is used to indicate a closed area, an entrance and exit associated with the closed area, and a key road section associated with the entrance and exit;
[0008] Based on the association information, determining whether the multiple road sections to be identified include a key road section;
[0009] Based on the association information and the number of key sections included in the multiple sections to be identified, it is identified whether the route to be identified passes through a closed area.
[0010] Optionally, the identifying whether the route to be identified crosses a closed area based on the association information and the number of key sections included in the multiple sections to be identified includes: when the number is less than two, determining that the route to be identified does not cross a closed area; when the number is equal to two, judging based on the association information whether the key sections included in the multiple sections to be identified are associated with different closed areas; if they are associated with different closed areas, determining that the route to be identified does not cross a closed area; if they are associated with the same closed area, determining that the route to be identified crosses a closed area; when the number is greater than two, determining that the route to be identified crosses a closed area.
[0011] Optionally, the association information is generated in the following manner: based on pre-stored information about the closed area and the entrance and exit, an association relationship is established between the closed area and the entrance and exit; based on the information about the closed area, the entrance and exit, and the pre-stored information about the road section, an association relationship is established between the entrance and exit and the key road section.
[0012] Optionally, the information of the closed area includes the coordinates of the closed area, the information of the entrances and exits includes the coordinates of the entrances and exits, and the information of the road sections includes the coordinates, names and attributes of the road sections; the association relationship between entrances and exits and key road sections is established based on the information of the closed area, the information of the entrances and exits, and the information of the pre-stored road sections, including: for each road section, based on the name and / or attributes of the current road section, determining whether the current road section is an internal road section of a non-closed area, and obtaining a set of internal road sections of a non-closed area; for each entrance and exit, based on the coordinates of the current entrance and exit and the coordinates of each road section, searching for road sections within a preset range around the current entrance and exit; filtering out road sections in the internal road section set of the non-closed area from the searched road sections, and using the remaining road sections as candidate road sections corresponding to the current entrance and exit; selecting the key road section associated with the current entrance and exit from the candidate road sections corresponding to the current entrance and exit based on the coordinates of the current entrance and exit, the coordinates of the closed area associated with the current entrance and exit, and the coordinates of the candidate road sections corresponding to the current entrance and exit.
[0013] Optionally, based on the coordinates of the current entrance and exit, the coordinates of the closed area associated with the current entrance and exit, and the coordinates of the candidate road sections corresponding to the current entrance and exit, the key road section associated with the current entrance and exit is selected from the candidate road sections corresponding to the current entrance and exit, including: for each candidate road section corresponding to the current entrance and exit, based on the coordinates of the current candidate road section and the coordinates of the closed area associated with the current entrance and exit, calculating the coordinates of the intersection point of the current candidate road section and the closed area associated with the current entrance and exit; selecting the candidate road section where the intersection point with the smallest distance between the coordinates and the coordinates of the current entrance and exit is located as the key road section associated with the current entrance and exit.
[0014] Optionally, judging whether the current road section is a non-closed area section based on the name and / or attributes of the current road section includes: determining that the current road section is a non-closed area section when the name of the current road section is not empty, and / or the attribute of the current road section is a non-residential road, and / or the attribute of the current road section is a non-pedestrian street.
[0015] Optionally, after establishing the association relationship between the entrance and exit and the key road section, it also includes: based on the information of the closed area and the information of the road section, screening out the road section that intersects with the closed area; identifying whether the screened road section is associated with the entrance and exit; based on the identification result, correcting the association relationship between the entrance and exit and the key road section.
[0016] In a second aspect, an embodiment of the present invention discloses a route identification device, comprising:
[0017] an acquisition module, configured to acquire a route to be identified and pre-generated associated information; the route to be identified includes a plurality of road sections to be identified, and the associated information is used to indicate a closed area, an entrance and exit associated with the closed area, and a key road section associated with the entrance and exit;
[0018] a judgment module, configured to judge whether the plurality of road sections to be identified include a key road section based on the association information;
[0019] An identification module is configured to identify whether the route to be identified passes through a closed area based on the association information and the number of key sections included in the multiple sections to be identified.
[0020] Optionally, the identification module includes: a first determination unit, used to determine that the route to be identified does not cross a closed area when the number is less than two; a second determination unit, used to determine whether the key sections included in the multiple sections to be identified are associated with different closed areas based on the association information when the number is equal to two; if they are associated with different closed areas, it is determined that the route to be identified does not cross a closed area; if they are associated with the same closed area, it is determined that the route to be identified crosses a closed area; a third determination unit, used to determine that the route to be identified crosses a closed area when the number is greater than two.
[0021] Optionally, the association information is generated by the following modules: a first establishment module, used to establish an association relationship between a closed area and an entrance and exit based on pre-stored information about the closed area and the entrance and exit; a second establishment module, used to establish an association relationship between an entrance and exit and a key road section based on the information about the closed area, the information about the entrance and exit, and pre-stored information about the road section.
[0022] Optionally, the information of the closed area includes the coordinates of the closed area, the information of the entrance and exit includes the coordinates of the entrance and exit, and the information of the road section includes the coordinates, name and attributes of the road section; the second establishment module includes: a set generation unit, which is used to determine, for each road section, based on the name and / or attributes of the current road section, whether the current road section is an internal road section of a non-closed area, and obtain a set of internal road sections of a non-closed area; a road section search unit, which is used to search for road sections within a preset range around the current entrance and exit based on the coordinates of the current entrance and exit and the coordinates of each road section; a road section filtering unit, which is used to filter out road sections in the internal road section set of the non-closed area from the searched road sections, and use the remaining road sections as candidate road sections corresponding to the current entrance and exit; a road section selection unit, which is used to select the key road section associated with the current entrance and exit from the candidate road sections corresponding to the current entrance and exit based on the coordinates of the current entrance and exit, the coordinates of the closed area associated with the current entrance and exit, and the coordinates of the candidate road sections corresponding to the current entrance and exit.
[0023] Optionally, the road section selection unit is specifically used to calculate the coordinates of the intersection of the current candidate road section and the closed area associated with the current entrance and exit for each candidate road section corresponding to the current entrance and exit based on the coordinates of the current candidate road section and the coordinates of the closed area associated with the current entrance and exit; and select the candidate road section where the intersection point with the smallest distance between the coordinates and the coordinates of the current entrance and exit is located as the key road section associated with the current entrance and exit.
[0024] Optionally, the set generation unit is specifically used to determine that the current road section is a non-closed area section when the name of the current road section is not empty, and / or the attribute of the current road section is a non-residential road, and / or the attribute of the current road section is a non-pedestrian street.
[0025] Optionally, after establishing the association relationship between the entrance and exit and the key road section, the device also includes: a screening module for screening out the road section intersecting with the closed area based on the information of the closed area and the information of the road section; a correction module for identifying whether the screened road section is associated with the entrance and exit, and based on the identification result, correcting the association relationship between the entrance and exit and the key road section.
[0026] In a third aspect, an embodiment of the present invention discloses an electronic device, comprising: one or more processors; and one or more machine-readable media having instructions stored thereon; when the instructions are executed by the one or more processors, the processors execute the route identification method as described in any one of the above items.
[0027] In a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the route identification method as described in any one of the above items.
[0028] In an embodiment of the present invention, a route to be identified and pre-generated associated information are obtained, the route to be identified includes multiple road sections to be identified, and the associated information is used to indicate a closed area, entrances and exits associated with the closed area, and key road sections associated with the entrances and exits; based on the associated information, it is determined whether the multiple road sections to be identified include key road sections; based on the associated information and the number of key road sections included in the multiple road sections to be identified, it is identified whether the route to be identified crosses a closed area. It can be seen from this that in an embodiment of the present invention, the associated information of closed areas, entrances and exits, and key road sections can be pre-mined, and whether the road section to be identified is associated with the entrances and exits based on the associated information can be identified, and further whether the route to be identified crosses a closed area can be identified. Therefore, in the process of path planning, it is possible to avoid planning routes that cross closed areas, improve the accuracy of route planning, and enhance user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a route diagram of the prior art.
[0030] Figure 2 This is a flowchart of the steps of a route identification method according to an embodiment of the present invention.
[0031] Figure 3 This is a flowchart of the steps of a process for generating association information according to an embodiment of the present invention.
[0032] Figure 4 This is a flowchart of a correlation information correction process according to an embodiment of the present invention.
[0033] Figure 5 This is a schematic diagram of the association between an entrance and exit and a key road section according to an embodiment of the present invention.
[0034] Figure 6 This is a flowchart of another route identification method according to an embodiment of the present invention.
[0035] Figure 7 This is a structural block diagram of a route identification device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0037] The embodiments of the present invention can be applied to various route planning scenarios, such as multi-source delivery route services, client walking and cycling route services, bicycle walking and cycling route services, etc.
[0038] The route identification method and apparatus of the embodiments of the present invention can be applied to a server with route planning capabilities. A user sets information such as the starting and ending locations on a client, triggering the client to send a route planning request to the server, which then performs route planning in response to the route planning request. The client can be any app (application program) capable of providing electronic map functionality, and the server is the server corresponding to the client.
[0039] Reference Figure 2 , shows a step flow chart of a route identification method according to an embodiment of the present invention.
[0040] like Figure 2 As shown, the route identification method may include the following steps:
[0041] Step 201: Obtain a route to be identified and pre-generated associated information.
[0042] When a user performs an action on the client's page, such as setting the starting and ending locations, the client generates a route planning request, which it then sends to the server. This request may include information such as the starting and ending locations, and the request time. Upon receiving the request, the server plans a route from the starting and ending locations, generating at least one route. The server then uses the resulting route as a route to be identified. A route to be identified may contain multiple sections to be identified.
[0043] The server pre-generates association information. This association information indicates closed areas, entrances and exits associated with closed areas, and critical road sections associated with entrances and exits. A closed area may refer to an area with access control or requiring security clearance, such as a residential community, factory, or school. An entrance and exit may refer to an entrance or exit of a closed area, such as a door within the closed area. A critical road section may refer to a road section leading into or out of an entrance or exit of a closed area. A closed area may be associated with at least one entrance and exit, and each entrance and exit may be associated with a critical road section. The specific process of generating association information will be discussed in detail in the following embodiments.
[0044] Step 202: Based on the association information, determine whether the multiple road sections to be identified include a key road section.
[0045] Step 203 : Based on the association information and the number of key sections included in the multiple sections to be identified, identify whether the route to be identified passes through a closed area.
[0046] Based on the association information, the server can determine whether the multiple road segments to be identified in the route to be identified include key road segments associated with the entrances and exits of the closed area. Furthermore, based on the association information and the number of key road segments included, the server can determine whether the route to be identified crosses the closed area. The specific processing process will be discussed in detail in the following embodiments.
[0047] After identifying whether the to-be-identified route crosses a closed area, the routes identified as crossing the closed area can be filtered out from the planned routes, thereby avoiding recommending routes crossing the closed area to the user.
[0048] In this embodiment of the present invention, it is possible to pre-mine the association information between closed areas, entrances and exits, and key road sections. Based on this association information, it is determined whether the road section to be identified is associated with the entrance and exit, and further whether the route to be identified crosses the closed area. Therefore, during the route planning process, it is possible to avoid planning routes that cross closed areas, improve route planning accuracy, and enhance the user experience.
[0049] Figure 3 This is a flowchart of the steps of a process for generating association information according to an embodiment of the present invention.
[0050] like Figure 3 As shown, the association information generation process may include the following steps:
[0051] Step 301: establishing an association relationship between a closed area and an entrance and exit based on pre-stored closed area information and entrance and exit information.
[0052] The database pre-stores information about closed areas. This information may include the closed area ID, the closed area coordinates, and the IDs of the entrances and exits within the closed area. In practice, a closed area can also be referred to as a closed area surface. A closed area can be considered a surface defined by an outline containing multiple nodes. Therefore, the coordinates of a closed area may include the coordinates of each node within the closed area outline.
[0053] Entrance and exit information is pre-stored in the database. This information may include the entrance ID, the entrance coordinates, the ID of the enclosed area to which the entrance belongs, and other information. In implementation, an entrance and exit can be considered a node, and therefore the entrance coordinates can be the coordinates of the node.
[0054] Based on the information of the closed area and the information of the entrances and exits, an association relationship between the closed area and the entrances and exits can be established. For example, an association relationship between the closed area ID and the entrance and exit ID can be established. A closed area can be associated with at least one entrance and exit.
[0055] Step 302: establishing associations between entrances and exits and key road sections based on the information of the closed area, the information of the entrances and exits, and the pre-stored road section information.
[0056] Road network data is pre-stored in the database. A road network may include multiple links, so the road network data may include link information. Link information may include information such as the link ID, the link coordinates, the link name, and the link attributes. In implementation, a link may include multiple nodes, so the link coordinates may include the coordinates of each node on the link. Link attributes may include primary, secondary, motorway, trunk, track, footway, residential, pedestrian, and so on.
[0057] Each entrance and exit can be associated with a key segment connected to it. This key segment is the road segment used for entering and exiting the entrance and exit. Therefore, this key segment is typically close to the entrance and exit, should not be located within a non-enclosed area, and should intersect the enclosed area to which the entrance and exit belongs.
[0058] Based on this, in an optional implementation, step 302 may include the following steps A1 to A4:
[0059] A1. For each road segment, based on the name and / or attribute of the current road segment, determine whether the current road segment is an internal road segment of a non-closed area, and obtain a set of internal road segments of a non-closed area.
[0060] Normally, the road sections inside the non-enclosed area all have names, so if the name of the current road section is not empty, the current road section is likely to be a road section inside the non-enclosed area. Normally, the attributes of the road sections inside the non-enclosed area will not be residential roads, that is, the attribute is non-residential roads, and the attribute of non-residential roads can refer to any attribute except residential roads. Therefore, if the attribute of the current road section is non-residential roads, the current road section is likely to be a road section inside the non-enclosed area. Normally, the attributes of the road sections inside the non-enclosed area will not be pedestrian streets, that is, the attribute is non-pedestrian streets, and the attribute of non-pedestrian streets can refer to any attribute except pedestrian streets. Therefore, if the attribute of the current road section is non-pedestrian streets, the current road section is likely to be a road section inside the non-enclosed area.
[0061] Therefore, in an optional embodiment, for each pre-stored road segment, if the name of the current road segment is not empty, and / or the attribute of the current road segment is a non-residential road, and / or the attribute of the current road segment is a non-pedestrian street, the current road segment can be determined to be a non-enclosed area road segment. Here, "and / or" means at least one of them.
[0062] After all pre-stored road segments are judged, a set of road segments within the non-enclosed area can be obtained. The set of road segments within the non-enclosed area can be called a blacklist of road segments within the enclosed area, and the set of road segments within the non-enclosed area can include the ID of at least one road segment within the non-enclosed area.
[0063] A2: For each entrance and exit, based on the coordinates of the current entrance and exit and the coordinates of each road section, search for a road section within a preset range around the current entrance and exit.
[0064] For each pre-stored entrance / exit, a search can be performed to find a road segment within a preset range around the current entrance / exit based on the coordinates of the current entrance / exit and the coordinates of the pre-stored road segments. Optionally, the preset range around the current entrance / exit can be a circular range with the current entrance / exit as the center and a preset length as the radius, etc. The preset length can be any suitable value, for example, 10 meters, 12 meters, 15 meters, 20 meters, etc., and this is not limited in this embodiment of the present invention.
[0065] In an optional embodiment, spatial indexing can be used for processing. A spatial index is a data structure that is arranged in a certain order based on the position and shape of spatial objects or a certain spatial relationship between spatial objects. It contains summary information of the spatial objects, such as the object's identifier, circumscribed rectangle, and a pointer to the spatial object entity. Spatial indexes can include grid indexes, BSP (Binary Space Partition) tree indexes, R-tree indexes, R+ tree indexes, etc. The embodiments of the present invention can use any of these spatial index forms for processing.
[0066] In implementation, for the current entrance and exit, a spatial index can be established based on the coordinates of the current entrance and exit and the coordinates of each road section, and then based on the spatial index, the road sections within a preset range around the current entrance and exit are searched.
[0067] Taking the R-tree spatial index as an example, its construction concept is to recursively partition the spatial dataset into areas using MBRs (Minimal Bounding Rectangles). Therefore, we can first divide the area around the current entrance and exit based on its coordinates and construct the MBR corresponding to that area. Then, for each road segment, we construct the MBR corresponding to that road segment based on its coordinates. Then, we construct an R-tree based on these MBRs, for example, using the MBR corresponding to the preset range as the root node and the MBRs corresponding to the road segment as child nodes. Using this constructed R-tree, we can easily find road segments within the preset range around the current entrance and exit.
[0068] A3: Filter out the road sections in the road section set inside the non-enclosed area from the found road sections, and use the remaining road sections as candidate road sections corresponding to the current entrance and exit.
[0069] For the current entrance / exit, based on the set of road segments within the non-enclosed area, the searched road segments within the preset range around the current entrance / exit are filtered out, and the remaining road segments are used as candidate road segments for the current entrance / exit. Therefore, the candidate road segments for the current entrance / exit are those that are within the preset range around the current entrance / exit and are not within the non-enclosed area.
[0070] A4, based on the coordinates of the current entrance and exit, the coordinates of the closed area associated with the current entrance and exit, and the coordinates of the candidate road sections corresponding to the current entrance and exit, select the key road section associated with the current entrance and exit from the candidate road sections corresponding to the current entrance and exit.
[0071] In an optional embodiment, step A4 may include: for each candidate road section corresponding to the current entrance and exit, based on the coordinates of the current candidate road section and the coordinates of the closed area associated with the current entrance and exit, calculating the coordinates of the intersection point of the current candidate road section and the closed area associated with the current entrance and exit; selecting the candidate road section where the intersection point with the smallest distance between the coordinates and the coordinates of the current entrance and exit is located as the key road section associated with the current entrance and exit.
[0072] Optionally, in the process of calculating the coordinates of the intersection of the current candidate road section and the closed area associated with the current entrance and exit based on the coordinates of the current candidate road section and the coordinates of the closed area associated with the current entrance and exit, a fitting method can be used for calculation. Specifically, a line segment can be fitted based on the coordinates of the current candidate road section, and a closed area shape surface can be fitted based on the coordinates of the closed area associated with the current entrance and exit, and then the coordinates of the intersection of the line segment and the shape surface can be calculated. It should be noted that a candidate road section may not intersect with the closed area associated with the current entrance and exit, or it may intersect with the closed area associated with the current entrance and exit.
[0073] If there is one candidate road section that intersects with the closed area associated with the current entrance and exit, then the candidate road section is used as the key road section associated with the current entrance and exit. If there are at least two candidate road sections that intersect with the closed area associated with the current entrance and exit, then for each candidate road section, the distance between the coordinates of the intersection point corresponding to the candidate road section and the coordinates of the current entrance and exit is calculated, and the candidate road section where the intersection point with the smallest distance is located is selected as the key road section associated with the current entrance and exit. If there is no candidate road section that intersects with the closed area associated with the current entrance and exit, it can be considered that there is no key road section associated with the current entrance and exit. Optionally, the coordinates in the embodiment of the present invention can be longitude and latitude coordinates, so the process of calculating the distance between the coordinates of the intersection point and the coordinates of the current entrance and exit is also the process of calculating the distance between two longitude and latitude coordinates.
[0074] After establishing associations between closed areas and entrances and exits, and between entrances and exits and key road sections, association information indicating the closed areas, the entrances and exits associated with the closed areas, and the key road sections associated with the entrances and exits can be generated based on the associations between the closed areas and entrances and exits, and the associations between the entrances and exits and key road sections, and this association information can be persistently stored. In implementation, the association information can store the ID of the closed area, the ID of the entrance and exit associated with the closed area ID, and the ID of the key road section associated with the entrance and exit ID.
[0075] In an optional implementation, considering that the current database data may contain problems such as insufficient door recall, door association errors, incorrect closed area locations, inaccurate surface information, etc., the above mining process may have some errors. Therefore, a hot repair system can be established to correct the association between entrances and exits and key road sections and improve the accuracy of the association information.
[0076] Figure 4 This is a flowchart of a correlation information correction process according to an embodiment of the present invention.
[0077] like Figure 4 As shown, the association information correction process may include the following steps:
[0078] Step 401: Acquire data.
[0079] The acquired data may include surface data and road network data. The surface data may include information about closed areas, and the road network data may include information about road sections.
[0080] Step 402: Establish an association between the surface data and the road network data.
[0081] Based on the information of the closed area and the information of the road segment, the road segments intersecting the closed area are filtered out.
[0082] In an optional embodiment, a spatial index (such as the aforementioned R-tree index) of the closed area and the road segment can be established based on the coordinates of the closed area and the road segment, thereby establishing an associated index between the closed area and the road segment. Then, based on the spatial index of the closed area and the road segment, the road segment intersecting the closed area is screened out.
[0083] In another implementation, a closed area shape surface can be obtained based on the coordinates of the closed area, and a line segment can be obtained based on the coordinates of the road segment. Then, based on the fitted line segment and shape surface, the road segments that intersect with the closed area are screened out.
[0084] Step 403: data identification.
[0085] For each road segment that is screened out and intersects the closed area, it is respectively identified whether the road segment is associated with an entrance or exit.
[0086] In an optional embodiment, manual identification can be performed, for example, manually identifying based on a street view image whether the selected road section is associated with an entrance or exit.
[0087] In another embodiment, a configuration file may be manually pre-written, which may include the selected road segments and the entrances and exits associated with the selected road segments. The server may identify whether the selected road segments are associated with the entrances and exits based on the configuration file.
[0088] Step 404: Information correction.
[0089] Based on the identification result of whether the selected road sections are associated with the entrances and exits, the association relationship between the entrances and exits and the key road sections is corrected.
[0090] During the correction process, for a road section, if the recognition result shows that the road section is associated with an entrance or exit, but the association relationship between the entrance or exit and the key road section does not show that the road section is associated with an entrance or exit, the association relationship between the road section and the entrance or exit in the recognition result is added to the association relationship between the entrance or exit and the key road section in the association information. If the recognition result shows that the road section is not associated with an entrance or exit, but the association relationship between the entrance or exit and the key road section shows that the road section is associated with an entrance or exit, the association relationship between the road section and the entrance or exit is deleted from the association relationship between the entrance or exit and the key road section in the association information. If the recognition result shows that the road section is associated with an entrance or exit, and the association relationship between the entrance or exit and the key road section shows that the road section is also associated with an entrance or exit, but the entrance or exit associated with the road section in the recognition result is different from the entrance or exit associated with the road section in the association information, the association relationship between the road section and the entrance or exit in the recognition result is used to replace the association relationship between the road section and the entrance or exit in the association relationship between the entrance or exit and the key road section in the association information.
[0091] Figure 5 This is a schematic diagram of an embodiment of the present invention, showing the association between an entrance and an exit and a key section. Figure 5 As shown, the closed area is a cell, a door of the cell is an entrance and exit, the cell is associated with multiple entrances and exits, and the road section connected to the door is the road section associated with the door.
[0092] After the associated information is generated in the above manner, route identification can be performed based on the associated information.
[0093] Reference Figure 6 , shows a flowchart of the steps of another route identification method according to an embodiment of the present invention.
[0094] like Figure 6 As shown, the route identification method may include the following steps:
[0095] Step 601: Obtain the route to be identified and pre-generated associated information.
[0096] Step 602: Based on the association information, determine whether the multiple road sections to be identified include a key road section. If so, execute step 603; if not, execute step 606.
[0097] A route can be represented by a sequence of link IDs. For example, a route can be represented as [1683653, 44321526, 850240779, 44338621, 44338620, 44310916, 44310919, 44310918, 44310262, 44348122, 44348129]. The associated information can store the ID of a closed area, the ID of the entrance and exit associated with the closed area ID, and the ID of the key section associated with the entrance and exit ID.
[0098] Therefore, for each road segment ID included in the route to be identified, the ID of the road segment to be identified is matched with the ID of the key road segment included in the associated information. If the IDs are the same, it is determined that the road segment to be identified is a key road segment. In this way, it is possible to determine whether a key road segment is included in multiple road segments to be identified.
[0099] If it is determined that the multiple sections to be identified included in the route to be identified do not include a key section, that is, the number of key sections included in the multiple sections to be identified is zero, step 606 can be executed to determine that the route to be identified does not pass through a closed area.
[0100] Step 603 : Determine whether the number of key sections included in the multiple sections to be identified is one. If so, execute step 606 ; if not, execute step 604 .
[0101] If it is determined that the multiple sections to be identified included in the route to be identified include a key section, it can be explained that the starting point or the end point of the route to be identified is located in a closed area, but does not pass through the closed area. Therefore, step 606 can be executed to determine that the route to be identified does not pass through the closed area.
[0102] The case where the number of key sections included in the plurality of sections to be identified is zero, or the case where the number of key sections included in the plurality of sections to be identified is one, can both be considered as the case where the number of key sections included in the plurality of sections to be identified is less than two. Therefore, if the number of key sections included in the plurality of sections to be identified is less than two, it is determined that the route to be identified does not pass through a closed area.
[0103] Step 604 : Determine whether the number of key sections included in the multiple sections to be identified is two. If so, execute step 605 ; if not, execute step 607 .
[0104] If it is determined that the number of key sections included in the multiple sections to be identified in the route to be identified is greater than two, it can be indicated that a portion of the route to be identified is located in a closed area. Therefore, step 607 can be executed to determine that the route to be identified crosses the closed area.
[0105] Step 605 , determining whether the key sections included in the multiple sections to be identified are associated with different closed areas. If so, proceed to step 606 ; if not, proceed to step 607 .
[0106] If it is determined that the multiple road sections to be identified included in the route to be identified include two key road sections, it is determined based on the association information whether the two key road sections included in the multiple road sections to be identified are associated with different closed areas.
[0107] If two key sections included in the multiple sections to be identified are associated with different closed areas, it can be said that the starting point and end point of the route to be identified are located in the closed area, but do not cross the closed area. Therefore, step 606 can be executed to determine that the route to be identified does not cross the closed area.
[0108] If two key sections included in the multiple sections to be identified are associated with the same closed area, it can be indicated that a portion of the route to be identified is located in the closed area, and therefore step 607 can be executed to determine that the route to be identified crosses the closed area.
[0109] Step 606: Determine whether the route to be identified passes through a closed area.
[0110] Step 607: Determine whether the route to be identified passes through a closed area.
[0111] If internal road segments are downgraded during route planning, the accuracy of the road network data is highly dependent on the road right-of-way strategy, which is complex. Moreover, the road right-of-way strategy involves the relative relationships of all road segments in the road network, and any adjustment to the road right affects the entire network. In this embodiment of the present invention, the relationship between closed areas, entrances and exits, and key road segments is mined. During the route identification process, based on this relationship, low-complexity logical judgment can be used to determine whether a route passes through a closed area. This algorithm has high execution efficiency and strong robustness, is less dependent on data accuracy, and provides more accurate identification.
[0112] Reference Figure 7 , shows a structural block diagram of a route identification device according to an embodiment of the present invention.
[0113] like Figure 7 As shown, the route identification device may include the following modules:
[0114] An acquisition module 701 is configured to acquire a route to be identified and pre-generated associated information; the route to be identified includes multiple road sections to be identified, and the associated information indicates a closed area, an entrance and exit associated with the closed area, and a key road section associated with the entrance and exit;
[0115] A judgment module 702 is configured to judge whether the plurality of to-be-identified road sections include a key road section based on the association information;
[0116] The identification module 703 is configured to identify whether the route to be identified passes through a closed area based on the association information and the number of key sections included in the multiple sections to be identified.
[0117] Optionally, the identification module 703 includes: a first determination unit, used to determine that the route to be identified does not cross a closed area when the number is less than two; a second determination unit, used to determine whether the key sections included in the multiple sections to be identified are associated with different closed areas based on the association information when the number is equal to two; if they are associated with different closed areas, it is determined that the route to be identified does not cross a closed area; if they are associated with the same closed area, it is determined that the route to be identified crosses a closed area; a third determination unit, used to determine that the route to be identified crosses a closed area when the number is greater than two.
[0118] Optionally, the association information is generated by the following modules: a first establishment module, used to establish an association relationship between a closed area and an entrance and exit based on pre-stored information about the closed area and the entrance and exit; a second establishment module, used to establish an association relationship between an entrance and exit and a key road section based on the information about the closed area, the information about the entrance and exit, and pre-stored information about the road section.
[0119] Optionally, the information of the closed area includes the coordinates of the closed area, the information of the entrance and exit includes the coordinates of the entrance and exit, and the information of the road section includes the coordinates, name and attributes of the road section; the second establishment module includes: a set generation unit, which is used to determine, for each road section, based on the name and / or attributes of the current road section, whether the current road section is an internal road section of a non-closed area, and obtain a set of internal road sections of a non-closed area; a road section search unit, which is used to search for road sections within a preset range around the current entrance and exit based on the coordinates of the current entrance and exit and the coordinates of each road section; a road section filtering unit, which is used to filter out road sections in the internal road section set of the non-closed area from the searched road sections, and use the remaining road sections as candidate road sections corresponding to the current entrance and exit; a road section selection unit, which is used to select the key road section associated with the current entrance and exit from the candidate road sections corresponding to the current entrance and exit based on the coordinates of the current entrance and exit, the coordinates of the closed area associated with the current entrance and exit, and the coordinates of the candidate road sections corresponding to the current entrance and exit.
[0120] Optionally, the road section selection unit is specifically used to calculate the coordinates of the intersection of the current candidate road section and the closed area associated with the current entrance and exit for each candidate road section corresponding to the current entrance and exit based on the coordinates of the current candidate road section and the coordinates of the closed area associated with the current entrance and exit; and select the candidate road section where the intersection point with the smallest distance between the coordinates and the coordinates of the current entrance and exit is located as the key road section associated with the current entrance and exit.
[0121] Optionally, the set generation unit is specifically used to determine that the current road section is a non-closed area section when the name of the current road section is not empty, and / or the attribute of the current road section is a non-residential road, and / or the attribute of the current road section is a non-pedestrian street.
[0122] Optionally, after establishing the association relationship between the entrance and exit and the key road section, the device also includes: a screening module for screening out the road section intersecting with the closed area based on the information of the closed area and the information of the road section; a correction module for identifying whether the screened road section is associated with the entrance and exit, and based on the identification result, correcting the association relationship between the entrance and exit and the key road section.
[0123] In this embodiment of the present invention, it is possible to pre-mine the association information between closed areas, entrances and exits, and key road sections. Based on this association information, it is determined whether the road section to be identified is associated with the entrance and exit, and further whether the route to be identified crosses the closed area. Therefore, during the route planning process, it is possible to avoid planning routes that cross closed areas, improve route planning accuracy, and enhance the user experience.
[0124] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0125] In an embodiment of the present invention, an electronic device is also provided. The electronic device may include one or more processors and one or more machine-readable media storing instructions, such as application programs. When the instructions are executed by the one or more processors, the processors perform the route identification method described above.
[0126] In an embodiment of the present invention, a non-transitory computer-readable storage medium is further provided, on which a computer program is stored. The program can be executed by a processor of an electronic device to implement the above-mentioned route identification method. For example, the non-transitory computer-readable storage medium can be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0127] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0128] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, embodiments of the present invention may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, embodiments of the present invention may take the form of a computer program product 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.
[0129] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the 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 terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process 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.
[0130] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including 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.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement 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.
[0132] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0133] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0134] The route identification method, device, electronic device, and storage medium provided by the present invention are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core concept of the present invention. At the same time, for those skilled in the art, based on the concept of the present invention, there may be changes in the specific implementation methods and application scope. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A route identification method, characterized in that: include: Obtaining a route to be identified and pre-generated association information; the route to be identified includes multiple road sections to be identified, and the association information is used to indicate a closed area, an entrance and exit associated with the closed area, and a key road section associated with the entrance and exit; Based on the association information, determining whether the multiple road sections to be identified include a key road section; identifying whether the route to be identified passes through a closed area based on the association information and the number of key road sections included in the plurality of road sections to be identified; The step of identifying whether the route to be identified passes through a closed area based on the association information and the number of key sections included in the plurality of sections to be identified includes: If the number is less than two, determining that the to-be-identified route does not pass through a closed area; In a case where the number is equal to two, determining whether key road sections included in the plurality of road sections to be identified are associated with different closed areas based on the association information; If different closed areas are associated, determining that the route to be identified does not pass through the closed area; If they are associated with the same closed area, determining that the to-be-identified route crosses the closed area; When the number is greater than two, it is determined that the to-be-identified route passes through a closed area.
2. The method according to claim 1, characterized in that The associated information is generated in the following manner: Establishing an association between the closed area and the entrance and exit based on pre-stored closed area information and entrance and exit information; Based on the information of the closed area, the information of the entrances and exits, and the pre-stored information of the road section, an association relationship between the entrances and exits and the key road section is established.
3. The method according to claim 2, characterized in that The information of the closed area includes the coordinates of the closed area, the information of the entrance and exit includes the coordinates of the entrance and exit, and the information of the road section includes the coordinates, name and attributes of the road section; The establishing of associations between entrances and exits and key road sections based on the information of the closed area, the information of the entrances and exits, and the pre-stored road section information includes: For each road segment, based on the name and / or attribute of the current road segment, determining whether the current road segment is an internal road segment of a non-closed area, and obtaining a set of internal road segments of the non-closed area; For each entrance and exit, based on the coordinates of the current entrance and exit and the coordinates of each road section, search for a road section within a preset range around the current entrance and exit; Filtering out the road sections in the road section set within the non-enclosed area from the found road sections, and using the remaining road sections as candidate road sections corresponding to the current entrance and exit; Based on the coordinates of the current entrance and exit, the coordinates of the closed area associated with the current entrance and exit, and the coordinates of the candidate road sections corresponding to the current entrance and exit, the key road section associated with the current entrance and exit is selected from the candidate road sections corresponding to the current entrance and exit.
4. The method according to claim 3, characterized in that The selecting, based on the coordinates of the current entrance and exit, the coordinates of the closed area associated with the current entrance and exit, and the coordinates of the candidate road sections corresponding to the current entrance and exit, the key road section associated with the current entrance and exit from the candidate road sections corresponding to the current entrance and exit includes: For each candidate road segment corresponding to the current entrance and exit, based on the coordinates of the current candidate road segment and the coordinates of the closed area associated with the current entrance and exit, calculate the coordinates of the intersection point of the current candidate road segment and the closed area associated with the current entrance and exit; The candidate road section where the intersection point whose coordinates have the smallest distance with the coordinates of the current entrance and exit is located is selected as the key road section associated with the current entrance and exit.
5. The method according to claim 3, characterized in that The determining, based on the name and / or attribute of the current road section, whether the current road section is a non-closed area road section includes: When the name of the current road section is not empty, and / or the attribute of the current road section is a non-residential road, and / or the attribute of the current road section is a non-pedestrian street, the current road section is determined to be a non-closed area road section.
6. The method according to claim 2, characterized in that After establishing the association between entrances and exits and key sections, it also includes: Based on the information of the closed area and the information of the road section, screening out the road section intersecting the closed area; Identify whether the selected road segments are associated with entrances and exits; Based on the recognition result, the association relationship between the entrance and exit and the key road section is corrected.
7. A route identification device, characterized in that: include: an acquisition module, configured to acquire a route to be identified and pre-generated associated information; the route to be identified includes a plurality of road sections to be identified, and the associated information is used to indicate a closed area, an entrance and exit associated with the closed area, and a key road section associated with the entrance and exit; a judgment module, configured to judge whether the plurality of road sections to be identified include a key road section based on the association information; an identification module, configured to identify whether the route to be identified crosses a closed area based on the association information and the number of key sections included in the multiple sections to be identified, wherein the identification module includes: If the number is less than two, determining that the to-be-identified route does not pass through a closed area; In a case where the number is equal to two, determining whether key road sections included in the plurality of road sections to be identified are associated with different closed areas based on the association information; If different closed areas are associated, determining that the route to be identified does not pass through the closed area; If they are associated with the same closed area, determining that the to-be-identified route crosses the closed area; When the number is greater than two, it is determined that the to-be-identified route passes through a closed area.
8. An electronic device, characterized in that: include: one or more processors; and one or more machine-readable media having instructions stored thereon; When the instructions are executed by the one or more processors, the processors are caused to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
System and method for identifying closed road section
CN110689719A
System and method for identifying island area in road network
CN110781412A