Road boundary data processing method, device, equipment, medium and program product
By segmenting and interpolating at road boundaries, the generated virtual guide lines are smoother, solving the problems of high complexity and low accuracy in existing technologies, and achieving efficient and accurate virtual guide line generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-11-21
- Publication Date
- 2026-05-22
AI Technical Summary
Existing technologies are complex, inefficient, and generate inaccurate virtual guide lines when processing road boundary data for special roads, which may lead to incorrect navigation, especially in autonomous driving.
By determining the first and second dividing points on the road boundary, the road boundary is divided into multiple boundary segments. For each boundary segment pair, position point interpolation is performed to ensure that the number of position points is the same, and then the segments are spliced together to generate a virtual guide line.
It reduces processing complexity, improves data processing efficiency, and ensures the accuracy of the generated virtual guide lines, making it suitable for road boundary data of various complex shapes.
Smart Images

Figure CN122072977A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for processing road boundary data. Background Technology
[0002] Electronic maps are now widely used, bringing great convenience to daily travel. Virtual guide lines in electronic maps can aid in driving decisions during navigation, such as virtual center lines and lane dividers.
[0003] In the real world, roads come in various shapes and sizes. In the automated production of electronic maps, the virtual guide line drawing algorithm is poorly applied to some special roads (such as non-uniform width curved roads), or even fails to generate them at all.
[0004] Some related technologies have proposed methods for preprocessing road data for these special roads to meet the requirements of automated virtual guide line drawing algorithms. However, these technologies suffer from high processing complexity and low processing efficiency, and cannot guarantee the accuracy of the generated virtual guide lines. Summary of the Invention
[0005] Therefore, it is necessary to provide a road boundary data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the above-mentioned technical problems. This method can reduce the complexity of processing road boundary data, improve data processing efficiency, and ensure the accuracy of the processed data when generating virtual guide lines.
[0006] Firstly, this application provides a method for processing road boundary data, including:
[0007] Obtain road boundary data, wherein the road boundary data refers to the first road boundary and the second road boundary, which are located on both sides of the road;
[0008] A first dividing point is determined based on the first road boundary and the second road boundary. The determined first dividing point is located on the first road boundary or the second road boundary. Based on the determined first dividing point, a second dividing point is determined on the opposite boundary of the road boundary where the first dividing point is located.
[0009] The road boundary where the first dividing point is located is divided into multiple first boundary segments according to the first dividing point, and the road boundary where the second dividing point is located is divided into multiple second boundary segments according to the second dividing point. The multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other.
[0010] For each of the boundary segment pairs, position point interpolation is performed to obtain processed boundary segment pairs, wherein the two boundary segments included in the processed boundary segment pairs each have the same number of position points.
[0011] By splicing together the boundary segments of the same road boundary, a processed pair of road boundaries is obtained. The processed pair of road boundaries is used to generate virtual guide lines for the road in the electronic map.
[0012] Secondly, this application also provides a road boundary data processing device, comprising:
[0013] The acquisition module is used to acquire road boundary data, which refers to the first road boundary and the second road boundary, which are located on both sides of the road.
[0014] The segmentation module is used to determine a first segmentation point based on the first road boundary and the second road boundary, wherein the determined first segmentation point is located on the first road boundary or the second road boundary; and, based on the determined first segmentation point, to determine a second segmentation point on the opposite side boundary of the road boundary where the first segmentation point is located; to segment the road boundary where the first segmentation point is located into multiple first boundary segments based on the first segmentation point; and to segment the road boundary where the second segmentation point is located into multiple second boundary segments based on the second segmentation point; wherein the multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other.
[0015] An interpolation module is used to interpolate the position points of each of the boundary segment pairs to obtain processed boundary segment pairs, wherein the two boundary segments included in the processed boundary segment pairs each have the same number of position points.
[0016] The splicing module is used to splice the boundary segments of the same road boundary to obtain a processed pair of road boundaries, which are used to generate virtual guide lines for the road in the electronic map.
[0017] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0018] Obtain road boundary data, wherein the road boundary data refers to the first road boundary and the second road boundary, which are located on both sides of the road;
[0019] A first dividing point is determined based on the first road boundary and the second road boundary. The determined first dividing point is located on the first road boundary or the second road boundary. Based on the determined first dividing point, a second dividing point is determined on the opposite boundary of the road boundary where the first dividing point is located.
[0020] The road boundary where the first dividing point is located is divided into multiple first boundary segments according to the first dividing point, and the road boundary where the second dividing point is located is divided into multiple second boundary segments according to the second dividing point. The multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other.
[0021] For each of the boundary segment pairs, position point interpolation is performed to obtain processed boundary segment pairs, wherein the two boundary segments included in the processed boundary segment pairs each have the same number of position points.
[0022] By splicing together the boundary segments of the same road boundary, a processed pair of road boundaries is obtained. The processed pair of road boundaries is used to generate virtual guide lines for the road in the electronic map.
[0023] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0024] Obtain road boundary data, wherein the road boundary data refers to the first road boundary and the second road boundary, which are located on both sides of the road;
[0025] A first dividing point is determined based on the first road boundary and the second road boundary. The determined first dividing point is located on the first road boundary or the second road boundary. Based on the determined first dividing point, a second dividing point is determined on the opposite boundary of the road boundary where the first dividing point is located.
[0026] The road boundary where the first dividing point is located is divided into multiple first boundary segments according to the first dividing point, and the road boundary where the second dividing point is located is divided into multiple second boundary segments according to the second dividing point. The multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other.
[0027] For each of the boundary segment pairs, position point interpolation is performed to obtain processed boundary segment pairs, wherein the two boundary segments included in the processed boundary segment pairs each have the same number of position points.
[0028] By splicing together the boundary segments of the same road boundary, a processed pair of road boundaries is obtained. The processed pair of road boundaries is used to generate virtual guide lines for the road in the electronic map.
[0029] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0030] Obtain road boundary data, wherein the road boundary data refers to the first road boundary and the second road boundary, which are located on both sides of the road;
[0031] A first dividing point is determined based on the first road boundary and the second road boundary. The determined first dividing point is located on the first road boundary or the second road boundary. Based on the determined first dividing point, a second dividing point is determined on the opposite boundary of the road boundary where the first dividing point is located.
[0032] The road boundary where the first dividing point is located is divided into multiple first boundary segments according to the first dividing point, and the road boundary where the second dividing point is located is divided into multiple second boundary segments according to the second dividing point. The multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other.
[0033] For each of the boundary segment pairs, position point interpolation is performed to obtain processed boundary segment pairs, wherein the two boundary segments included in the processed boundary segment pairs each have the same number of position points.
[0034] By splicing together the boundary segments of the same road boundary, a processed pair of road boundaries is obtained. The processed pair of road boundaries is used to generate virtual guide lines for the road in the electronic map.
[0035] The aforementioned road boundary data processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire road boundary data, where the road boundary data refers to a first road boundary and a second road boundary, located on opposite sides of the road. Based on the first and second road boundaries, a first segmentation point is determined, located on either the first or second road boundary. According to the determined first segmentation point, a second segmentation point is determined on the opposite boundary of the road boundary where the first segmentation point is located. Based on the first segmentation point, the road boundary where the first segmentation point is located is divided into multiple first boundary segments. Based on the second segmentation point, the road boundary where the second segmentation point is located is divided into multiple second boundary segments. Multiple first boundary segments and multiple second boundary segments constitute multiple pairs of boundary segment pairs, each consisting of a first boundary segment and a second boundary segment that are opposite to each other. In each boundary segment pair, the two boundary segments are opposite to each other. Position point interpolation is performed on each boundary segment pair to obtain a processed boundary segment pair. The two boundary segments included in the processed boundary segment pair each have the same number of position points. Finally, the boundary segments of the same road boundary are spliced together to obtain a processed pair of road boundaries. The processed pair of road boundaries is used to generate virtual guide lines for roads in electronic maps.
[0036] By using the first and second dividing points, the road boundary data representing a pair of road boundaries is divided into at least two boundary segment pairs. For each boundary segment pair, position point interpolation is performed. This makes the final generated virtual guide line of the road smoother, thereby ensuring the accuracy of subsequent virtual guide line generation based on the processed data. Furthermore, since the number of interpolated position points is controllable, the amount of processed data will not be too large, thus reducing the computational complexity of the virtual guide line. Moreover, the processing method is applicable to road boundary data of various complex shapes, reducing the complexity of processing road boundary data and improving data processing efficiency. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is an application environment diagram of the road boundary data processing method in some embodiments;
[0039] Figure 2This is a schematic diagram of the virtual centerline of a road in some embodiments;
[0040] Figure 3 This is a schematic diagram of lane dividers for roads in some embodiments;
[0041] Figure 4 This is a flowchart illustrating the road boundary data processing method in some embodiments;
[0042] Figure 5 This is a schematic diagram of a pair of road boundaries in some embodiments;
[0043] Figure 6 This is a schematic diagram illustrating the situation where the lines connecting corresponding points intersect in some embodiments;
[0044] Figure 7 This is a schematic diagram showing that in some embodiments, the corresponding line connecting the shape and the boundary have three intersection points;
[0045] Figure 8 This is a schematic diagram illustrating how a pair of road boundaries are divided into boundary segments in some embodiments;
[0046] Figure 9 This is a schematic diagram showing the comparison of a pair of road boundaries before and after processing in some embodiments;
[0047] Figure 10 This is a flowchart illustrating the road boundary data processing method in a detailed embodiment;
[0048] Figure 11 This is a flowchart illustrating a road boundary data processing method in a specific embodiment.
[0049] Figure 12 This is a structural block diagram of a road boundary data processing device in one embodiment;
[0050] Figure 13 This is an internal structural diagram of a computer device in one embodiment;
[0051] Figure 14 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0053] In electronic maps, virtual guide lines can aid in driving decisions during navigation. Examples include virtual center lines and lane dividers. Typically, in automated electronic map production, virtual guide lines are displayed on the map based on road boundary data and virtual guide line drawing algorithms. The steps for generating virtual guide lines are: 1. Based on the collected road data, obtain the road boundary data, which refers to a pair of road boundaries: the first road boundary and the second road boundary. 2. Generate virtual guide lines based on the corresponding points on the pair of road boundaries. Therefore, determining the one-to-one correspondence of points on the pair of road boundaries is crucial for generating virtual guide lines.
[0054] In the real world, roads come in various shapes and sizes. When collecting road data for some special roads (such as non-uniform width curved roads) and then obtaining road boundary data, if virtual guide line drawing algorithms are directly applied to these road boundary data to generate virtual guide lines, it may cause errors in the generated electronic map. This is especially true when electronic maps are used for autonomous driving, which requires navigation based on the map data of the electronic map. If the lane guide lines displayed on the electronic map are incorrect, it may provide incorrect and dangerous map data during autonomous driving, leading to incorrect driving and affecting driving safety.
[0055] Related technologies have proposed some methods for preprocessing road boundary data for these special roads to meet the requirements of automated virtual guide line drawing algorithms. However, these technologies suffer from high processing complexity, low processing efficiency, and inability to guarantee the accuracy of the generated virtual guide lines. To address this, this application provides a road boundary data processing method. For a pair of road boundaries, the method divides the pair into at least two boundary segment pairs using a first and a second dividing point. For each boundary segment pair, position point interpolation is performed. This results in smoother virtual guide lines for the final generated road, ensuring accuracy when generating virtual guide lines based on the processed data. Furthermore, since the number of interpolated position points is controllable, the amount of processed data is not excessive, thus reducing the computational complexity of the virtual guide lines. The processing method is applicable to road boundary data of various complex shapes, reducing the complexity of processing road boundary data and improving data processing efficiency.
[0056] It should be noted that the road boundary data processing method provided in this application embodiment can be applied to various scenarios such as intelligent transportation and assisted driving. Specifically, it can be various scenarios that use electronic maps, such as autonomous driving, traffic management, urban planning, tourism, logistics, etc. This application embodiment does not limit these scenarios.
[0057] The road boundary data processing method provided in this application can be executed by a computer device, which can be a server or a terminal. Figure 1 As shown, this is an application environment for a road boundary data processing method in one embodiment. Figure 1 The application environment shown includes a terminal 102 and a server 104, wherein the terminal 102 communicates with the server 104 via a network. A data storage system can store the data that the server 104 needs to process. The data storage system can be integrated onto the server 104 or located in the cloud or on another network server. In some embodiments, the server 104 can execute the road boundary data processing method provided in this application embodiment.
[0058] Specifically, server 104 can obtain road boundary data based on the collected road data. Road boundary data refers to a pair of road boundaries, where the two road boundaries in a pair are opposite boundaries. The pair of road boundaries includes a first road boundary and a second road boundary, which can be denoted as L1 and L2, respectively. The road boundary data includes multiple location points representing the first road boundary, i.e., a sequence of first location points. The road also includes multiple location points representing the second road boundary, i.e., a sequence of second location points. The multiple location points representing the first road boundary are ordered along the road direction; connecting the first location point to the last location point sequentially forms a directional first road boundary. Similarly, the multiple location points representing the second road boundary are ordered along the road direction; connecting the first location point to the last location point forms a directional second road boundary. It is understood that in some cases, the number of location points representing the first road boundary may not be the same as the number of location points representing the second road boundary. After processing using the road boundary data processing method provided in this application embodiment, the number of location points for the two road boundaries in the processed pair of road boundaries is the same, thus obtaining a one-to-one correspondence of location points. Location points are the basic data units for describing road information. For example, a series of ordered location points can represent road boundaries; another example is that a series of ordered location points can represent lane dividers; yet another example is that in a series of ordered location points, the first and last location points coincide, so these location points can be used to represent traffic islands at intersections. In some embodiments, each location point is represented by three data points: longitude, latitude, and relative elevation. The relative elevation is the elevation relative to a reference plane (e.g., sea level). In some embodiments, each location point is represented by three data points: the abscissa of the location point in a preset two-dimensional plane converted from longitude, the ordinate of the location point in the preset two-dimensional plane converted from latitude, and the relative elevation.
[0059] Server 104 acquires road boundary data, referring to the first and second road boundaries. Based on these boundaries, server 104 determines a first dividing point, located on either the first or second road boundary. Then, based on this first dividing point, a second dividing point is determined on the opposite boundary of the road boundary where the first dividing point is located. This divides each road boundary into two or more segments, ensuring that the information density of each of the at least two resulting boundary segments is as low as possible, resulting in smoothness and thus guaranteeing the accuracy of the subsequently generated virtual guide lines. When determining the first dividing point, server 104 can select from multiple location points representing the first and second road boundaries, adhering to the principle of minimizing the information density of each of the at least two resulting boundary segments. For example, server 104 can identify points with sharp "turns" as dividing points; this will be explained in detail later.
[0060] Next, server 104 divides the road boundary where the first dividing point is located according to the first dividing point, and divides the road boundary where the second dividing point is located according to the second dividing point, to obtain at least two boundary segment pairs, wherein the two boundary segments in each boundary segment pair are opposite boundary segments.
[0061] Then, server 104 performs position point interpolation on each boundary segment pair to obtain boundary segment pairs with the same number of position points; that is, it performs position point interpolation on each boundary segment pair to make the number of position points of the boundary segment the same as the number of position points of the opposite boundary segment.
[0062] Then, server 104 splices the boundary segments of the same road boundary to obtain a processed pair of road boundaries, which is the processed road boundary data.
[0063] The entire processing ensures the accuracy of generating virtual guide lines based on the processed data. Furthermore, since the number of interpolation points is controllable, the amount of processed data will not be too large, thus reducing the computational complexity of the virtual guide lines. The processing method is applicable to road boundary data of various complex shapes, which can reduce the complexity of processing road boundary data and improve data processing efficiency.
[0064] In some embodiments, server 104 can send a processed pair of road boundaries to terminal 102, and terminal 102 can generate virtual guide lines for the roads in an electronic map. For example, during map navigation on the electronic map on terminal 102, when it is necessary to draw virtual guide lines for the target road, terminal 102 can request server 102 to draw the virtual guide lines for the target road. Server 104 can then send the road boundary data of the target road obtained in the above manner to terminal 102, and terminal 102 can draw virtual guide lines on the target road based on the received processed road boundary data.
[0065] It is understood that the roads in this application embodiment are roads displayed on electronic maps that correspond to actual roads. They can be multi-lane roads, where the road boundary data describes the outermost two sides of the road. They can also be single-lane roads, where the road boundary data describes the two sides of the road. Furthermore, they can be roads formed by some lanes of a multi-lane road. For example, a road might be formed by the leftmost lane at an intersection where left turns are permitted; in this case, the road boundary data is the left and right boundaries of that leftmost lane. Another example is a road formed by the two middle lanes at an intersection where straight-ahead traffic is permitted; in this case, the road boundary data is the leftmost and rightmost boundaries of those two middle lanes. Yet another example is a road formed by the three rightmost lanes at an intersection where right turns are permitted; in this case, the road boundary data is the leftmost and rightmost boundaries of those three rightmost lanes.
[0066] Virtual guide lines for roads can be virtual center lines displayed on electronic maps, used to guide vehicles to travel along the roads containing these virtual center lines, referring to the electronic map. For example, when a vehicle is about to approach an intersection and can turn right along any of the three lanes on its right, a virtual center line can be displayed on the electronic map along the road formed by those three right-hand lanes, indicating that it can turn right after traveling along any of those three lanes. Figure 2 The image shown is a schematic diagram of the virtual centerline of a road in one embodiment. (Refer to...) Figure 2 Part (a) represents the virtual centerline of a multi-lane road. (See reference...) Figure 2 Part (b) represents the virtual centerline of a single-lane road. (See reference...) Figure 2 Part (c) represents the virtual centerline of the three right-hand lanes in a multi-lane road. Figure 2Taking a single-lane road as an example, the road boundary data of the single-lane road is processed to obtain a pair of processed road boundaries. Each side of the processed pair of road boundaries includes N location points. The process of generating a virtual center line based on the processed pair of road boundaries can be as follows: connect the corresponding location points on the processed pair of road boundaries to generate N corresponding point lines. Take the midpoint on each corresponding point line, resulting in a total of N midpoints. Then, connect the N midpoints longitudinally to generate the virtual center line of the single-lane road. Since the number of location points on the processed pair of road boundaries is consistent and the location points are uniform, it can be ensured that the shape and trend of the generated virtual center line are consistent with the location points on the left and right boundaries.
[0067] Virtual guide lines for roads can also be lane dividers displayed on electronic maps. Lane dividers are used to distinguish each lane, guiding vehicles to travel along the lanes on the road by referring to the electronic map. For example... Figure 3 The diagram shown is a schematic representation of lane dividers in one embodiment of a road. (Refer to...) Figure 3 , Figure 3 The image shows a five-lane road with four lane markings in the middle. Figure 3 Taking a five-lane road as an example, the road boundary data of the five-lane road is processed to obtain a pair of processed road boundaries. Each side of the processed pair of road boundaries includes N position points. The process of generating four lane dividing lines based on the processed pair of road boundaries can be as follows: Connect the corresponding position points on the processed pair of road boundaries to generate N corresponding point lines. According to the number of lanes 5, take 4 lane dividing points from left to right on each corresponding point line, namely P1, P2, P3, and P4, for a total of N*4 lane dividing points. Then, connect the N P1 lane dividing points, the N P2 lane dividing points, the N P3 lane dividing points, and the N P4 lane dividing points vertically to generate 4 lane dividing lines. Since the number of position points on the processed pair of road boundaries is consistent and uniform, it can be ensured that the shape and trend of the generated lane dividing lines are consistent with the outermost left and right boundary position points.
[0068] The terminal 102 mentioned above can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0069] Next, the road boundary data processing method provided in the embodiments of this application will be described. In an exemplary embodiment, such as Figure 4 As shown, a road boundary data processing method is provided, which can be applied to... Figure 1 The following steps are used as an example of computer equipment (e.g., server 104), including steps 402 to 410. Wherein:
[0070] Step 402: Obtain road boundary data. The road boundary data refers to the first road boundary and the second road boundary, which are located on both sides of the road.
[0071] Roads are those displayed on the electronic map. Roads can be multi-lane roads, single-lane roads, or roads formed by partial lanes of a multi-lane road. Road boundary data describes the boundaries of roads. Road boundary data refers to a pair of road boundaries, denoted as the first road boundary and the second road boundary. The two boundaries in a pair are opposite boundaries; that is, the first road boundary is the opposite boundary of the second road boundary, and the second road boundary is the opposite boundary of the first road boundary. Road boundary data includes multiple location points representing the first road boundary and multiple location points representing the second road boundary. The number of location points representing the first road boundary and the number of location points representing the second road boundary can be the same or different. For example... Figure 5 The diagram shown is a schematic diagram of a pair of road boundaries in one embodiment. The first road boundary and the second road boundary can be denoted as L1 and L2, respectively.
[0072] Optionally, the multiple location points representing the first road boundary are ordered along the road direction, forming a first location point sequence. In this first location point sequence, connecting the first location point to the last location point sequentially constitutes a directional first road boundary. Similarly, the multiple location points representing the second road boundary are ordered along the road direction, forming a second location point sequence. In this second location point sequence, connecting the first location point to the last location point constitutes a directional second road boundary.
[0073] In some embodiments, each location point is represented by three data points: longitude, latitude, and relative elevation. These three data points represent the location information of the location point, where the relative elevation is the elevation relative to a reference plane (e.g., sea level). In some embodiments, each location point is represented by three data points: the x-coordinate in a preset two-dimensional plane converted from longitude, the y-coordinate in a preset two-dimensional plane converted from latitude, and the relative elevation. These three data points represent the location information of the location point. Different location points have different corresponding location information.
[0074] In some embodiments, the road is a non-uniform width road, meaning the road width varies. For example, the road may be a north-south road whose width gradually decreases from south to north. In some embodiments, the road may also be a uniform width road. In some embodiments, the road may be a curved road with curved boundaries on both sides.
[0075] Road boundary data can be stored in a map database, and computer devices can retrieve the road boundary data of any road from the map database. From a data source perspective, road boundary data can be raw map data from the map database, or intermediate data obtained after preprocessing the raw map data. In this embodiment, the road boundary data is processed, which is a further "compilation" of the road boundary data, enabling the processed road boundary data to be used with virtual guide line generation algorithms, thereby ensuring the accuracy of subsequent virtual guide line generation based on the processed road boundary data.
[0076] Step 404: Determine a first dividing point based on the first road boundary and the second road boundary. The determined first dividing point is located on the first road boundary or the second road boundary. Based on the determined first dividing point, determine a second dividing point on the opposite boundary of the road boundary where the first dividing point is located.
[0077] In some embodiments, the computer device may further detect whether the road boundary data meets one of the following conditions before determining the first segmentation point based on the first road boundary and the second road boundary. To generate accurate virtual guide lines for the road, the computer device can detect the road boundary data to determine whether it meets at least one of the following conditions. If it does, it indicates that the road boundary data does not yet meet the conditions required for generating virtual guide lines, and subsequent steps need to be performed on the road boundary data to make it meet the conditions required for generating virtual guide lines. As mentioned above, the virtual guide line generation steps are: 1. Obtaining road boundary data based on the collected road data, the road boundary data including a pair of road boundaries; 2. Generating virtual guide lines based on the corresponding position points of the pair of road boundaries. In the process of generating virtual guide lines, determining the one-to-one corresponding position points on a pair of road boundaries is crucial. Therefore, in some embodiments, the virtual guide line generation conditions may include at least one of the following conditions: consistency of the number of position points, non-intersecting lines between corresponding points, and non-intersecting lines between corresponding points and boundaries.
[0078] The condition of consistency in the number of location points means that the number of multiple location points representing the first road boundary and the number of multiple location points representing the second road boundary should be the same. Under this condition, the multiple location points representing the first road boundary and the multiple location points representing the second road boundary can correspond one-to-one. That is, only a pair of road boundaries that are opposite sides of each other can have corresponding location points, which can ensure the accurate and reasonable generation of virtual guide lines in the future.
[0079] The condition that corresponding point lines do not intersect means that the lines connecting corresponding points representing the first road boundary and the second road boundary should not intersect. If the corresponding point lines intersect, the subsequent generation of virtual guide lines based on these lines will result in folding, making it impossible to accurately generate virtual guide lines. Incorrect virtual guide lines may lead to incorrect driving and affect driving safety. Figure 6 The diagram shown illustrates a scenario where the lines connecting corresponding points intersect.
[0080] The condition that the connecting lines between corresponding points do not intersect the boundary means that among the multiple location points representing the first road boundary and the multiple location points representing the second road boundary, the connecting lines obtained by connecting the corresponding location points should not have more than three intersection points with the first road boundary or the second road boundary. That is, except for the two endpoints, they should not intersect the boundary. If the connecting lines between corresponding points intersect the boundary, it will cause the virtual guide lines to fold when they are subsequently generated based on these connecting lines. For example... Figure 7 The diagram shown illustrates that the line connecting the corresponding shapes intersects the boundary at three points.
[0081] Accordingly, subsequent processing steps will only proceed if the road boundary data meets at least one of the following conditions. The road boundary data includes a first location point sequence and a second location point sequence, where the first location point sequence refers to the first road boundary and the second location point sequence refers to the second road boundary. The conditions include:
[0082] 1. The number of position points in the first position point sequence and the second position point sequence are different;
[0083] 2. When the number of position points in the first position point sequence and the second position point sequence are the same, there are at least two lines connecting corresponding points that intersect. Among them, position points in the first position point sequence and position points in the second position point sequence with the same position constitute a set of corresponding position points, and the line connecting a set of corresponding position points is a line connecting corresponding points.
[0084] 3. When the number of position points in the first position point sequence and the second position point sequence are the same and all corresponding point lines do not intersect, there exists at least one corresponding point line that intersects with any road boundary at more than two points, and any road boundary is either the first road boundary or the second road boundary.
[0085] In some embodiments, determining whether a pair of road boundaries requires further processing may involve: obtaining a first position point sequence representing the first road boundary in the pair and a second position point sequence representing the second road boundary in the pair; detecting whether the number of position points in the first position point sequence is consistent with the number of position points in the second position point sequence; if they are inconsistent, it is determined that the pair of road boundaries does not meet the conditions required for generating virtual guide lines and requires further processing; if the number of position points is consistent, detecting whether the lines connecting the corresponding points intersect; if they intersect, it is determined that the conditions required for generating virtual guide lines are not met and requires further processing; if the lines connecting the corresponding points do not intersect, detecting whether the lines connecting the corresponding points have two or more intersections with the first or second road boundary; if there are two or more intersections, it is determined that the pair of road boundaries does not meet the conditions required for generating virtual guide lines and requires further processing; if there are no two or more intersections, it is determined that the pair of road boundaries meets the conditions for generating virtual guide lines and can be directly used to generate virtual guide lines without further processing.
[0086] It is understandable that roads in the real world vary in shape, and the road boundary data of some roads cannot meet the conditions required to generate virtual guide lines, such as non-uniform width curved roads. It is necessary to process the road boundary data of these roads to ensure the accuracy of the subsequently generated virtual guide lines.
[0087] Specifically, after acquiring road boundary data, the computer device can determine a first dividing point based on the first road boundary and the second road boundary. The determined first dividing point is located on the first road boundary or the second road boundary. Based on the determined first dividing point, a second dividing point is determined on the opposite boundary of the road boundary where the first dividing point is located.
[0088] In some embodiments, after acquiring road boundary data, the computer device detects whether at least one of the above conditions is met. If so, a first dividing point is determined based on the first road boundary and the second road boundary. The determined first dividing point is located on the first road boundary or the second road boundary. Based on the determined first dividing point, a second dividing point is determined on the opposite boundary of the road boundary where the first dividing point is located.
[0089] In some embodiments, the computer device can first determine a first dividing point from all location points of a pair of road boundaries indicated by road boundary data, and then determine a second dividing point from the opposite boundary of the road boundary where the first dividing point is located. Using the first and second dividing points, the pair of road boundaries with higher information density can be divided into multiple boundary segments. After segmentation, boundary segments with relatively lower information density are obtained. These boundary segments are smaller data units than the boundaries themselves, are smoother, and contain less data. Thus, further processing based on these boundary segments reduces processing complexity, decreases computational resource consumption, and allows for the rapid generation of a pair of road boundaries that meet the conditions for virtual guide line generation, thereby improving the efficiency of road boundary data processing.
[0090] It should be noted that the first dividing point is one of multiple points representing a pair of road boundaries. The second dividing point may be one of multiple points representing the opposite boundary of the road boundary where the first dividing point is located. Alternatively, the second dividing point may be a point on the opposite boundary line of the road boundary where the first dividing point is located. The opposite boundary line is a broken line formed by connecting multiple points representing the opposite boundary of the road boundary where the first dividing point is located; it is also called the broken line containing the opposite boundary. In other words, the second dividing point is not necessarily one of multiple points representing the opposite boundary of the road boundary where the first dividing point is located.
[0091] In some embodiments, determining a first dividing point based on a first road boundary and a second road boundary includes: determining at least one location point from the first road boundary and the second road boundary as a first dividing point based on the location information of each location point on the first road boundary and the location information of each location point on the second road boundary.
[0092] Step 406: Divide the road boundary where the first dividing point is located into multiple first boundary segments according to the first dividing point, and divide the road boundary where the second dividing point is located into multiple second boundary segments according to the second dividing point. The multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are on opposite sides of each other.
[0093] In some embodiments, determining a second dividing point on the opposite boundary of the road boundary where the first dividing point is located, based on the determined first dividing point, includes: when the determined first dividing point is located on the first road boundary, determining at least one location point from the second road boundary as the second dividing point based on the location information of the determined first dividing point and the location information of each location point on the second road boundary; dividing the road boundary where the first dividing point is located into multiple first boundary segments based on the first dividing point, and dividing the road boundary where the second dividing point is located into multiple second boundary segments based on the second dividing point, includes: dividing the first road boundary into multiple first boundary segments based on the first dividing point, and dividing the second road boundary into multiple second road boundary segments based on the second dividing point.
[0094] In some embodiments, determining a second dividing point on the opposite boundary of the road boundary where the first dividing point is located, based on the determined first dividing point, includes: when the determined first dividing point is located on the second road boundary, determining at least one location point from the first road boundary as the second dividing point based on the location information of the first dividing point and the location information of each location point on the first road boundary; dividing the road boundary where the first dividing point is located into multiple first boundary segments based on the first dividing point, and dividing the road boundary where the second dividing point is located into multiple second boundary segments based on the second dividing point, includes: dividing the second road boundary into multiple second boundary segments based on the first dividing point, and dividing the first road boundary into multiple first boundary segments based on the second dividing point.
[0095] In some embodiments, when the first dividing point is one of the location points included in the first road boundary, after determining the second dividing point from the second road boundary based on the first dividing point and the second road boundary, the computer device can divide the first road boundary into two segments based on the first dividing point and the second road boundary into two segments based on the second dividing point, thus obtaining two boundary segment pairs.
[0096] In some embodiments, when the first dividing point is one of the location points included in the second road boundary, after determining the second dividing point from the first road boundary based on the first dividing point and the first road boundary, the computer device can divide the second road boundary into two segments based on the first dividing point and the first road boundary into two segments based on the second dividing point, thus obtaining two boundary segment pairs.
[0097] In some embodiments, the number of first segmentation points is 1, and the number of second segmentation points is 1. For example... Figure 8 As shown in part (a), a pair of road boundaries includes a first road boundary L1 and a second road boundary L2. When the first dividing point is L1Point1, one of the location points included in the first road boundary L1, and the second dividing point is L2P1, a point on the road boundary line where the second road boundary L2 is located, the first road boundary L1 is divided into L1-a and L1-b based on the first dividing point L1Point1, and the second road boundary L2 is divided into L2-a and L2-b based on the second dividing point L2P1, thus obtaining two boundary segment pairs, wherein L1-a and L2-a constitute one boundary segment pair, and L1-b and L2-b constitute one boundary segment pair.
[0098] It should be noted that, as mentioned earlier, the multiple location points representing a road boundary are ordered. After dividing the first road boundary L1 into L1-a and L1-b based on the first dividing point L1Point1, and dividing the second road boundary L2 into L2-a and L2-b based on the second dividing point L2P1, the location points representing the first road boundary that are located before the first dividing point L1Point1 form a boundary segment, and the location points representing the second road boundary that are located before the second dividing point L2P1 form a boundary segment, thus forming a boundary segment pair. That is, L1-a and L2-a form a boundary segment pair, rather than L1-a and L2-b forming a boundary segment pair.
[0099] In some embodiments, the number of first segmentation points is greater than one, and correspondingly, the number of second segmentation points is greater than one. It is understood that when both the number of first and second segmentation points are greater than one, the computer device can divide the pair of road boundaries into three or more boundary segment pairs at each first and second segmentation point. For example... Figure 8 As shown in part (b), a pair of road boundaries includes a first road boundary L1 and a second road boundary L2. When the first dividing point is the location points L1Point1 and L1Point2 included in the first road boundary L1, and the second dividing point is the points L2P1 and L2P2 on the boundary line corresponding to the second road boundary L2, the first road boundary L1 is divided into L1-a, L1-b and L1-c based on the first dividing points L1Point1 and L1Point2, and the second road boundary L2 is divided into L2-a, L2-b and L2-c based on the second dividing points L2P1 and L2P2, thus obtaining three boundary segment pairs. Among them, L1-a and L2-a form a boundary segment pair, L1-b and L2-b form a boundary segment pair, and L1-c and L2-c form a boundary segment pair.
[0100] Step 408: Perform position point interpolation on each boundary segment pair to obtain the processed boundary segment pair. The two boundary segments included in the processed boundary segment pair each have the same number of position points.
[0101] For each boundary segment pair obtained in the aforementioned steps, the computer device performs position point interpolation on each boundary segment pair to obtain a processed boundary segment pair. The two boundary segments included in the processed boundary segment pair each have the same number of position points.
[0102] In some embodiments, the computer device may further detect the processed boundary segment pairs to determine whether they meet the conditions required for generating virtual guide lines. Specifically, it detects whether each processed boundary segment pair meets at least one of the following conditions, and if the processed boundary segment pair meets at least one of the following conditions, the boundary segment pair is further segmented; wherein the multiple conditions include:
[0103] 1. Based on the processed boundary segment pairs, determine the corresponding point connection lines. There are at least two corresponding point connection lines that intersect. Among them, the position points with the same position order in the processed boundary segment pairs constitute a set of corresponding position points, and the line connecting a set of corresponding position points is the corresponding point connection line.
[0104] 2. If all corresponding point lines do not intersect, there exists at least one corresponding point line that intersects with any of the processed boundary segment pairs at more than two points.
[0105] If at least one of the above conditions is met, the boundary segment pairs are further segmented. Specifically, the boundary segment pairs can be treated as a new pair of lane boundaries; that is, following the divide-and-conquer strategy mentioned above, each boundary segment pair is treated as a new pair of road boundaries, and the above segmentation steps are performed on this new pair of road boundaries. To ensure processing efficiency, in some embodiments, the number of iterations is limited to no more than three. In some embodiments, if, after reaching the set maximum number of iterations, at least one boundary segment pair still fails to meet the conditions required for generating virtual guide lines, then other rules can be applied to this boundary segment pair.
[0106] Step 410: The boundary segments of the same road boundary are spliced together to obtain a processed pair of road boundaries. The processed pair of road boundaries are used to generate virtual guide lines for roads in the electronic map.
[0107] For example, in the example above, L1-a and L2-a form one boundary segment pair, L1-b and L2-b form another, and L1-c and L2-c form yet another. If the number of position points in boundary segment L1-a is greater than that in boundary segment L2-a, the computer can interpolate the position points of boundary segment L2-a based on the number of position points in L1-a, ensuring that the interpolated L1-a and L2-a have the same number of position points, thus obtaining a boundary segment pair with the same number of position points. Finally, the multiple boundary segments corresponding to the first road boundary L1 are concatenated, and the multiple boundary segments corresponding to the second road boundary L2 are concatenated to obtain a processed pair of road boundaries. It can be understood that the two boundaries in the processed pair of road boundaries have the same number of position points.
[0108] The aforementioned road boundary data processing method, for a pair of road boundaries that do not meet the conditions for generating virtual guide lines, divides the pair of road boundaries into at least two boundary segment pairs using a first and a second dividing point. For each boundary segment pair, position point interpolation is performed. This makes the final generated virtual guide line of the road smoother, thereby ensuring the accuracy of subsequent virtual guide line generation based on the processed data. Furthermore, since the number of interpolated position points is controllable, the amount of processed data will not be too large, thus reducing the computational complexity of the virtual guide line. Moreover, the processing method is applicable to road boundary data of various complex shapes, reducing the complexity of processing road boundary data and improving data processing efficiency.
[0109] In some embodiments, the road boundary data includes a first location point sequence and a second location point sequence, where the first location point sequence refers to a first road boundary and the second location point sequence refers to a second road boundary. Determining a first dividing point on a pair of road boundaries includes: for every three adjacent location points in the first location point sequence and every three adjacent location points in the second location point sequence, calculating the angle between the three adjacent location points based on their respective location information, where the angle is the angle formed by connecting the three adjacent location points in rank; and taking the middle location point among three adjacent location points whose angle is less than a set threshold as the first dividing point.
[0110] Specifically, in the sequence of first position points representing the first road boundary, every three adjacent position points are connected sequentially to form an angle. Similarly, in the sequence of first position points representing the second road boundary, every three adjacent position points are connected sequentially to form an angle. For illustrative purposes only, let's take an example where the sequence of first position points representing the first road boundary has five position points, numbered A, B, C, D, and E in the order of the road direction. Connecting these five position points sequentially yields four line segments: AB, BC, CD, and DE. Line segments AB and BC form an angle ∠ABC, corresponding to position point B; BC and CD form an angle ∠BCD, corresponding to position point C; and CD and DE form an angle ∠CDE, corresponding to position point D. These five position points together form four angles. The computer device can filter out angles that are less than a set threshold from these angles, and use the middle point of the three adjacent points corresponding to the selected angle as the first dividing point.
[0111] Optionally, if the number of first dividing points is 1, the computer device can select the angle with the smallest angle from the first position point sequence representing the first road boundary, where every three adjacent position points are connected in order to form an angle, and from the second position point sequence representing the second road boundary, where every three adjacent position points are connected in order to form an angle, and take the middle position point among the three adjacent position points as the first dividing point.
[0112] Optionally, if the number of first dividing points is greater than one, the computer device can select N smaller angles from these angles to determine N position points, where N is greater than 1. Optionally, if the number of first dividing points is greater than one, the computer device can select all acute angles from these angles and take the middle position point among the three adjacent position points corresponding to the acute angle as the first dividing point.
[0113] In this embodiment, among the multiple location points representing the first road boundary, three adjacent location points form an angle. Similarly, among the multiple location points representing the second road boundary, three adjacent location points form an angle. From the perspective of information density, the smaller the angle, the higher the information density. By selecting an angle with an angle less than a set threshold, the middle location point among the three adjacent location points corresponding to the selected angle is designated as the first dividing point. That is, the location point corresponding to the angle is the one located in the middle of the three adjacent location points. In this way, at least one suitable first dividing point can be found, so that a certain boundary can be effectively divided into multiple boundary segments based on the first dividing point. Compared with dividing at other location points, this can minimize the information content of the two boundary segments obtained by the division, and the two boundary segments obtained by the division are smoother. Thus, subsequent processing based on the boundary segments can reduce processing complexity and quickly obtain a pair of road boundaries that meet the conditions for generating virtual guide lines, thereby improving the processing efficiency of road boundary data.
[0114] In some embodiments, calculating the included angle between three adjacent position points includes: connecting the three adjacent position points sequentially to form two line segments; obtaining the line segment vectors of the two line segments based on the position information of their respective endpoints; and calculating the included angle between the three adjacent position points based on the two line segment vectors.
[0115] In this embodiment, the modulus of the line segment is calculated based on the position information of the two endpoints (i.e., position points) constituting the line segment. The line segment vector is then calculated based on the position information of the two endpoints. The cosine value of the included angle can be obtained from the modulus and the line segment vector. The angle of the included angle can then be calculated from the cosine value. For example, in the example above, for line segments AB and BC forming an included angle ∠ABC, firstly, based on the position information of position point A... and the location information of location point B Calculate the magnitude of line segment AB and obtain the line segment vector. Based on the location information of location point B and the location information of location point C Calculate the magnitude of line segment BC and obtain the line segment vector. According to line segment vectors and line segment vector The vector product can be calculated, and the cosine value of ∠ABC can be calculated based on the vector product and the magnitude. The size of ∠ABC can then be calculated based on the cosine value.
[0116] In some embodiments, the computer device can also calculate the slope of the line segment based on the position information of the two endpoints constituting the line segment, calculate the tangent of the included angle based on the slope of the two line segments, and calculate the angle of the included angle based on the tangent.
[0117] In one embodiment, determining a second dividing point on the opposite side boundary of the road boundary where the first dividing point is located, based on the determined first dividing point, includes: determining the point closest to the first dividing point from the opposite side boundary of the road boundary where the first dividing point is located, based on the location information of the determined first dividing point and the location information of each location point on the opposite side boundary of the road boundary where the first dividing point is located, as the second dividing point.
[0118] In this embodiment, the point closest to the first dividing point is determined from the opposite side of the road boundary where the first dividing point is located. The distance between this closest point and the first dividing point is the narrowest part of the road. This closest point is used as the second dividing point. In this way, the road boundary is divided into two sections according to the first dividing point and the second dividing point. This can effectively ensure that the boundary segments on both sides after the division are relatively smooth, thereby ensuring the accuracy of generating virtual guide lines based on the processed data.
[0119] In one embodiment, determining the point closest to the first dividing point from the opposite boundary of the road boundary where the first dividing point is located includes: determining the connecting line segments between pairs of adjacent points based on the position information of pairs of adjacent points on the opposite boundary; drawing a perpendicular line segment for each connecting line segment through the first dividing point; and calculating the length of the perpendicular line segment if at least one perpendicular line segment intersects with the corresponding connecting line segment, and taking the intersection of the perpendicular line segment with the shortest length and the corresponding connecting line segment as the second dividing point.
[0120] For example, suppose the road boundary where the first dividing point H is located is the second road boundary L2, and the opposite boundary is the first road boundary L1. This means there are 5 points on the first road boundary L1, which are A, B, C, D, and E in order along the road direction. Connecting these 5 points in sequence yields 4 line segments AB, BC, CD, and DE. Perpendiculars are drawn from the first dividing point H to these line segments AB, BC, CD, and DE, respectively, and denoted as HN1, HN2, HN3, and HN4. If only one of these... If the foot of the perpendicular falls on the connecting line segment, meaning only one perpendicular line segment intersects the corresponding connecting line segment, then the perpendicular point corresponding to the foot of the perpendicular, i.e., the intersection point, can be used as the second dividing point. If two or more perpendicular lines fall on the corresponding connecting line segment, meaning two or more perpendicular lines intersect the corresponding connecting line segment, then the perpendicular point with the shortest perpendicular line segment is taken as the second dividing point. If none of the perpendicular lines fall on the corresponding connecting line segment, then the lengths of all perpendicular lines are calculated, and the perpendicular point with the shortest perpendicular line segment is taken as the second dividing point. The second dividing point will be used to divide the first road boundary into two boundary segments.
[0121] It is understandable that, given the positional information of each point, the slope and intercept of the line segment connecting two points can be calculated. Based on the slope and intercept, and the positional information of the first dividing point, the distance from the first dividing point to this line segment (i.e., the length of the perpendicular segment) can be calculated, as well as the positional information of the perpendicular point. Given the positional information of the two points and the perpendicular point, it can be determined whether the distance between the two points is equal to the sum of the distances from the perpendicular point to each of the two points. If so, the perpendicular point lies on the line segment between the two points; otherwise, it does not lie on the line segment between the two points.
[0122] This application embodiment does not limit the method by which the above-mentioned computer device performs position point interpolation on a boundary segment pair to obtain a boundary segment pair with the same number of position points. For example, the following method can be used.
[0123] In one embodiment, the computer device can determine the number of position points of the first and second boundary segments in each boundary segment pair, and supplement the boundary segments with fewer position points according to the boundary segments with more position points in the boundary segment pair, thereby obtaining the processed boundary segment pair.
[0124] For ease of explanation, let's take the boundary segment with the most corresponding position points as the first example:
[0125] In some embodiments, the computer device can regenerate the first boundary segment and the second boundary segment according to a first number, that is, resample (also called interpolation) on the first boundary segment and the second boundary segment respectively, with the number of resampled position points being the first number, thereby obtaining a boundary segment pair with the same number of position points. The resampling can be uniform sampling, that is, sampling position points at equal intervals.
[0126] In some embodiments, the computer device may resample only the boundary segments with fewer corresponding position points in the boundary segment pair, and the number of resampled position points is a first number. This eliminates the need to resample the boundary segments with more corresponding position points in the boundary segment pair, ensuring that the boundary segments with more position points will not deform. Furthermore, after resampling the boundary segments with fewer corresponding position points in the boundary segment pair according to the first number, the number of position points is also the first number, thus obtaining a boundary segment pair with the same number of position points.
[0127] In some embodiments, the computer device can perform additional position point interpolation on the boundary segments with fewer corresponding position points in a boundary segment pair. This can be understood as position point supplementation. Based on the boundary segments with more corresponding position points and the supplemented boundary segments, a boundary segment pair with the same number of position points is obtained. Specifically, the computer device can supplement the boundary segments with fewer corresponding position points in a boundary segment pair according to a first quantity, and obtain a boundary segment pair with the same number of position points based on the boundary segments with more corresponding position points and the supplemented boundary segments.
[0128] In the example above, if the number of position points in boundary segment L1-a is greater than that in boundary segment L2-a, the computer device can supplement the position points in boundary segment L2-a based on the number of position points in boundary segment L1-a, so that the number of position points in L1-a and L2-a are the same, resulting in a boundary segment pair with the same number of position points. For example, if the first boundary segment L1-a has 10 position points and the second boundary segment L2-a has 8 position points, then the second boundary segment L2-a needs to be supplemented by inserting 2 position points. Similarly, the computer device can perform a similar operation on the boundary segment pair formed by L1-b and L2-b, and the boundary segment pair formed by L1-c and L2-c. In this way, the number of position points in each boundary segment pair can be made the same.
[0129] In some embodiments, when a computer device supplements the boundary segments with fewer corresponding position points in a boundary segment pair according to a first quantity, it can find the longest line segment in the boundary segment, insert a position point at the midpoint of the longest line segment, and after inserting a position point, continue to find the longest line segment in the boundary segment and insert a position point at the midpoint of the longest line segment. This process is iterated until the number of position points reaches the first quantity, at which point a pair of boundary segments with the same number of position points is obtained.
[0130] For example, in the example above, it is necessary to supplement the position points of the second boundary segment L2-a by inserting two position points. The computer device needs to first find the longest line segment on the polyline where the second boundary segment L2-a is located, and insert one position point at the midpoint of the longest line segment. After inserting the position point, it needs to find the longest line segment on the polyline where the second boundary segment L2-a is located again and insert one more position point. In this way, the second boundary segment L2-a will have 10 position points after the position point supplementation, which is the same as the number of position points of the first boundary segment L1-a.
[0131] In this embodiment, by finding the longest line segment among the boundary segments with a small number of position points, and inserting a position point at the midpoint of the longest line segment, it can be ensured that the shape of the boundary segment will not be deformed after the position point is inserted, and will fit the shape of the original boundary, thereby ensuring the accuracy of the virtual guide lines generated subsequently.
[0132] In some embodiments, to avoid excessive differences between the shape of the boundary segment obtained by the above-mentioned uniform interpolation processing or supplementary interpolation processing and the original shape, which would cause the boundary segment to deform, the computer device may also add some values to the first quantity to obtain a third quantity, and then perform interpolation processing on a pair of boundary segments according to the above-mentioned interpolation method based on the third quantity to obtain a pair of boundary segments with the same number of position points.
[0133] In some embodiments, the computer device may further, for each boundary segment pair, determine the number of position points of the first boundary segment and the second boundary segment in the boundary segment pair; for each target position point on the boundary segment with a larger number of corresponding position points in the boundary segment pair, determine the position information of the position point corresponding to the target position point based on the position information of the position point and the position information of each position point on the boundary segment with a smaller number of corresponding position points in the boundary segment pair; and obtain the processed boundary segment pair based on each target position point and the determined position point corresponding to the target position point.
[0134] Specifically, for a boundary segment pair, for each target location point on the boundary segment with a large number of location points, a corresponding location point is determined from the boundary segment with a smaller number of location points. Based on each target location point and its corresponding location point, a boundary segment pair with the same number of location points is obtained. When determining the corresponding location point from the boundary segment with a smaller number of location points, the point closest to the target location point can be determined from the boundary segment with a smaller number of location points as its corresponding location point. In this embodiment, by using the location points of the boundary segment with a large number of location points as a reference, this boundary segment is not interpolated. Instead, interpolation is performed on another boundary segment starting from the location points of this boundary segment, using the principle of closest distance. This ensures that the new boundary segment formed by the interpolated points will not be deformed, and that suitable corresponding location points can be found to correspond one-to-one with the location points of the boundary segment with a large number of location points, thus ensuring the accuracy of the subsequently generated virtual guide lines.
[0135] In an exemplary embodiment, the method further includes: connecting corresponding position points on a processed pair of road boundaries to obtain multiple corresponding point lines, wherein position points with the same position order on the processed pair of road boundaries constitute a set of corresponding position points, and the lines connecting a set of corresponding position points are corresponding point lines; taking the midpoint of each corresponding point line and connecting the midpoints of the corresponding point lines sequentially to obtain the virtual center line of the road. Specifically, the terminal can obtain a processed pair of road boundaries, which includes multiple position points representing a processed first road boundary and multiple position points representing a processed second road boundary. The multiple position points of the processed first road boundary correspond one-to-one with the multiple position points of the processed second road boundary. The terminal can calculate the position information of the midpoint of each corresponding point line based on the position information of these one-to-one corresponding position points, and map these midpoints onto an electronic map based on the position information of these midpoints, thereby realizing the drawing of the virtual center line of the road on the electronic map.
[0136] In an exemplary embodiment, the method further includes: connecting corresponding position points on a processed pair of road boundaries to obtain multiple corresponding point lines, wherein position points with the same position order on the processed pair of road boundaries constitute a set of corresponding position points, and the lines connecting a set of corresponding position points are corresponding point lines; obtaining the number of lanes on the road; marking lane boundary points on the multiple corresponding point lines according to the number of lanes; and sequentially connecting the lane boundary points corresponding to the same lane boundary line on the multiple corresponding point lines to obtain the lane boundary lines of the road. Specifically, the terminal can obtain a processed pair of road boundaries, which includes multiple position points representing a processed first road boundary and multiple position points representing a processed second road boundary. The multiple position points of the processed first road boundary correspond one-to-one with the multiple position points of the processed second road boundary. The terminal can calculate the position information of the lane boundary points on each corresponding point line based on the number of lanes and the position information of these one-to-one corresponding position points. Based on the position information of these lane boundary points, the terminal maps these lane boundary points onto an electronic map, thereby realizing the drawing of the lane boundary lines of the road on the electronic map.
[0137] like Figure 9 As shown, Figure 9 Part (a) is a schematic diagram comparing a pair of road boundaries before and after processing in one embodiment. It can be seen that the processed pair of road boundaries does not undergo much deformation compared to the previous pair of road boundaries, and is also smoother. Figure 9 Part (b) is a comparative diagram of the lines connecting corresponding points before and after processing in one embodiment. It can be seen that before processing, the lines connecting corresponding points had problems with intersection and also with the boundary. After processing, the above problems are improved.
[0138] like Figure 10 The diagram shown is a flowchart illustrating a road boundary data processing method in one embodiment. (Refer to...) Figure 10 It includes the following steps:
[0139] Step 1001: Set the maximum number of recursions, depth. For example, depth can be initialized to 3.
[0140] Step 1002: Obtain road boundary data. The road boundary data consists of a pair of road boundaries: the first road boundary L1 and the second road boundary L2.
[0141] Wherein, the first road boundary L1 can be the left boundary, and the second road boundary L2 can be the right boundary. Alternatively, the first road boundary L1 can be the right boundary, and the second road boundary L2 can be the left boundary.
[0142] Step 1003: Detect whether the first road boundary L1 and the second road boundary L2 do not meet the conditions for generating virtual guide lines, and determine whether the current depth value is greater than 0.
[0143] If the virtual guide line generation conditions are not met, and the current depth value is greater than 0, then proceed to step 1004. If the virtual guide line generation conditions are met, then proceed to step 1011. The virtual guide line generation conditions include the consistency of the number of position points, the non-intersection of corresponding point lines, and the non-intersection of corresponding point lines with the boundary.
[0144] Step 1004: Select the position point corresponding to the smallest angle from the angles formed by connecting multiple position points representing the first road boundary and the angles formed by connecting multiple position points representing the second road boundary, and use it as the first dividing point P.
[0145] Step 1005: Determine the point closest to the first dividing point from the opposite side boundary of the road boundary where the first dividing point is located. The closest point is the second dividing point Q.
[0146] Step 1006: Divide a pair of road boundaries into two parts along the first dividing point P and the second dividing point Q to obtain two boundary segment pairs (L3, L4) and (L5, L6).
[0147] Among them, L3 and L5 belong to the same road boundary, and L4 and L6 belong to the same road boundary.
[0148] Step 1007: Fill in the boundary segment with fewer position points between the two boundary segments (L3, L4) and (L5, L6) until the number of position points is the same as the opposite boundary segment.
[0149] Specifically, compare the number of position points in L3 and L4, obtain the maximum value maxPoints, and fill the other boundary segment based on the maximum value maxPoints. Similarly, perform the same operation on (L5, L6).
[0150] Step 1008: After completing the steps, treat (L3, L4) and (L5, L6) as a new pair of road boundaries, return to step 1002 for recursive execution, and decrement depth by 1.
[0151] Step 1009: After the recursion ends, obtain the recursion result.
[0152] Step 1010: Merge the boundary segments of the same road boundary to obtain a processed pair of road boundaries.
[0153] Step 1011: Return the processed pair of road boundaries.
[0154] In a specific embodiment, such as Figure 11 As shown, a method for processing road boundary data is provided. This method can be executed by a computer device and includes the following steps:
[0155] Step 1101: Obtain road boundary data. The road boundary data refers to a pair of road boundaries, which include a first road boundary and a second road boundary. The two boundaries in the pair of road boundaries are opposite boundaries. The road boundary data includes a first location point sequence and a second location point sequence. The first location point sequence refers to the first road boundary, and the second location point sequence refers to the second road boundary.
[0156] Step 1102: Check whether a pair of road boundaries meet the conditions for generating virtual guide lines.
[0157] Step 1103: If a pair of road boundaries does not meet the conditions for generating virtual guide lines, for every three adjacent position points in the first position point sequence and every three adjacent position points in the second position point sequence, calculate the angle of the included angle between the three adjacent position points based on their respective position information. The included angle is the angle formed by connecting the three adjacent position points in order. The middle position point among the three adjacent position points whose included angle is less than a set threshold is taken as the first dividing point.
[0158] Step 1104: Determine the point closest to the first dividing point from the opposite side boundary of the road boundary where the first dividing point is located. The point closest to the first dividing point is the second dividing point.
[0159] Step 1105: Divide the road boundary where the first dividing point is located into multiple first boundary segments according to the first dividing point, and divide the road boundary where the second dividing point is located into multiple second boundary segments according to the second dividing point. The multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are on opposite sides of each other.
[0160] Step 1106: Perform position point interpolation on each boundary segment pair to obtain the processed boundary segment pair. The two boundary segments included in the processed boundary segment pair each have the same number of position points.
[0161] Step 1107: After obtaining the processed boundary segments, use the processed boundary segments as a new pair of road boundaries and return to step 1102 to continue execution, in order to check whether each processed boundary segment meets the virtual guide line generation conditions.
[0162] If the conditions for generating a virtual guide line are not met, continue with steps 1103 to 1107.
[0163] If the conditions for generating a virtual guide line are met, proceed to step 1108.
[0164] Step 1108: The boundary segments of the same road boundary are spliced together to obtain a processed pair of road boundaries. The processed pair of road boundaries are used to generate virtual guide lines for roads in the electronic map.
[0165] Step 1109: Store the processed pair of road boundaries.
[0166] When a computer receives a data request from a terminal, it can also send a processed pair of road boundaries to the terminal. The terminal can connect the corresponding points of the processed pair of road boundaries to obtain multiple lines connecting the corresponding points. The midpoint of each line connecting the corresponding points is taken, and the midpoints of the lines connecting the corresponding points are connected in sequence to obtain the virtual center line of the road. The terminal displays the virtual center line on the electronic map.
[0167] The road boundary data processing method provided in this application uses a divide-and-conquer strategy to continuously divide the boundary data of complex roads with unequal widths and curves into more regular boundary segments for processing. By applying this method, the computational complexity in the road boundary data processing process and the accuracy of the virtual guide lines generated for the subsequent roads can be balanced. This helps to carry out road design and analysis work more efficiently and improve the efficiency of road planning and management.
[0168] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0169] Based on the same inventive concept, this application also provides a road boundary data processing apparatus for implementing the road boundary data processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more road boundary data processing apparatus embodiments provided below can be found in the limitations of the road boundary data processing method described above, and will not be repeated here.
[0170] In one exemplary embodiment, such as Figure 12 As shown, a road boundary data processing device 1200 is provided, including: an acquisition module 1201, a segmentation module 1202, an interpolation module 1203, and a stitching module 1204, wherein:
[0171] The acquisition module 1201 is used to acquire road boundary data, which refers to the first road boundary and the second road boundary, which are located on both sides of the road.
[0172] The segmentation module 1202 is used to determine a first segmentation point based on a first road boundary and a second road boundary. The determined first segmentation point is located on the first road boundary or the second road boundary. Based on the determined first segmentation point, a second segmentation point is determined on the opposite side boundary of the road boundary where the first segmentation point is located. Based on the first segmentation point, the road boundary where the first segmentation point is located is divided into multiple first boundary segments. Based on the second segmentation point, the road boundary where the second segmentation point is located is divided into multiple second boundary segments. The multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other.
[0173] Interpolation module 1203 is used to interpolate the position points of each boundary segment pair to obtain the processed boundary segment pair. The two boundary segments included in the processed boundary segment pair each have the same number of position points.
[0174] The splicing module 1204 is used to splice the boundary segments of the same road boundary to obtain a processed pair of road boundaries. The processed pair of road boundaries is used to generate virtual guide lines for roads in electronic maps.
[0175] In some embodiments, the segmentation module 1202 is further configured to determine at least one location point from the first road boundary and the second road boundary as a first segmentation point based on the location information of each location point on the first road boundary and the location information of each location point on the second road boundary.
[0176] In some embodiments, the segmentation module 1202 is further configured to, when the determined first segmentation point is located on the first road boundary, determine at least one location point on the second road boundary as a second segmentation point based on the location information of the determined first segmentation point and the location information of each location point on the second road boundary; divide the first road boundary into multiple first boundary segments according to the first segmentation point, and divide the second road boundary into multiple second road boundary segments according to the second segmentation point.
[0177] In some embodiments, the segmentation module 1202 is further configured to, when the determined first segmentation point is located on the second road boundary, determine at least one location point on the first road boundary as a second segmentation point based on the location information of the first segmentation point and the location information of each location point on the first road boundary; divide the second road boundary into multiple second boundary segments according to the first segmentation point; and divide the first road boundary into multiple first boundary segments according to the second segmentation point.
[0178] In some embodiments, the road boundary data includes a first location point sequence and a second location point sequence, wherein the first location point sequence refers to the first road boundary and the second location point sequence refers to the second road boundary; the segmentation module 1202 is further configured to, for every three adjacent location points in the first location point sequence and every three adjacent location points in the second location point sequence, calculate the angle of the included angle between the three adjacent location points according to their respective location information, wherein the included angle is the angle formed by connecting the three adjacent location points in order; and take the middle location point among the three adjacent location points whose included angle is less than a set threshold as the first segmentation point.
[0179] In some embodiments, the segmentation module 1202 is further configured to connect three adjacent position points sequentially to form two line segments; obtain the line segment vectors of the two line segments based on the position information of the endpoints of the two line segments; and calculate the included angle corresponding to the three adjacent position points based on the two line segment vectors.
[0180] In some embodiments, the segmentation module 1202 is further configured to determine, based on the location information of the determined first segmentation point and the location information of each location point on the opposite side boundary of the road boundary where the first segmentation point is located, the point closest to the first segmentation point from the opposite side boundary of the road boundary where the first segmentation point is located, as the second segmentation point.
[0181] In some embodiments, the segmentation module 1202 is further configured to determine the connecting line segments between two adjacent positions based on the position information of two adjacent positions on the opposite boundary; draw perpendicular lines to each connecting line segment through the first segmentation point; and calculate the length of the perpendicular line segment when there is at least one perpendicular line segment intersecting with the corresponding connecting line segment, and take the intersection of the perpendicular line segment with the shortest length and the corresponding connecting line segment as the second segmentation point.
[0182] In some embodiments, the road boundary data includes a first location point sequence and a second location point sequence, wherein the first location point sequence refers to a first road boundary and the second location point sequence refers to a second road boundary, and the apparatus further includes:
[0183] The detection module is used to detect whether the road boundary data satisfies at least one of the following conditions. If the road boundary data satisfies at least one of the following conditions, the module performs the step of determining a first segmentation point based on a first road boundary and a second road boundary. The multiple conditions include:
[0184] The number of position points in the first position point sequence and the second position point sequence are different;
[0185] When the number of position points in the first position point sequence and the second position point sequence are the same, there are at least two corresponding point lines that intersect. Among them, position points in the first position point sequence and position points of the same position in the second position point sequence constitute a set of corresponding position points, and the line connecting a set of corresponding position points is a corresponding point line.
[0186] When the number of position points in the first position point sequence and the second position point sequence are the same and all corresponding point lines do not intersect, there exists at least one corresponding point line that intersects with any road boundary at more than two points, and any road boundary is either the first road boundary or the second road boundary.
[0187] In some embodiments, the interpolation module 1203 is further configured to, for each boundary segment pair, determine the number of position points of the first boundary segment and the second boundary segment in the boundary segment pair, and supplement the position points of the boundary segment with the fewer position points in the boundary segment pair according to the number of position points of the boundary segment with the larger number of position points in the boundary segment pair, so as to obtain the processed boundary segment pair.
[0188] In some embodiments, the interpolation module 1203 is further configured to, for each boundary segment pair, determine the number of position points of the first boundary segment and the second boundary segment in the boundary segment pair, and for each target position point on the boundary segment with a larger number of corresponding position points in the boundary segment pair, determine the position information of the position point corresponding to the target position point based on the position information of the position point and the position information of each position point on the boundary segment with a smaller number of corresponding position points in the boundary segment pair, and obtain the processed boundary segment pair based on each target position point and the determined position point corresponding to the target position point.
[0189] In some embodiments, the apparatus further includes:
[0190] The detection module is used to detect whether each processed boundary segment pair satisfies at least one of the following conditions. If the processed boundary segment pair satisfies at least one of the following conditions, the boundary segment pair is further segmented; wherein, the multiple conditions include:
[0191] Based on the processed boundary segment pair, the corresponding point connection is determined. There are at least two corresponding point connection lines that intersect. Among them, the position points with the same position order in the processed boundary segment pair form a set of corresponding position points, and the connection between a set of corresponding position points is the corresponding point connection line.
[0192] If all corresponding point lines do not intersect, there exists at least one corresponding point line that intersects with any of the processed boundary segment pairs at more than two points.
[0193] In some embodiments, the apparatus further includes:
[0194] The generation module is used to connect corresponding points on a pair of processed road boundaries to obtain multiple corresponding point lines. Among them, corresponding points with the same position order on a pair of processed road boundaries constitute a set of corresponding points, and the line connecting a set of corresponding points is a corresponding point line. Take the midpoint of each corresponding point line and connect the midpoints of the corresponding point lines in sequence to obtain the virtual center line of the road.
[0195] In some embodiments, the apparatus further includes:
[0196] The generation module connects corresponding points on a pair of processed road boundaries to obtain multiple corresponding point lines. Points with the same position on a pair of processed road boundaries form a set of corresponding points, and the lines connecting a set of corresponding points are corresponding point lines. The module obtains the number of lanes on the road. According to the number of lanes, lane boundary points are marked on the multiple corresponding point lines. The lane boundary points corresponding to the same lane boundary line on the multiple corresponding point lines are connected sequentially to obtain the lane boundary lines of the road.
[0197] The aforementioned road boundary data processing device 1200 acquires road boundary data, which refers to the first and second road boundaries, located on opposite sides of the road. Based on these boundaries, it determines a first dividing point, which is located on either the first or second road boundary. Then, based on the first dividing point, it determines a second dividing point on the opposite side of the road boundary where the first dividing point is located. The device further divides the road boundary where the first dividing point is located into multiple first boundary segments, and the device divides the road boundary where the second dividing point is located into multiple second boundary segments. The multiple first boundary segments and multiple... Each second boundary segment constitutes multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other. Multiple first boundary segments and multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other. The two boundary segments in each boundary segment pair are opposite to each other. Position point interpolation is performed on each boundary segment pair to obtain a processed boundary segment pair. The two boundary segments included in the processed boundary segment pair have the same number of position points. Finally, the boundary segments of the same road boundary are spliced together to obtain a processed pair of road boundaries. The processed pair of road boundaries is used to generate virtual guide lines for roads in electronic maps.
[0198] By using the first and second dividing points, the road boundary data representing a pair of road boundaries is divided into at least two boundary segment pairs. For each boundary segment pair, position point interpolation is performed. This makes the final generated virtual guide line of the road smoother, thereby ensuring the accuracy of subsequent virtual guide line generation based on the processed data. Furthermore, since the number of interpolated position points is controllable, the amount of processed data will not be too large, thus reducing the computational complexity of the virtual guide line. Moreover, the processing method is applicable to road boundary data of various complex shapes, reducing the complexity of processing road boundary data and improving data processing efficiency.
[0199] Each module in the aforementioned road boundary data processing device 1200 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0200] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores road data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When executed by the processor, the computer program implements a road boundary data processing method.
[0201] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 14 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a road boundary data processing method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0202] Those skilled in the art will understand that Figure 13 , Figure 14The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0203] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the road boundary data processing method provided in the embodiments of this application.
[0204] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the road boundary data processing method provided in the embodiments of this application.
[0205] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the road boundary data processing method provided in the embodiments of this application.
[0206] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0207] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0208] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0209] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for processing road boundary data, characterized in that, The method includes: Obtain road boundary data, wherein the road boundary data refers to the first road boundary and the second road boundary, which are located on both sides of the road; A first dividing point is determined based on the first road boundary and the second road boundary. The determined first dividing point is located on the first road boundary or the second road boundary. Based on the determined first dividing point, a second dividing point is determined on the opposite boundary of the road boundary where the first dividing point is located. The road boundary where the first dividing point is located is divided into multiple first boundary segments according to the first dividing point, and the road boundary where the second dividing point is located is divided into multiple second boundary segments according to the second dividing point. The multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other. For each of the boundary segment pairs, position point interpolation is performed to obtain processed boundary segment pairs, wherein the two boundary segments included in the processed boundary segment pairs each have the same number of position points. By splicing together the boundary segments of the same road boundary, a processed pair of road boundaries is obtained. The processed pair of road boundaries is used to generate virtual guide lines for the road in the electronic map.
2. The method according to claim 1, characterized in that, Determining the first segmentation point based on the first road boundary and the second road boundary includes: Based on the location information of each location point on the first road boundary and the location information of each location point on the second road boundary, at least one location point is determined from the first road boundary and the second road boundary as the first dividing point.
3. The method according to claim 2, characterized in that, The step of determining a second dividing point on the opposite boundary of the road boundary where the first dividing point is located, based on the determined first dividing point, includes: If the first dividing point is located on the first road boundary, based on the location information of the first dividing point and the location information of each location point on the second road boundary, at least one location point is determined from the second road boundary as the second dividing point; The step of dividing the road boundary where the first dividing point is located into multiple first boundary segments based on the first dividing point, and dividing the road boundary where the second dividing point is located into multiple second boundary segments based on the second dividing point, includes: The first road boundary is divided into multiple first boundary segments based on the first dividing point, and the second road boundary is divided into multiple second road boundary segments based on the second dividing point.
4. The method according to claim 2, characterized in that, The step of determining a second dividing point on the opposite boundary of the road boundary where the first dividing point is located, based on the determined first dividing point, includes: If the first dividing point is located on the second road boundary, based on the location information of the first dividing point and the location information of each location point on the first road boundary, at least one location point is determined from the first road boundary as the second dividing point. The step of dividing the road boundary where the first dividing point is located into multiple first boundary segments based on the first dividing point, and dividing the road boundary where the second dividing point is located into multiple second boundary segments based on the second dividing point, includes: The second road boundary is divided into multiple second boundary segments based on the first dividing point, and the first road boundary is divided into multiple first boundary segments based on the second dividing point.
5. The method according to claim 1, characterized in that, The road boundary data includes a first location point sequence and a second location point sequence, wherein the first location point sequence refers to the first road boundary and the second location point sequence refers to the second road boundary; Determining the first dividing point on the pair of road boundaries includes: For every three adjacent position points in the first position point sequence and every three adjacent position points in the second position point sequence, the angle between the three adjacent position points is calculated based on the position information of each of the three adjacent position points. The angle is the angle formed by connecting the three adjacent position points in order. The middle position among the three adjacent position points whose included angle is less than a set threshold is taken as the first dividing point.
6. The method according to claim 5, characterized in that, Calculating the included angle of the three adjacent positions includes: Connect three adjacent points in sequence to form two line segments; The line segment vectors of the two line segments are obtained based on the position information of the endpoints of the two line segments. Calculate the included angle between the three adjacent position points based on the two line segment vectors.
7. The method according to claim 1, characterized in that, The step of determining a second dividing point on the opposite boundary of the road boundary where the first dividing point is located, based on the determined first dividing point, includes: Based on the determined location information of the first dividing point and the location information of each point on the opposite side of the road boundary where the first dividing point is located, the point closest to the first dividing point is determined from the opposite side of the road boundary where the first dividing point is located, and this point is used as the second dividing point.
8. The method according to claim 7, characterized in that, Determining the point closest to the first dividing point from the opposite boundary of the road boundary where the first dividing point is located includes: Based on the position information of each pair of adjacent points on the opposite boundary, determine the connecting line segment between each pair of adjacent points; Draw a perpendicular line segment to each of the connecting line segments through the first dividing point; If at least one of the perpendicular segments intersects with the corresponding connecting segment, the length of the perpendicular segment is calculated, and the intersection of the perpendicular segment with the shortest length and the corresponding connecting segment is taken as the second dividing point.
9. The method according to claim 1, characterized in that, The road boundary data includes a first location point sequence and a second location point sequence, wherein the first location point sequence refers to the first road boundary and the second location point sequence refers to the second road boundary. Before determining the first segmentation point based on the first road boundary and the second road boundary, the method further includes: The process involves detecting whether the road boundary data satisfies at least one of the following conditions. If the road boundary data satisfies at least one of the following conditions, the step of determining the first segmentation point based on the first road boundary and the second road boundary is performed. The multiple conditions include: The first position point sequence and the second position point sequence have different numbers of position points; When the number of position points in the first position point sequence and the second position point sequence are the same, there are at least two corresponding point lines that intersect. Wherein, the position points in the first position point sequence and the position points with the same position order in the second position point sequence form a set of corresponding position points, and the line connecting a set of corresponding position points is a corresponding point line. When the number of position points in the first position point sequence and the second position point sequence are the same and all corresponding point lines do not intersect, there exists at least one corresponding point line that intersects with any road boundary at two or more points, wherein the any road boundary is either the first road boundary or the second road boundary.
10. The method according to claim 1, characterized in that, The step of interpolating data points for each of the boundary segment pairs to obtain the processed boundary segment pairs includes: For each boundary segment pair, determine the number of position points for the first and second boundary segments in the boundary segment pair. Based on the number of position points of the boundary segment with more position points in the boundary segment pair, supplement the position points of the boundary segment with fewer position points in the boundary segment pair to obtain the processed boundary segment pair.
11. The method according to claim 1, characterized in that, The step of interpolating the position points of each of the boundary segment pairs to obtain the processed boundary segment pairs includes: For each of the boundary segment pairs, determine the number of position points for the first and second boundary segments in the boundary segment pair. For each target position point on the boundary segment with a larger number of corresponding position points in the boundary segment pair, determine the position information of the position point corresponding to the target position point based on the position information of the target position point and the position information of each position point on the boundary segment with a smaller number of corresponding position points in the boundary segment pair. Based on each target position point and the determined position point corresponding to the target position point, obtain the processed boundary segment pair.
12. The method according to claim 1, characterized in that, The method further includes: If each processed boundary segment pair satisfies at least one of the following conditions, the boundary segment pair is further segmented if it does. The multiple conditions include: Based on the processed boundary segment pair, the corresponding point connection is determined. There are at least two corresponding point connection lines that intersect. Among them, the position points with the same position order in the processed boundary segment pair constitute a set of corresponding position points, and the connection between a set of corresponding position points is the corresponding point connection line. If all corresponding point lines do not intersect, there exists at least one corresponding point line that intersects with any of the processed boundary segment pairs at more than two points.
13. The method according to any one of claims 1 to 12, characterized in that, The method further includes: Connect the corresponding points on the processed pair of road boundaries to obtain multiple corresponding point lines. The corresponding points with the same position order on the processed pair of road boundaries form a set of corresponding points, and the line connecting the corresponding points in a set of corresponding points is a corresponding point line. Take the midpoint of each line connecting corresponding points, and connect the midpoints of the corresponding lines in sequence to obtain the virtual centerline of the road.
14. The method according to any one of claims 1 to 12, characterized in that, The method further includes: Connect the corresponding points on the processed pair of road boundaries to obtain multiple corresponding point lines. The corresponding points with the same position order on the processed pair of road boundaries form a set of corresponding points, and the line connecting the corresponding points in a set of corresponding points is a corresponding point line. Obtain the number of lanes on the road; According to the number of lanes, lane dividing points are marked on the lines connecting the multiple corresponding points; By sequentially connecting the lane dividing points corresponding to the same lane dividing line on the multiple corresponding lines, the lane dividing lines of the road are obtained.
15. A road boundary data processing device, characterized in that, The device includes: The acquisition module is used to acquire road boundary data, which refers to the first road boundary and the second road boundary, which are located on both sides of the road. The segmentation module is used to determine a first segmentation point based on the first road boundary and the second road boundary, wherein the determined first segmentation point is located on the first road boundary or the second road boundary; and, based on the determined first segmentation point, to determine a second segmentation point on the opposite side boundary of the road boundary where the first segmentation point is located; to segment the road boundary where the first segmentation point is located into multiple first boundary segments based on the first segmentation point; and to segment the road boundary where the second segmentation point is located into multiple second boundary segments based on the second segmentation point; wherein the multiple first boundary segments and the multiple second boundary segments constitute multiple pairs of boundary segments, each consisting of a first boundary segment and a second boundary segment that are opposite to each other. An interpolation module is used to interpolate the position points of each of the boundary segment pairs to obtain processed boundary segment pairs, wherein the two boundary segments included in the processed boundary segment pairs each have the same number of position points. The splicing module is used to splice the boundary segments of the same road boundary to obtain a processed pair of road boundaries, which are used to generate virtual guide lines for the road in the electronic map.
16. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 14.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 14.
18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 14.