Map compiling method and device, storage medium and electronic device
By determining reference lines inside and outside the target intersection in the Apollo map and generating NDS map links using Hermite curves, the problem of high map conversion complexity is solved, achieving more efficient map conversion and simplified road topology relationships.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA AUTOMOTIVE INNOVATION CORP
- Filing Date
- 2024-06-28
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, the conversion process from Apollo maps to NDS maps suffers from high map conversion complexity, especially at intersections where redundant links are easily generated, affecting the simplicity of road topology relationships.
By acquiring road information from the Apollo map, reference lines inside and outside the target intersection are determined, and the NDS map is compiled based on these reference lines. Different strategies are used to process roads inside and outside the intersection, and Hermite curves are used to generate links in the NDS map to avoid generating redundant links.
It reduces the complexity of map conversion, improves map conversion efficiency, simplifies road topology relationships, and enhances the convenience of map applications.
Smart Images

Figure CN118708665B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of map compilation, and more specifically, to a map compilation method, apparatus, storage medium, and electronic device. Background Technology
[0002] There are many problems when converting between two types of maps, such as from Apollo maps to NDS maps. One important reason is that Apollo maps represent road geometry using two outer boundary lines, while NDS maps represent road geometry using a line that may not exist in reality. This line needs to represent the basic direction and topological relationships of the road. To achieve the conversion from road nodes to link elements, a feasible approach is to extract the right boundary line of the leftmost lane in the road node from the Apollo map and use this boundary line as the geometric representation of the link element in the NDS map. A schematic diagram of the conversion result from Apollo maps to NDS maps can be found in the appendix. Figure 1 ,like Figure 1 As shown, this representation method easily leads to the generation of redundant links at intersections. These redundant links are only for establishing a complete road topology, but in reality, there is no road segment corresponding to this link. Redundant links increase the complexity of the road topology, thus adversely affecting the practical application of NDS maps.
[0003] This indicates that there are two different types of map conversion problems with high complexity in the relevant technologies.
[0004] There is currently no effective solution to the aforementioned problems in the relevant technologies. Summary of the Invention
[0005] This invention provides a map compilation method, apparatus, storage medium, and electronic device to at least solve the problem of high complexity in converting two different types of maps in related technologies.
[0006] According to an embodiment of the present invention, a map compilation method is provided, comprising: acquiring road information stored in target nodes included in a first type of map; determining first road information belonging to a target intersection and second road information belonging to a target road outside the target intersection included in the road information; determining a first reference line for entering the target intersection and a second reference line for exiting the target intersection based on the first road information; determining a third reference line for the target intersection based on the first reference line and the second reference line; determining a fourth reference line for the target road based on the second road information; and compiling a second type of map based on the third reference line and the fourth reference line, wherein the second type of map is of a different type than the first type of map.
[0007] According to another embodiment of the present invention, a map compilation apparatus is provided, comprising: an acquisition module for acquiring road information stored in target nodes included in a first type of map; a first determination module for determining first road information belonging to a target intersection and second road information belonging to a target road outside the target intersection included in the road information; a second determination module for determining a first reference line for entering the target intersection and a second reference line for exiting the target intersection based on the first road information; a third determination module for determining a third reference line for the target intersection based on the first reference line and the second reference line; a fourth determination module for determining a fourth reference line for the target road based on the second road information; and a compilation module for compiling a second type of map based on the third reference line and the fourth reference line, wherein the second type of map is of a different type than the first type of map.
[0008] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0009] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0010] According to yet another embodiment of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of the present application.
[0011] This invention obtains road information stored in target nodes included in a first type of map; determines first road information belonging to a target intersection and second road information belonging to a target road outside the target intersection; determines a first reference line for entering the target intersection and a second reference line for exiting the target intersection based on the first road information; determines a third reference line for the target intersection based on the first and second reference lines; determines a fourth reference line for the target road based on the second road information; and compiles a second type of map based on the third and fourth reference lines, wherein the second type of map is of a different type than the first type of map. Since it is possible to determine the first road information within the target intersection and the second road information outside the target intersection, the first reference line for entering the target intersection and the second reference line for exiting the target intersection are determined based on the first road information. The third reference line for the target intersection is determined based on the first and second reference lines, and the fourth reference line for the target road is determined based on the second road information. The second type of map is then compiled based on the third and fourth reference lines. This allows for the determination of reference lines for roads at different locations using different methods, reducing the complexity of map conversion. Therefore, it can solve the problem of high complexity in converting two different types of maps in related technologies, achieving the effect of reducing the complexity of map conversion and improving the efficiency of map conversion. Attached Figure Description
[0012] Figure 1 This is a schematic diagram illustrating the conversion result from Apollo map to NDS map in related technologies;
[0013] Figure 2 This is a hardware structure block diagram of a mobile terminal for a map compilation method according to an embodiment of the present invention.
[0014] Figure 3 This is a flowchart of a map compilation method according to an embodiment of the present invention;
[0015] Figure 4 This is a schematic diagram illustrating the conversion result from a first type of map to a second type of map according to an embodiment of the present invention;
[0016] Figure 5 This is a flowchart of a map compilation method according to a specific embodiment of the present invention;
[0017] Figure 6 This is a structural block diagram of a map compilation device according to an embodiment of the present invention. Detailed Implementation
[0018] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0020] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 2 This is a hardware structure block diagram of a mobile terminal for a map compilation method according to an embodiment of the present invention. For example... Figure 2 As shown, a mobile terminal may include one or more ( Figure 2 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 2 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 2 The more or fewer components shown, or having the same Figure 2 The different configurations shown.
[0021] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the map compilation method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0022] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0023] This embodiment provides a method for compiling a map. Figure 3 This is a flowchart of a map compilation method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:
[0024] Step S302: Obtain the road information stored in the target nodes included in the first type of map;
[0025] Step S304: Determine the first road information belonging to the target intersection and the second road information belonging to the target road outside the target intersection included in the road information;
[0026] Step S306: Determine a first reference line for entering the target intersection and a second reference line for exiting the target intersection based on the first road information;
[0027] Step S308: Determine the third reference line of the target intersection based on the first reference line and the second reference line;
[0028] Step S310: Determine the fourth reference line of the target road based on the second road information;
[0029] Step S312: Compile a second type of map based on the third reference line and the fourth reference line, wherein the second type of map is of a different type than the first type of map.
[0030] In the above embodiments, the first type of map can be a map that uses road nodes to represent a road segment, such as the Apollo map. The Apollo map is a high-precision map that uses the proto language to define its map structure and stores map data in XML files. Each map feature is stored in a different XML node. The road node stores the geometry, attributes, and topological relationships of the road. In the Apollo map, the road node is used to represent a road segment. The second type of map can be a map that uses reference lines (links) to represent a road segment, such as the NDS (Navigation Data Standard) map. The NDS map can be organized and stored in a hierarchical, tile-based manner. Each map feature is stored in a separate Building Block, with the Routing Building Block being the most important and fundamental, storing the geometry, attributes, and topological relationships of the road. In the NDS map, the link feature is used to represent a road segment.
[0031] In the above embodiments, the target node can be a node used to represent a road in a first type of map, such as a road node. In the Apollo map, a road node represents a road segment, a lane node represents a lane segment, and the lane boundary geometry is stored in the road node. The target road outside the target intersection can be identified in the Apollo map. The road node has a junction id attribute, which is used to identify the target road outside the target intersection. That is, the second road information included in the road information can be determined based on the junction point identifier. Lanes within the road are extracted in the Apollo map. The road node has a lane id attribute, which is used to identify the lanes within the road. Lanes within the road can be determined based on the lane identifiers included in the second road information. The fourth reference line of the target road is determined based on the second road information.
[0032] In the above embodiments, the target roads within the target intersection do not have clear lane boundary lines or complete lane boundary lines, but each road within the intersection still has clear entry and exit roads. Therefore, the first reference line for the input target intersection and the second reference line for the output target intersection can be determined based on the first road information, and the third reference line link for the target intersection can be determined based on the first reference line and the second reference line.
[0033] It should be noted that the execution order of steps S306-S308 and step S310 can be either to execute steps S306-S308 first and then execute step S310, or to execute step S310 first and then execute steps S306-S308.
[0034] In the above embodiments, after determining the fourth reference line of the target road and the third reference line of the target intersection, the first type of map can be converted into a second type of map based on the third and fourth reference lines. By processing the target road outside the target intersection, the centerline of the target road is used as the geometric representation of the link element; then, the target road inside the target intersection is processed, and its corresponding link elements are generated based on the entering and exiting roads. The NDS map compiled using this method does not generate redundant links, resulting in a simpler road topology, improved efficiency of road topology queries, and more convenient map application development.
[0035] This invention obtains road information stored in target nodes included in a first type of map; determines first road information belonging to a target intersection and second road information belonging to a target road outside the target intersection; determines a first reference line for entering the target intersection and a second reference line for exiting the target intersection based on the first road information; determines a third reference line for the target intersection based on the first and second reference lines; determines a fourth reference line for the target road based on the second road information; and compiles a second type of map based on the third and fourth reference lines, wherein the second type of map is of a different type than the first type of map. Since it is possible to determine the first road information within the target intersection and the second road information outside the target intersection, the first reference line for entering the target intersection and the second reference line for exiting the target intersection are determined based on the first road information. The third reference line for the target intersection is determined based on the first and second reference lines, and the fourth reference line for the target road is determined based on the second road information. The second type of map is then compiled based on the third and fourth reference lines. This allows for the determination of reference lines for roads at different locations using different methods, reducing the complexity of map conversion. Therefore, it can solve the problem of high complexity in converting two different types of maps in related technologies, achieving the effect of reducing the complexity of map conversion and improving the efficiency of map conversion.
[0036] Optionally, the entity performing the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least a data processing device. The data processing device may include, but is not limited to, terminals such as computers and mobile phones.
[0037] In an exemplary embodiment, determining the fourth reference line of the target road based on the second road information includes: determining the leftmost boundary line and the rightmost boundary line based on the lane identification information included in the second road information; determining the center line of the target road based on the leftmost boundary line and the rightmost boundary line; and determining the center line as the fourth reference line. In this embodiment, the second road information included in the target node, such as the road node, includes a junction id attribute, which can be used to identify the target road outside the target intersection. The second road information of the road node also includes a lane id attribute, which can be used to identify the lanes within the road. If the lane ids are stored in spatial order from left to right, the first lane id and the last lane id are retrieved. Otherwise, all lane ids contained in the road node are retrieved. The lane node is found based on the lane id. The lane node has a left boundary attribute and a right boundary attribute. The left boundary attribute and the right boundary attribute store the left boundary geometry and the right boundary geometry of the lane. If the leftmost and rightmost lanes are known, the left boundary line of the leftmost lane is taken as the leftmost boundary line of the road, and the right boundary line of the rightmost lane is taken as the rightmost boundary line of the road. If the leftmost and rightmost lanes are not yet determined, the left boundary lines of all lanes are spatially compared to determine their left-right relationship, thereby identifying the leftmost and rightmost lanes. The centerline of the road can be determined based on the leftmost and rightmost lanes, and this centerline is designated as the fourth reference line.
[0038] In an exemplary embodiment, determining the centerline of the target road based on the leftmost and rightmost boundary lines includes: identifying the boundary line with the greater number of marker points included in the leftmost and rightmost boundary lines as the target boundary line, and identifying the boundary line with the fewer marker points included in the leftmost and rightmost boundary lines as other boundary lines; for any target marker point included in the target boundary line other than the start and end points, performing the following operations to determine the first midpoint corresponding to the target marker point: determining the first point among the other boundary lines that is closest to the target marker point, and determining the midpoint of the line connecting the target marker point and the first point as the first midpoint; determining a second consecutive midpoint between the start point of the target boundary line and the start point of the other boundary lines; determining a third consecutive midpoint between the end point of the target boundary line and the end point of the other boundary lines; and determining the line formed by the first midpoint, the second midpoint, and the third midpoint corresponding to each target marker point as the centerline. In this embodiment, the centerline of the road can be directly calculated based on the obtained leftmost and rightmost boundary lines of the road, and this centerline can serve as the link of the road. The leftmost boundary line of the road is selected, usually a polyline composed of m (m>1) points, LeftBoundary={(X1,Y1,Z1),(X2,Y2,Z2),…(Xm,Ym,Zm)}. The rightmost boundary line of the road is also selected, a polyline composed of n (n>1) points, RightBoundary={(X1,Y1,Z1),(X2,Y2,Z2),…(Xn,Yn,Zn)}. The boundary line with more points is selected as the reference, i.e., the target boundary line, and the center point is calculated point by point. If m>n, starting from the second point LeftPoint2 on the left boundary line, the closest point RightPoint2 in the point set of the right boundary line is found. Then, the midpoint CenterPoint2 of the line segment formed by LeftPoint2 and RightPoint2 is calculated. CenterPoint2 is the second point of the road centerline. Calculate CenterPoint3, CenterPoint4, ..., CenterPointm-1 sequentially using the method described above, thus obtaining m-2 points on the road centerline. The starting point of the road centerline is the midpoint of the line segment formed by the starting points of the Left and Right Boundaries. The ending point of the road centerline is the midpoint of the line segment formed by the ending points of the Left and Right Boundaries.
[0039] In an exemplary embodiment, determining a third reference line for the target intersection based on the first reference line and the second reference line includes: determining a reference line pair, wherein the reference line pair includes a first target reference line in the first reference line and a second target reference line in the second reference line, the first target reference line having the same lane marking as the second target reference line; performing the following operations for each target reference line pair to determine the target reference line for the lane corresponding to the lane marking: determining a first endpoint of the first target reference line and a first tangent direction of the first endpoint; determining a first starting point of the second target reference line and a second tangent direction of the first starting point; determining the target reference line based on the first endpoint, the first tangent direction, the first starting point, and the second tangent direction; and determining the target reference line of each target reference line pair as the third reference line. In this embodiment, the roads within the intersection do not have clearly defined lane boundary lines, or do not have complete lane boundary lines, but each road within the intersection still has clearly defined entry and exit lanes. Given the starting point coordinates, the tangent direction at the starting point, the ending point coordinates, and the tangent direction at the ending point, a smooth cubic Hermite curve can be used to connect the entering and exiting roads. This Hermite curve can serve as a link between roads within the intersection.
[0040] In an exemplary embodiment, determining the target reference line based on the first endpoint, the first tangent direction, the first starting point, and the second tangent direction includes: establishing a target curve with the first endpoint as the second starting point, the first starting point as the second endpoint, the first tangent direction as the tangent direction at the second starting point, and the second tangent direction as the tangent direction at the second endpoint; and determining the target curve as the target reference line. In this embodiment, the target curve may be a Hermite curve. The endpoint of the road link can be taken as the second starting point P0 of the Hermite curve, and the direction of the line connecting the last two points of the road link can be taken as the tangent direction R0 at the starting point of the Hermite curve. The starting point of the road link can be taken as the endpoint P1 of the Hermite curve, and the direction of the line connecting the first two points of the road link can be taken as the tangent direction R1 at the endpoint of the Hermite curve to determine the target curve, and the target curve can be determined as the target reference line.
[0041] In an exemplary embodiment, establishing a target curve with the first endpoint as the second starting point, the first starting point as the second endpoint, the first tangent direction as the tangent direction at the second starting point, and the second tangent direction as the tangent direction at the second endpoint includes: establishing a first coordinate system with the second starting point as the origin and the first tangent direction as the horizontal axis; transforming the first coordinate of the second starting point from the second coordinate system to the first coordinate system to obtain a second coordinate; transforming the third coordinate of the second endpoint from the second coordinate system to the first coordinate system to obtain a fourth coordinate; transforming the first tangent direction from the second coordinate system to the first coordinate system to obtain a third tangent direction; transforming the second tangent direction from the second coordinate system to the first coordinate system to obtain a fourth tangent direction; determining a target parameter equation based on the second coordinate, the fourth coordinate, the third tangent direction, and the fourth tangent direction; determining a predetermined number of interpolated values; substituting the interpolated values into the target parameter equation to obtain interpolated coordinates; transforming the interpolated coordinates to the second coordinate system to obtain interpolated transformed coordinates; and determining the curve formed by the points corresponding to the interpolated transformed coordinates as the target curve. In this embodiment, with the second starting point P0 as the origin and the tangent direction R0 at the starting point as the x-axis, a coordinate transformation is performed on points P0 and P1, that is, the true coordinates of the second starting point and the second ending point are transformed into the first coordinate system to obtain P0. ′ and P1 ′ It is also possible to perform coordinate transformation on the second-to-last point of the road link and recalculate the tangent direction R at the starting point of the Hermite curve. ′ 0. Perform coordinate transformation on the second point at the start of the exit road link, and recalculate the tangent direction R at the end of the Hermite curve. ′ 1. Based on the following Hermite basis function parametric equations, interpolate a certain number of Hermite points, i.e., interpolated values. Where P0 ′ x For P0 ′ The x-component of the coordinate, P0 ′ y For P0 ′ The y-component of the coordinate, P0 ′ z For P0 ′ The z-component of the coordinate, P1 ′ x For P1 ′ The x-component of the coordinate, P1 ′ y For P1 ′ The y-component of the coordinate, P1 ′ z For P1 ′ The z-component of the coordinate, R ′ 0xFor R ′ The x-component of the 0 coordinate, R ′ 0y For R ′ The y-component of the 0 coordinate, R ′ 0z For R ′ The z-component of the 0 coordinate, R ′ 1x For R ′ The x-component of coordinate 1, R ′ 1y For R ′ The y-component of coordinate 1, R ′ 1z For R ′ 1. The z-component of the coordinate. Where 0 ≤ t ≤ 1, when t = 0, X(0) = P0 ′ x Y(0)=P0 ′ y Z(0) = P0 ′ z That is, P0 ′ Point. When t=1, X(1)=P1 ′ x Y(1) = P1 ′ y Z(1) = P1 ′ z That is, P1 ′ point.
[0042] F0(t)=2t 3 -3t 2 +1
[0043] F1(t) = -2t 3 +3t 2
[0044] F2(t)=t 3 -2t 2 +t
[0045] F3(t)=t 3 -t 2
[0046] X(t)=P0 ′ x F0(t)+P1 ′ x F1(t)+R ′ 0x F2(t)+R ′ 1x F3(t)
[0047] Y(t) = P0 ′y F0(t)+P1 ′ y F1(t)+R ′ 0y F2(t)+R ′ 1y F3(t)
[0048] Z(t)=P0 ′ z F0(t)+P1 ′ z F1(t)+R ′ 0z F2(t)+R ′ 1z F3(t)
[0049] The interpolated Hermite points are then transformed again to obtain their real-world coordinates. These interpolated Hermite points form the links of the roads within the intersection.
[0050] In the above embodiments, a schematic diagram illustrating the conversion result from the first type of map to the second type of map can be found in the appendix. Figure 4 ,like Figure 4 As shown, links that meet the requirements of NDS maps are extracted from Apollo maps. Specifically, different strategies are used to generate NDS map links for roads inside and outside intersections. Based on the characteristics of NDS maps, a method using Hermite curves to generate links in NDS maps is proposed. This method avoids generating redundant links, simplifies road topology relationships, improves the efficiency of road topology queries, and makes map application development more convenient.
[0051] In one exemplary embodiment, the target curve includes a Hermitian curve.
[0052] The following describes the map compilation method with reference to specific implementation methods:
[0053] Figure 5 This is a flowchart of a map compilation method according to a specific embodiment of the present invention, such as... Figure 5 As shown, the process includes:
[0054] Step S502: Open and parse the Apollo map.
[0055] Step S504: Read the road node.
[0056] Step S506: Extract the left boundary line of the leftmost lane.
[0057] Step S508: Extract the right boundary line of the rightmost lane.
[0058] Step S510: Calculate the road centerline.
[0059] Step S512, geometry of the link outside the intersection.
[0060] Step S514: Obtain the link of the road to be entered.
[0061] Step S516: Obtain the link for exiting the road.
[0062] Step S518: Calculate the Hermite curve.
[0063] Step S520, link geometry within the intersection.
[0064] In the aforementioned embodiments, links that meet the requirements of NDS maps are extracted from the Apollo map. Specifically, different strategies are used to generate NDS map links for roads inside and outside intersections. Using Hermite curves to generate links in the NDS map avoids generating redundant links, simplifies road topology relationships, improves the efficiency of road topology queries, and makes map application development more convenient.
[0065] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0066] This embodiment also provides a map compilation apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0067] Figure 6 This is a structural block diagram of a map compilation apparatus according to an embodiment of the present invention, such as... Figure 6 As shown, the device includes:
[0068] The acquisition module 602 is used to acquire road information stored in the target nodes included in the first type of map;
[0069] The first determining module 604 is used to determine the first road information belonging to the target intersection and the second road information belonging to the target road outside the target intersection included in the road information;
[0070] The second determining module 606 is used to determine a first reference line for entering the target intersection and a second reference line for exiting the target intersection based on the first road information.
[0071] The third determining module 608 is used to determine the third reference line of the target intersection based on the first reference line and the second reference line;
[0072] The fourth determining module 610 is used to determine the fourth reference line of the target road based on the second road information;
[0073] Compilation module 612 is used to compile a second type of map based on the third reference line and the fourth reference line, wherein the second type of map is of a different type than the first type of map.
[0074] In an exemplary embodiment, the fourth determining module 610 may determine the fourth reference line of the target road based on the second road information in the following manner: determining the leftmost boundary line and the rightmost boundary line based on the lane marking information included in the second road information; determining the center line of the target road based on the leftmost boundary line and the rightmost boundary line; and determining the center line as the fourth reference line.
[0075] In an exemplary embodiment, the fourth determining module 610 can determine the centerline of the target road based on the leftmost boundary line and the rightmost boundary line in the following manner: determining the boundary line with more marker points included in the leftmost boundary line and the rightmost boundary line as the target boundary line, and determining the boundary line with fewer marker points included in the leftmost boundary line and the rightmost boundary line as other boundary lines; performing the following operations for any target marker point included in the target boundary line other than the start point and the end point to determine the first midpoint corresponding to the target marker point: determining the first point among the other boundary lines that is closest to the target marker point, and determining the midpoint of the line connecting the target marker point and the first point as the first midpoint; determining the second consecutive midpoint between the start point of the target boundary line and the start point of the other boundary line; determining the third consecutive midpoint between the end point of the target boundary line and the end point of the other boundary line; and determining the line formed by the first midpoint, the second midpoint, and the third midpoint corresponding to each target marker point as the centerline.
[0076] In an exemplary embodiment, the third determining module 608 can determine the third reference line of the target intersection based on the first reference line and the second reference line in the following manner: determining a reference line pair, wherein the reference line pair includes a first target reference line in the first reference line and a second target reference line in the second reference line, the lane markings of the first target reference line and the second target reference line being the same; performing the following operations for each target reference line pair included in the reference line pair to determine the target reference line of the lane corresponding to the lane marking: determining a first end point of the first target reference line and a first tangent direction of the first end point, determining a first start point of the second target reference line and a second tangent direction of the first start point, determining the target reference line based on the first end point, the first tangent direction, the first start point, and the second tangent direction; and determining the target reference line of each target reference line pair as the third reference line.
[0077] In an exemplary embodiment, the third determining module 608 can determine the target reference line based on the first endpoint, the first tangent direction, the first starting point, and the second tangent direction in the following manner: establishing a target curve with the first endpoint as the second starting point, the first starting point as the second endpoint, the first tangent direction as the tangent direction at the second starting point, and the second tangent direction as the tangent direction at the second endpoint; and determining the target curve as the target reference line.
[0078] In an exemplary embodiment, the third determining module 608 can establish a target curve by taking the first endpoint as the second starting point, the first starting point as the second endpoint, the first tangent direction as the tangent direction at the second starting point, and the second tangent direction as the tangent direction at the second endpoint in the following manner: establishing a first coordinate system with the second starting point as the origin and the first tangent direction as the horizontal axis; transforming the first coordinate of the second starting point from the second coordinate system to the first coordinate system to obtain the second coordinate; transforming the third coordinate of the second endpoint from the second coordinate system to the first coordinate system to obtain the fourth coordinate; transforming the first tangent direction from the second coordinate system to the first coordinate system to obtain the third tangent direction; transforming the second tangent direction from the second coordinate system to the first coordinate system to obtain the fourth tangent direction; determining a target parameter equation based on the second coordinate, the fourth coordinate, the third tangent direction, and the fourth tangent direction; determining a predetermined number of interpolated values; substituting the interpolated values into the target parameter equation to obtain interpolated coordinates; transforming the interpolated coordinates to the second coordinate system to obtain interpolated transformed coordinates; and determining the curve formed by the points corresponding to the interpolated transformed coordinates as the target curve.
[0079] In one exemplary embodiment, the target curve includes a Hermitian curve.
[0080] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0081] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0082] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0083] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0084] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0085] Embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the methods in various embodiments of the present application.
[0086] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0087] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0088] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of compiling a map, characterized by, include: Obtain road information stored in target nodes included in the first type of map, where the first type of map is a map that uses route nodes to represent a road segment; The road information includes first road information belonging to the target intersection and second road information belonging to the target road outside the target intersection; Based on the first road information, a first reference line for entering the target intersection and a second reference line for exiting the target intersection are determined. A third reference line for the target intersection is determined based on the first reference line and the second reference line. The fourth reference line of the target road is determined based on the second road information; A second type of map is compiled based on the third reference line and the fourth reference line. The second type of map is different from the first type of map. The second type of map is a map that uses reference lines (links) to represent a road segment. Determining the fourth reference line of the target road based on the second road information includes: determining the leftmost boundary line and the rightmost boundary line based on the lane marking information included in the second road information; determining the center line of the target road based on the leftmost boundary line and the rightmost boundary line; and determining the center line as the fourth reference line. Determining a third reference line for the target intersection based on the first reference line and the second reference line includes: determining a reference line pair, wherein the reference line pair includes a first target reference line in the first reference line and a second target reference line in the second reference line, the first target reference line and the second target reference line having the same lane marking; performing the following operations for each target reference line pair to determine the target reference line for the lane corresponding to the lane marking: determining a first end point of the first target reference line and a first tangent direction of the first end point, determining a first start point of the second target reference line and a second tangent direction of the first start point, determining the target reference line based on the first end point, the first tangent direction, the first start point, and the second tangent direction; and determining the target reference line of each target reference line pair as the third reference line.
2. The method according to claim 1, characterized in that, Determining the centerline of the target road based on the leftmost boundary line and the rightmost boundary line includes: The boundary line with more marker points included in the leftmost boundary line and the rightmost boundary line is determined as the target boundary line, and the boundary line with fewer marker points included in the leftmost boundary line and the rightmost boundary line is determined as the other boundary line. For any target marker point included in the target boundary line other than the starting point and the ending point, the following operations are performed to determine the first midpoint corresponding to the target marker point: determine the first point among the other boundary lines that is closest to the target marker point, and determine the midpoint of the line connecting the target marker point and the first point as the first midpoint; Determine a second consecutive midpoint between the starting point of the target boundary line and the starting points of the other boundary lines; Determine the third consecutive midpoint between the endpoint of the target boundary line and the endpoints of the other boundary lines; The line formed by the first midpoint, the second midpoint, and the third midpoint corresponding to each target identification point is determined as the center line.
3. The method according to claim 1, characterized in that, Determining the target reference line based on the first endpoint, the first tangent direction, the first starting point, and the second tangent direction includes: A target curve is established with the first endpoint as the second starting point, the first starting point as the second endpoint, the first tangent direction as the tangent direction at the second starting point, and the second tangent direction as the tangent direction at the second endpoint. The target curve is determined as the target reference line.
4. The method according to claim 3, characterized in that, The target curve is established by taking the first endpoint as the second starting point, the first starting point as the second endpoint, the first tangent direction as the tangent direction at the second starting point, and the second tangent direction as the tangent direction at the second endpoint, including: A first coordinate system is established with the second starting point as the origin and the first tangent direction as the horizontal axis. Transform the first coordinate of the second starting point from the second coordinate system to the first coordinate system to obtain the second coordinate; transform the third coordinate of the second ending point from the second coordinate system to the first coordinate system to obtain the fourth coordinate; transform the first tangent direction from the second coordinate system to the first coordinate system to obtain the third tangent direction; transform the second tangent direction from the second coordinate system to the first coordinate system to obtain the fourth tangent direction. The target parameter equation is determined based on the second coordinate, the fourth coordinate, the third tangent direction, and the fourth tangent direction; Determine a predetermined number of interpolated values; Substitute the interpolated values into the target parameter equation to obtain the interpolated coordinates; Transform the interpolated coordinates to the second coordinate system to obtain the interpolated transformed coordinates; The curve formed by the points corresponding to the interpolated coordinate transformation is determined as the target curve.
5. The method according to claim 3 or 4, characterized in that, The target curve includes the Hermitian curve.
6. A map compilation apparatus, characterized in that, include: The acquisition module is used to acquire road information stored in the target nodes included in the first type of map, where the first type of map is a map that uses route nodes to represent a road segment; The first determining module is used to determine the first road information belonging to the target intersection and the second road information belonging to the target road outside the target intersection included in the road information; The second determining module is used to determine a first reference line for entering the target intersection and a second reference line for exiting the target intersection based on the first road information. The third determining module is used to determine the third reference line of the target intersection based on the first reference line and the second reference line; The fourth determining module is used to determine the fourth reference line of the target road based on the second road information; The compilation module is used to compile a second type of map based on the third reference line and the fourth reference line, wherein the second type of map is different from the first type of map, and the second type of map is a map that uses reference lines (links) to represent a road segment; The fourth determining module determines the fourth reference line of the target road based on the second road information in the following manner: determining the leftmost boundary line and the rightmost boundary line based on the lane marking information included in the second road information; determining the center line of the target road based on the leftmost boundary line and the rightmost boundary line; and determining the center line as the fourth reference line. The second determining module determines the third reference line of the target intersection based on the first reference line and the second reference line in the following manner: determining a reference line pair, wherein the reference line pair includes a first target reference line in the first reference line and a second target reference line in the second reference line, the lane markings of the first target reference line and the second target reference line being the same; performing the following operations for each target reference line pair included in the reference line pair to determine the target reference line of the lane corresponding to the lane marking: determining the first end point of the first target reference line and the first tangent direction of the first end point, determining the first start point of the second target reference line and the second tangent direction of the first start point, determining the target reference line based on the first end point, the first tangent direction, the first start point, and the second tangent direction; and determining the target reference line of each target reference line pair as the third reference line.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to perform the method described in any one of claims 1 to 5 when executed.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 5.