Road data processing method and device, computer readable medium and equipment
By grouping roundabout route data into curve segments and using the sum of the absolute values of multiple coefficients as the optimization objective, the parametric equations are solved to generate smoothed roundabout route data. This solves the problem of large fitting errors in existing roundabout roads and achieves high-precision navigation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-11-29
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the ellipse fitting method for roundabout roads results in a large deviation between the smoothed road shape and the actual shape when dealing with roundabout roads with large shape deviations, which affects the accuracy of map navigation.
The roundabout route data is grouped into multiple curve segments, each curve segment is represented by multiple polynomial parametric equations, and the sum of the absolute values of the coefficients of the multiple terms is used as the optimization objective. The coefficients of the parametric equations are solved, and the smoothed roundabout route data is generated by interpolation.
It improves the smoothing effect of roundabout route data, enhances flexibility and adaptability, meets the high precision requirements of lane-level navigation, and improves navigation accuracy.
Smart Images

Figure CN122108111A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computer and communication technology, and more specifically, to a road data processing method, apparatus, computer-readable medium, and device. Background Technology
[0002] In applications such as map data processing and map navigation, roundabouts are a crucial component of road traffic, and their accurate and smooth shape representation is essential for improving navigation performance and user experience. Related technologies for smoothing roundabout route data typically assume that the roundabout's shape is elliptical, employing ellipse fitting to process the data. However, in real-world roads, many roundabouts deviate significantly from an elliptical shape. In these cases, the ellipse fitting methods proposed in related technologies may result in a large discrepancy between the smoothed roundabout shape and reality, leading to poor smoothing of the roundabout route data and severely impacting the accuracy of map navigation. Summary of the Invention
[0003] The embodiments of this application provide a road data processing method, apparatus, computer-readable medium, and device that can improve the smoothing effect of roundabout route data, accurately reconstruct the smoothed roundabout route data, and meet the high precision requirements of application scenarios such as lane-level navigation.
[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part by practice of this application.
[0005] According to one aspect of the embodiments of this application, a road data processing method for electronic maps is provided, comprising: acquiring map data corresponding to a road network, the map data including roundabout route data, the roundabout route data referring to roundabout roads in the road network; grouping the roundabout route data to obtain curve segment data corresponding to each curve segment of at least two curve segments of the roundabout road, wherein each curve segment is characterized in the corresponding curve segment data by a parametric equation of multiple polynomials; calculating the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to the at least two curve segments; solving for the coefficients of the parametric equations corresponding to each curve segment with minimizing the sum of the absolute values as the optimization objective; interpolating a set number of coordinate points in the curve segment data corresponding to each curve segment based on the parametric equations and the coefficients of the parametric equations, and generating smoothed roundabout route data based on the interpolated coordinate points.
[0006] According to one aspect of the embodiments of this application, a road data processing apparatus for an electronic map is provided, comprising: an acquisition unit configured to acquire map data corresponding to a road network, the map data including roundabout route data, the roundabout route data referring to roundabout roads in the road network; a segmentation unit configured to group the roundabout route data to obtain curve segment data corresponding to each curve segment of at least two curve segments of the roundabout road, wherein each curve segment is characterized in the corresponding curve segment data by a parametric equation of multiple polynomials; a calculation unit configured to calculate the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to the at least two curve segments; a processing unit configured to solve for the coefficients of the parametric equations corresponding to each curve segment with minimizing the sum of the absolute values as the optimization objective; and an interpolation unit configured to interpolate a set number of coordinate points in the curve segment data corresponding to each curve segment based on the parametric equations corresponding to each curve segment and the coefficients of the parametric equations, and generate smoothed roundabout route data based on the interpolated coordinate points.
[0007] In some embodiments of this application, based on the foregoing scheme, the processing unit is configured to: generate geometric constraint equations based on the relationship that the endpoint position of the previous curve segment coincides with the starting position of the next curve segment in the at least two curve segments; and solve the coefficients of the parametric equations corresponding to each curve segment based on the geometric constraint equations, with minimizing the sum of the absolute values as the optimization objective.
[0008] In some embodiments of this application, based on the foregoing scheme, the processing unit is configured to: determine the coordinate representation of the endpoint position of the previous curve segment and the coordinate representation of the starting position of the next curve segment according to the parametric equation corresponding to the previous curve segment and the parametric equation corresponding to the next curve segment; set the coordinate representation of the endpoint position of the previous curve segment to be equal to the coordinate representation of the starting position of the next curve segment, and set the derivative of the coordinate representation of the endpoint position to be equal to the derivative of the coordinate representation of the starting position, so as to obtain the geometric constraint equation.
[0009] In some embodiments of this application, based on the foregoing scheme, the processing unit is configured to: set the first derivative of the coordinate representation of the endpoint position to be equal to the first derivative of the coordinate representation of the starting position, and set the second derivative of the coordinate representation of the endpoint position to be equal to the second derivative of the coordinate representation of the starting position.
[0010] In some embodiments of this application, based on the foregoing scheme, the processing unit is further configured to: set the second or higher derivative of the coordinates of the endpoint position to be equal to the second or higher derivative of the coordinates of the starting position.
[0011] In some embodiments of this application, based on the foregoing scheme, the processing unit is further configured to: generate an offset constraint equation based on the offset of the starting position of each curve segment; and, in the process of minimizing the sum of the absolute values, solve the coefficients of the parametric equation corresponding to each curve segment based on the offset constraint equation.
[0012] In some embodiments of this application, based on the foregoing scheme, the processing unit is configured to: determine the coordinate representation of the starting position of each curve segment according to the parametric equation corresponding to each curve segment; calculate the offset between the coordinate representation of the starting position of each curve segment and the starting position coordinates of each curve segment according to the coordinate representation of the starting position of each curve segment and the starting position coordinates of each curve segment; and generate the offset constraint equation by using the offset being less than or equal to a set distance threshold and greater than or equal to the negative number of the distance threshold as a constraint condition.
[0013] In some embodiments of this application, based on the foregoing scheme, the processing unit is configured to: replace the absolute value of each multinomial coefficient with a set parameter variable to convert the sum of the absolute values into the sum of the parameter variables; take minimizing the sum of the parameter variables as the optimization objective, and with the parameter variables being greater than or equal to 0, and with the multinomial coefficients being greater than or equal to the opposite of the parameter variables and less than or equal to the parameter variables as constraints, solve the coefficients of the parametric equations of each curve segment.
[0014] In some embodiments of this application, based on the foregoing scheme, the processing unit is further configured to: calculate the distance between the coordinate representation of the starting position of each curve segment and the coordinates of the starting position of each curve segment, and use the square of the distance as the shape loss of each curve segment; calculate the sum of the shape losses of the at least two curve segments based on the shape loss of each curve segment; and solve for the coefficients of the parametric equation corresponding to each curve segment with minimizing the sum of the absolute values as the optimization objective, including: solving for the coefficients of the parametric equation corresponding to each curve segment with minimizing the sum of the absolute values and the sum of the shape losses as the optimization objective.
[0015] In some embodiments of this application, based on the foregoing scheme, the processing unit is configured to: perform a weighted summation of the sum of absolute values and the sum of shape losses according to set weights to obtain a weighted sum value; and solve for the coefficients of the parametric equation corresponding to each curve segment with minimizing the weighted sum value as the optimization objective.
[0016] In some embodiments of this application, based on the aforementioned scheme, the division unit is configured to: sample the roundabout route data at equal intervals, divide the curve segment data between two adjacent sampling points into a group, and obtain the curve segment data corresponding to each curve segment of the roundabout road.
[0017] In some embodiments of this application, based on the foregoing scheme, the interpolation unit is configured to: interpolate a set number of coordinate points in the curve segment data corresponding to at least two curve segments respectively by parallel processing according to the parametric equations and coefficients of the parametric equations corresponding to each curve segment.
[0018] In some embodiments of this application, based on the foregoing scheme, the interpolation unit is configured to: interpolate a set number of coordinate points in the curve segment data corresponding to at least two curve segments respectively through distributed processing, according to the parametric equations corresponding to each curve segment and the coefficients of the parametric equations.
[0019] According to one aspect of the embodiments of this application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the road data processing method as described in the above embodiments.
[0020] According to one aspect of the embodiments of this application, a computer device is provided, including: one or more processors; and a storage device for storing one or more computer programs, which, when executed by the one or more processors, cause the computer device to implement the road data processing method as described in the above embodiments.
[0021] According to one aspect of the embodiments of this application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads from the computer-readable storage medium and executes the computer program, causing the computer device to perform the road data processing methods provided in the various alternative embodiments described above.
[0022] In some embodiments of this application, the roundabout route data can be grouped to obtain curve segment data corresponding to each of the at least two curve segments of the roundabout road. Each curve segment is represented in the corresponding curve segment data by a parametric equation of multiple polynomials. Then, the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to the at least two curve segments is calculated. The optimization objective is to minimize the sum of the absolute values of the coefficients of the multiple terms. The coefficients of the parametric equations corresponding to each curve segment are solved. Then, based on the parametric equations and coefficients of the parametric equations corresponding to each curve segment, a set number of coordinate points are interpolated in the curve segment data corresponding to each curve segment. Smoothed roundabout route data is generated based on the interpolated coordinate points. As can be seen, the technical solution of this application divides the roundabout route data to be processed in the map data into curve segment data corresponding to each curve segment, and uses the sum of the absolute values of the coefficients of the multiple terms in the parametric equations corresponding to the curve segments as the optimization objective for minimization. On the one hand, by processing each curve segment separately, the curvature change of the roundabout route can be effectively controlled, making the smoothed roundabout route data closer to the actual road shape and improving the smoothing effect of the roundabout route data. On the other hand, it can automatically and efficiently solve the fitting curve of the roundabout route data without the need to manually assume the standard shape of the roundabout road, thereby enhancing the flexibility and adaptability of the smoothing processing of the roundabout route data. Furthermore, by interpolating the curve segment data corresponding to each curve segment to obtain a set number of coordinate points, the smoothed roundabout route data can be accurately reconstructed, meeting the high-precision requirements of application scenarios such as lane-level navigation.
[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0024] Figure 1 A schematic diagram of a roundabout road in the road network is shown;
[0025] Figure 2 A schematic diagram of the roundabout centerline obtained by smoothing roundabout route data in related technologies is shown.
[0026] Figure 3 A schematic diagram illustrating an application scenario where the technical solutions of the embodiments of this application can be applied;
[0027] Figure 4 A flowchart of a road data processing method according to an embodiment of this application is shown;
[0028] Figure 5 A schematic diagram illustrating the division of roundabout route data according to an embodiment of this application is shown;
[0029] Figure 6 A flowchart of a road data processing method according to an embodiment of this application is shown;
[0030] Figure 7 A schematic diagram of the roundabout centerline obtained by smoothing roundabout route data according to an embodiment of this application is shown.
[0031] Figure 8 A comparison diagram is shown of the roundabout centerline obtained by smoothing roundabout route data according to the technical solution of this application and the roundabout centerline obtained by smoothing in related technologies.
[0032] Figure 9 A block diagram of a road data processing apparatus according to an embodiment of this application is shown;
[0033] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing the computer device of the present application is shown. Detailed Implementation
[0034] Exemplary embodiments will now be described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to these examples; rather, these embodiments are provided so that this application will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0035] Furthermore, the features, structures, or characteristics described in this application can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to provide a full understanding of the embodiments of this application. However, those skilled in the art will recognize that when implementing the technical solutions of this application, not all the detailed features in the embodiments may be used, one or more specific details may be omitted, or other methods, elements, devices, steps, etc., may be employed.
[0036] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0037] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0038] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0039] It should be noted that "multiple" in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0040] like Figure 1 As shown, in applications such as map data processing and map navigation, roundabouts are an important part of road traffic, and the accurate and smooth representation of their shape is crucial for improving navigation performance and user experience. A roundabout is a circular ground structure built at a road intersection, a special form of traffic node, belonging to the category of at-grade road intersections, commonly known as a "roundabout".
[0041] The map in this application embodiment can refer to an electronic map including road segments and lane lines, such as a high-precision map serving autonomous driving systems or lane-level navigation. High-precision maps, also known as autonomous driving maps or high-resolution maps, represent a new map data paradigm for autonomous vehicles. High-precision maps have an absolute positional accuracy close to 1 meter and a relative positional accuracy at the centimeter level, reaching 10-20 cm. Accurately and comprehensively representing road features (such as lane line features and lane edge features) and requiring higher real-time performance are the most significant characteristics of high-precision maps.
[0042] like Figure 2 As shown, the roundabout route data smoothing methods proposed in related technologies typically assume that the roundabout road is elliptical in shape, and then use ellipse fitting to process the roundabout route data. This results in an elliptical centerline for the smoothed roundabout. However, in real-world roads, many roundabouts deviate significantly from an elliptical shape. In these cases, the ellipse fitting methods proposed in related technologies may lead to a large deviation between the smoothed roundabout shape and reality, resulting in poor smoothing performance of the roundabout route data and severely impacting the accuracy of map navigation. For example, in... Figure 2 The centerline of the roundabout obtained through smoothing deviates from the actual shape of the roundabout road.
[0043] Based on the aforementioned technical problems in related technologies, this application proposes a novel road data processing scheme. After acquiring map data including roundabout route data, the roundabout route data is grouped to obtain curve segment data corresponding to each of at least two curve segments of the roundabout road. Then, the sum of the absolute values of the coefficients of the multiple terms in the parametric equations corresponding to the curve segments is used as the optimization objective for minimization. By processing each curve segment separately, the curvature change of the roundabout route data can be effectively controlled, making the smoothed roundabout route data closer to the actual road shape. Furthermore, the technical solution of this application does not require assuming a standard shape for the roundabout road, thereby enhancing the flexibility and adaptability of the roundabout route data smoothing process and effectively improving the smoothing effect of the roundabout route data.
[0044] Optionally, after smoothing the roundabout route data to be processed in the map data, the map data can be updated based on the smoothed roundabout route data, and then the updated map data can be sent to the vehicle terminal so that the vehicle terminal can perform navigation based on the updated map, which improves the accuracy of navigation and is conducive to realizing autonomous driving or assisted driving, meeting the high precision requirements of application scenarios such as lane-level navigation.
[0045] The following combination Figure 3 The application scenarios of the technical solutions in the embodiments of this application are described, such as... Figure 3As shown, the vehicle terminal 301 is equipped with an electronic map application, which can drive according to the lane line indications in the electronic map, such as performing autonomous driving or assisted driving. Since there are roundabouts in the road network corresponding to the electronic map, if the roundabout route data changes drastically, it is necessary to smooth the roundabout route data. In this case, the server 302 can group the roundabout route data to obtain the curve segment data corresponding to each of the at least two curve segments of the roundabout road. Each curve segment is represented by a parametric equation of multiple polynomials in the corresponding curve segment data. Then, the server calculates the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to the at least two curve segments, and uses minimizing the sum of the absolute values of the coefficients of the multiple terms as the optimization objective to solve for the coefficients of the parametric equations corresponding to each curve segment. Then, based on the parametric equations and coefficients of each curve segment, a set number of coordinate points are interpolated in the curve segment data corresponding to each curve segment to generate smoothed roundabout route data based on the interpolated coordinate points. After obtaining the smoothed roundabout route data, server 302 can update the map data based on it, and then send the updated map data to vehicle terminal 301 so that vehicle terminal 301 can perform navigation based on the updated map.
[0046] In another application scenario of this application, the vehicle terminal 301 can also be a vehicle terminal that collects map data. In this case, the vehicle terminal 301 can send the collected road data to the server 302, and then the server 302 can perform smoothing processing on the roundabout route data based on the received road data (the specific smoothing processing scheme is as described in the aforementioned embodiment). After the smoothing processing, the server 302 can generate a high-precision map based on this, and then send the generated high-precision map to the vehicle terminal that needs to perform navigation.
[0047] In one embodiment of this application, the navigation map may contain high-precision maps and standard-precision maps (i.e., ordinary navigation maps). For example, some areas may use standard-precision maps while others use high-precision maps. To achieve an effect similar to a high-precision map in areas without standard-precision maps, some road elements can be generated during the map data compilation stage (e.g., after acquiring road data collected by the vehicle terminal 301). For instance, a map containing only line segments without width can be processed into a map with road centerlines and road widths. During this processing, the roundabout route data in the standard-precision map needs to be smoothed. Specifically, the roundabout route data to be processed in the standard-precision map can be obtained, and then the road data processing method of this application embodiment can be used to perform smoothing to obtain the smoothed roundabout route data.
[0048] After smoothing the roundabout route data in the standard-precision map, a high-precision map with road centerlines and widths can be generated based on road width. This high-precision map can then be merged with an existing high-precision map in the navigation map, thus converting the standard-precision map within the navigation map into a high-precision map.
[0049] It should be noted that, Figure 3 The server 302 shown can be a single physical server, a server cluster or distributed system consisting of at least two physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The vehicle terminal 301 can specifically refer to smartphones with in-vehicle functionality, smart speakers, speakers with screens, smartwatches, sensors, etc., but is not limited to these. Various vehicle terminals and servers can be directly or indirectly connected via wired or wireless communication. Furthermore, the number of vehicle terminals and servers can be one or at least two; this application does not impose any limitations on this.
[0050] The implementation details of the technical solutions in the embodiments of this application are described in detail below:
[0051] Figure 4 A flowchart of a road data processing method according to an embodiment of this application is shown. This road data processing method can be executed by a computer device, such as a server (e.g.,...). Figure 3 The server 302 shown can also be a terminal device (such as...). Figure 3 The vehicle terminal 301 shown is an example. (Refer to...) Figure 4 As shown, this road data processing method includes at least S400 to S440, detailed below:
[0052] In S400, map data corresponding to the road network is obtained. This map data includes roundabout route data, which refers to the roundabout roads in the road network.
[0053] It should be noted that a road network refers to an interconnected and interwoven road system within a certain area. The map data corresponding to a road network is the road data in the corresponding electronic map, which may include road attribute data, lane-level data, etc. Roundabout route data refers to the map data corresponding to the roundabout roads in the road network.
[0054] Optionally, road attribute data may include road attribute information, such as: road direction, indicating the relationship between the road's travel direction and the digital direction; road type, such as expressway, urban expressway, urban road, etc.; number of lanes, including the total number of lanes such as regular lanes, emergency lanes, and shoulders; and ramp type, such as at-grade ramps and grade-separated ramps.
[0055] Optionally, lane-level data may include, for example: lane nodes, representing the topological relationship between lane reference lines; lane reference lines, representing the lane geometry between two adjacent lane nodes; lane networks, reflecting the connection relationships between lanes, including standard lane connections, lane adjacency connections, and lane intersection connections; and lane group attributes, such as lane group codes, numbers, start distances, and end distances.
[0056] In S410, the roundabout route data is grouped to obtain curve segment data corresponding to each curve segment in at least two curve segments of the roundabout road. Each curve segment is characterized in the corresponding curve segment data by multiple polynomial parametric equations.
[0057] In some optional embodiments, the processing described in this application embodiment can be performed on all roundabout route data in the map data, or the processing can be performed on a specified portion of the roundabout route data that requires smoothing. It should be noted that the roundabout route data in this application embodiment can be the centerline data of the roundabout road, or the edge line data of the roundabout road, etc.
[0058] In some optional embodiments, when grouping the roundabout route data, the roundabout route data can be sampled at equal intervals (e.g., 5 meters, 3 meters, etc.), and the curve segment data between two adjacent sampling points can be grouped together to obtain the curve segment data corresponding to each curve segment of the roundabout road. For example, in Figure 5 In the example shown, the roundabout route data can be sampled at equal intervals to obtain multiple sampling points, such as sampling point p1, sampling point p2, sampling point p3, sampling point p4, etc. A curve segment is formed between every two adjacent sampling points, such as curve segment C1 between sampling point p1 and sampling point p2, curve segment C2 between sampling point p2 and sampling point p3, curve segment C3 between sampling point p3 and sampling point p4, etc. In this way, multiple curve segments can be obtained, and the curve segment data corresponding to each curve segment can be obtained.
[0059] In some alternative embodiments, a multi-degree polynomial refers to a polynomial with a high degree (e.g., greater than or equal to 2). A polynomial is an expression consisting of the sum (or difference) of several monomials. Each monomial in the polynomial is called a term of the polynomial. The degree of the highest term among these monomials is the degree of the polynomial. Terms in the polynomial that do not contain letters are called constant terms.
[0060] Optionally, each curve segment can be represented by a specific polynomial according to actual needs. For example, it can be represented by a fifth-degree polynomial (i.e., the highest degree of the monomial contained in the polynomial is 5), or it can be represented by other forms of polynomials such as fourth-degree polynomials or sixth-degree polynomials.
[0061] In one example, if a curve segment is represented by a fifth-degree polynomial in the corresponding curve segment data, then the parametric equation for each curve segment can be represented by the following formula:
[0062]
[0063]
[0064] Where, x i,t The x-coordinate of the point on the i-th curve segment is represented by y. i,t The ordinate represents the y-coordinate of the point on the i-th curve segment; t represents a set parameter, where 0 ≤ t ≤ 1, and when t = 0, it corresponds to the starting position coordinate (x, y) of the curve segment. i,0 y i,0 ), when t=1, corresponds to the coordinates of the endpoint of the curve segment (x i,1 y i,1 ); The coefficients represent the polynomial coefficients corresponding to the i-th curve segment. That is, the parametric equation corresponding to each curve segment contains these 12 parameters, which can uniquely determine the shape of the curve segment.
[0065] It should be noted that the fifth-degree polynomial in the above example is only an example, and other forms may also exist in other embodiments of this application, such as setting more parameters.
[0066] Continue to refer to Figure 4 As shown, in S420, the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to at least two curve segments of the roundabout road is calculated.
[0067] It should be noted that the coefficient of a multi-term is greater than that of a linear term. Therefore, calculating the sum of the absolute values of the coefficients of multi-terms in the parametric equations corresponding to at least two curve segments of a roundabout road is to sum the absolute values of the coefficients excluding the constant term and the linear term.
[0068] For example, assuming that the curve segments are represented by the aforementioned fifth-degree polynomials in the corresponding curve segment data, then the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to these curve segments can be summed according to the following formula:
[0069]
[0070] Where V represents the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to at least two curve segments obtained by dividing the roundabout route.
[0071] Continue to refer to Figure 4 As shown, in S430, the coefficients of the parametric equation corresponding to each curve segment are solved by minimizing the sum of the absolute values of the coefficients of multiple terms as the optimization objective.
[0072] It should be noted that the purpose of smoothing the roundabout route data is to minimize the curvature of each point on the smoothed route data. If the resulting curve segments are close to straight lines, then the curvature is minimized. Therefore, to achieve this goal, the coefficients of the multiplicative terms in the parametric equations corresponding to each curve segment should be as close to zero as possible. In other words, the sum of the absolute values of these multiplicative coefficients needs to be minimized to facilitate solving for the coefficients of the parametric equations corresponding to each curve segment (including multiplicative coefficients, linear coefficients, and constant terms). Thus, the technical solution of this embodiment, by minimizing the sum of the absolute values of the multiplicative coefficients, not only reduces the complexity of the parametric equations and redundancy in the calculation process while achieving the smoothing effect, but also helps to generate simpler and more stable parametric equations, improving the overall fitting accuracy.
[0073] In some optional embodiments, when solving for the coefficients of the parametric equation corresponding to each curve segment with the optimization objective of minimizing the sum of the absolute values of the coefficients of multiple terms, corresponding constraint equations can be generated to constrain the solution process. The constraint equations are described in detail below:
[0074] In some alternative embodiments, geometric constraint equations can be generated based on the relationship that the end point of the previous curve segment coincides with the start point of the next curve segment in at least two curve segments of the roundabout road. Then, based on the generated geometric constraint equations, the coefficients of the parametric equations for each curve segment are solved with the optimization objective of minimizing the sum of the absolute values of the coefficients of multiple terms.
[0075] It should be noted that, because a roundabout is a closed loop, after dividing the roundabout into at least two curve segments, the endpoint of the preceding curve segment coincides with the starting point of the following curve segment. For example, in... Figure 5In the example shown, the terminal position of curve segment C1 (i.e., sampling point p2) coincides with the starting position of curve segment C2; the terminal position of curve segment C2 (i.e., sampling point p3) coincides with the starting position of curve segment C3. Therefore, geometric constraint equations can be generated based on this relationship between consecutive curve segments. This ensures the continuity and smoothness of the roundabout road at the curve segment connections, avoiding abrupt turns and breaks, resulting in a smoother and more natural visual effect for the entire roundabout road. Furthermore, in solving the parametric equation coefficients, the combination of geometric constraint equations and the optimization objective of multiple terms helps reduce computational complexity and redundant calculations, thereby improving computational efficiency and reducing the demand for computational resources. This makes the technique more efficient and economical in practical applications.
[0076] In some optional embodiments, when generating geometric constraint equations based on the coincidence of the endpoint of the preceding curve segment and the starting point of the following curve segment, the coordinate representations of the endpoint and the starting point of the following curve segment can be determined according to the parametric equations corresponding to the preceding and following curve segments. Then, the coordinate representation of the endpoint of the preceding curve segment is set to be equal to the coordinate representation of the starting point of the following curve segment, and the derivative of the endpoint coordinate representation is set to be equal to the derivative of the starting point coordinate representation, thus obtaining the geometric constraint equations. In other words, in the embodiments of this application, to ensure that the smoothed loop route data is sufficiently smooth, in addition to ensuring that the preceding and following curve segments are continuous at the connection point (i.e., the endpoint of the preceding curve segment and the starting point of the following curve segment), the derivatives of the preceding and following curve segments at the connection point are also ensured to be continuous.
[0077] In some optional embodiments, when setting the derivative of the coordinates of the endpoint to be equal to the derivative of the coordinates of the starting point, the first derivative of the coordinates of the endpoint can be set to be equal to the first derivative of the coordinates of the starting point, and the second derivative of the coordinates of the endpoint can be set to be equal to the second derivative of the coordinates of the starting point. Optionally, in addition to setting the first derivative of the coordinates of the endpoint to be equal to the first derivative of the coordinates of the starting point, and setting the second derivative of the coordinates of the endpoint to be equal to the second derivative of the coordinates of the starting point, higher derivatives of the coordinates of the endpoint can also be set to be equal to higher derivatives of the coordinates of the starting point. For example, the third derivative represented by the coordinates of the endpoint can be set to be equal to the third derivative represented by the coordinates of the starting point; or the fourth derivative represented by the coordinates of the endpoint can be set to be equal to the fourth derivative represented by the coordinates of the starting point; or even higher-order derivatives represented by the coordinates of the endpoint can be set to be equal to higher-order derivatives represented by the coordinates of the starting point.
[0078] In some optional embodiments, an offset constraint equation can be generated based on the offset of the starting position of each curve segment. Then, by minimizing the sum of the absolute values of the coefficients of multiple terms, the coefficients of the parametric equation corresponding to each curve segment are solved based on this offset constraint equation. This embodiment's technical solution, by considering the offset of the starting position of each curve segment to generate the offset constraint equation, ensures a smooth transition of curve segments at connection points, avoids abrupt turns or jitters, and reduces fitting errors.
[0079] In some optional embodiments, when generating the offset constraint equation based on the offset of the starting position of each curve segment, the coordinate representation of the starting position of each curve segment can be determined based on the parametric equation corresponding to each curve segment. For example, in the aforementioned example of a fifth-degree polynomial, the coordinate representation of the starting position of the i-th curve segment is (x... i,0 y i,0 ),in,
[0080] Then, based on the coordinate representation of the starting position of each curve segment and the coordinates of the starting position of each curve segment, the offset between the coordinate representation of the starting position of each curve segment and the coordinates of the starting position is calculated. Then, the offset constraint equation is generated by using the offset being less than or equal to a set distance threshold and greater than or equal to the negative number of the distance threshold as a constraint condition.
[0081] It should be noted that the starting coordinates of each curve segment refer to the coordinate values obtained from the map data used to represent the starting position of the curve segment. Let's assume the starting coordinates of the i-th curve segment are (X... i,0 Y i,0Then, the generated offset constraint equation can be expressed as:
[0082] -L≤x i,0 -X i,0 ≤L(i=1,…,n)
[0083] -L≤y i,0 -Y i,0 ≤L(i=1,…,n)
[0084] Where L represents the set distance threshold, and n represents the number of curve segments obtained by dividing the roundabout route.
[0085] In some optional embodiments, when solving for the coefficients of the parametric equation corresponding to each curve segment with the optimization objective of minimizing the sum of the absolute values of the coefficients of multiple terms, the absolute value of each coefficient of multiple terms can be replaced by a set parameter variable to convert the sum of absolute values into the sum of parameter variables. Then, the optimization objective is to minimize the sum of parameter variables, with constraints that the parameter variables are greater than or equal to 0 and that the coefficients of multiple terms are greater than or equal to the negatives of the parameter variables and less than or equal to the parameter variables. This embodiment transforms the optimization objective from a complex problem of summing absolute values to a simple linear summation problem by converting the sum of the absolute values of the coefficients of multiple terms into the sum of parameter variables, thereby simplifying the computational complexity and enabling the use of efficient linear programming algorithms, significantly improving the solution efficiency and accuracy.
[0086] Continue to refer to Figure 4 As shown, in S440, based on the parametric equations and coefficients of each curve segment, a set number of coordinate points are interpolated in the curve segment data corresponding to each curve segment, and smoothed roundabout route data is generated based on the interpolated coordinate points.
[0087] In some optional embodiments, the process of interpolating a set number of coordinate points from the curve segment data corresponding to each curve segment, based on the parametric equation and its coefficients, mainly involves: determining the parametric equation containing known coefficients for each curve segment based on its parametric equation and coefficients; then, calculating the coordinate values of each coordinate point based on this parametric equation and the number of coordinate points to be interpolated. For example, taking the aforementioned fifth-degree polynomial as an example, after solving... Then, if we want to interpolate m coordinate points between the start and end positions of the i-th curve segment, we can let Then, by substituting these values into the fifth-degree polynomial, we can obtain m+2 coordinate points.
[0088] It should be noted that the number of coordinate points interpolated from the curve segment data corresponding to each curve segment (i.e., the value of m in the example above) can be set according to actual needs. Generally speaking, the more coordinate points interpolated from the curve segment data corresponding to each curve segment, the better the smoothing effect of the final roundabout route data will be. However, the computational load due to interpolation will also be greater. Therefore, in practice, the number of coordinate points interpolated from the curve segment data corresponding to each curve segment can be determined by comprehensively considering the smoothing effect and the computational load. For example, one, two, three, or more coordinate points (such as five, eight, or ten, etc.) can be interpolated between the starting and ending positions of each curve segment.
[0089] In some optional embodiments, after interpolating a set number of coordinate points in the curve segment data corresponding to each curve segment, the coordinate points interpolated in the curve segment data corresponding to all curve segments can be arranged in order, and then a curve can be generated between every two adjacent coordinate points. The curve generated between these coordinate points is used as the center point of the smoothed roundabout route, and then the smoothed roundabout route data is generated according to the center line of the roundabout route and the width of the roundabout route.
[0090] Optionally, when generating a curve between two adjacent coordinate points, the line connecting two adjacent coordinate points can be used as the curve generated between two adjacent coordinate points; or interpolation can be performed again between two adjacent coordinate points, and then the line connecting the interpolated coordinate points can be used as the curve generated between two adjacent coordinate points; or other methods can be used to generate curves, such as generating curves between two adjacent coordinate points according to a set curvature.
[0091] In some optional embodiments, when interpolating a set number of coordinate points in the curve segment data corresponding to each curve segment based on the parametric equation and coefficients of the parametric equation, the set number of coordinate points can be interpolated in the curve segment data corresponding to at least two curve segments respectively through parallel processing. For example, multi-threading of the Central Processing Unit (CPU) can be used for parallel processing, such as different threads of the CPU executing the interpolation process in the curve segment data corresponding to different curve segments; or parallel processing can be used using the Graphics Processing Unit (GPU), such as different cores of the GPU executing the interpolation process in the curve segment data corresponding to different curve segments. The technical solution of this embodiment, through parallel processing, can fully utilize the multi-threaded processing capability of the CPU or the multi-core processing capability of the GPU, which not only improves the interpolation processing speed but also optimizes the resource utilization within the CPU or GPU.
[0092] In some optional embodiments, when interpolating a set number of coordinate points in the curve segment data corresponding to each curve segment based on the parametric equation and its coefficients, the set number of coordinate points can also be obtained by distributed processing in the curve segment data corresponding to at least two curve segments respectively. For example, the interpolation process in the curve segment data corresponding to different curve segments can be executed on different distributed nodes. The technical solution of this embodiment achieves efficient utilization of computing resources and load balancing through distributed processing, ensuring the parallelization and efficient execution of the interpolation processing task, thereby improving the utilization rate of computing resources and increasing the efficiency of interpolation calculation.
[0093] Figure 6 A flowchart of a road data processing method according to an embodiment of this application is shown. This road data processing method can be executed by a computer device, such as a server (e.g.,...). Figure 3 The server 302 shown can also be a terminal device (such as...). Figure 3 The vehicle terminal 301 shown is an example. (Refer to...) Figure 6 As shown, this road data processing method includes at least S600 to S660, detailed below:
[0094] In S600, map data corresponding to the road network is obtained. This map data includes roundabout route data, which refers to the roundabout roads in the road network.
[0095] Optionally, the specific implementation details of S600 can be referred to the specific description of S400 in the foregoing embodiments, and will not be repeated here.
[0096] In S610, the roundabout route data is grouped to obtain curve segment data corresponding to each curve segment in at least two curve segments of the roundabout road. Each curve segment is characterized in the corresponding curve segment data by multiple polynomial parametric equations.
[0097] Optionally, the specific implementation details of S610 can be referred to the specific description of S410 in the foregoing embodiments, and will not be repeated here.
[0098] In S620, the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to at least two curve segments of the roundabout road is calculated.
[0099] Optionally, the specific implementation details of S620 can be referred to the specific description of S420 in the foregoing embodiments, and will not be repeated here.
[0100] In S630, based on the coordinate representation of the starting position of each curve segment and the coordinates of the starting position of each curve segment, the distance between the coordinate representation of the starting position of each curve segment and the coordinates of the starting position is calculated, and the square of this distance is used as the shape loss of each curve segment.
[0101] It should be noted that the starting coordinates of each curve segment refer to the coordinate values obtained from the map data used to represent the starting position of the curve segment. For example, suppose the starting coordinates of the i-th curve segment are represented as (x... i,0 y i,0 The starting position coordinates of the i-th curve segment are (X... i,0 Y i,0 If the coordinates of the starting position of the i-th curve segment represent the square of the distance between the coordinates of the starting position and the coordinates of the starting position (i.e., the shape loss of the i-th curve segment), then the square of the distance between the coordinates of the starting position and the coordinates of the starting position can be expressed by the following formula: (x i,0 -X i,0 ) 2 +(y i,0 -Y i,0 ) 2 .
[0102] In S640, the sum of the shape losses of at least two curve segments of the roundabout road is calculated based on the shape loss of each curve segment.
[0103] Alternatively, assuming the roundabout route is divided into n curve segments, the shape loss of the i-th curve segment is expressed as (x i,0 -X i,0 ) 2 +(y i,0 -Y i,0 ) 2 The sum of the shape losses of at least two curved segments of a roundabout road can then be expressed by the following formula:
[0104]
[0105] Continue to refer to Figure 6 As shown, in S650, the coefficients of the parametric equation corresponding to each curve segment are solved with the optimization objective of minimizing the sum of the absolute values of the coefficients of multiple terms and the sum of the shape loss.
[0106] In this embodiment, by introducing a shape loss term as an optimization objective, the robustness of the model to noise and outlier data can be enhanced, making the model more stable and reliable in complex environments. Furthermore, by simultaneously considering the sum of the absolute values of the coefficients of multiple terms and the sum of the shape loss, the optimization process can more comprehensively consider the smoothness, fitting accuracy, and overall shape of the curve. This comprehensive optimization method results in more accurate parametric equation coefficients that better reflect the true characteristics of the curve.
[0107] In some optional embodiments, the sum of absolute values and the sum of shape losses can be weighted according to set weights to obtain a weighted sum. Then, minimizing the weighted sum is used as the optimization objective to solve for the coefficients of the parametric equation corresponding to each curve segment. This embodiment's technical solution can precisely control the degree of emphasis on different loss terms during the optimization process through weights. For example, when more emphasis is placed on the smoothness of the curve, the weight of the shape loss term can be increased; while when strict control of errors at certain key points is required, the weight of the sum of absolute values can be increased. This flexibility can adapt to various needs, whether pursuing high precision, high smoothness, or meeting specific shape constraints, a suitable optimization scheme can be found. Simultaneously, by using a weighted sum of absolute values and the sum of shape losses as the optimization objective, multiple loss terms can be merged into a unified optimization objective, simplifying the complexity of the optimization problem, helping to reduce computational load, and improving the efficiency of the optimization process.
[0108] It should be noted that in S650, when minimizing the sum of the absolute values of the coefficients of multiple terms and the sum of the shape loss as the optimization objective, the coefficients of the parametric equation corresponding to each curve segment can also be solved according to the technical solution of the aforementioned embodiment. The sum of the absolute values of the coefficients of multiple terms can be converted into the sum of parameter variables, and then the sum of the parameter variables and the sum of the shape loss can be minimized as the optimization objective to solve the coefficients of the parametric equation corresponding to each curve segment. This can simplify the computational complexity and improve the solution efficiency and accuracy.
[0109] In S660, based on the parametric equations and coefficients of each curve segment, a set number of coordinate points are interpolated from the curve segment data corresponding to each curve segment, and smoothed roundabout route data is generated based on the interpolated coordinate points.
[0110] Optionally, the specific implementation details of S660 can be referred to the specific description of S440 in the foregoing embodiments, and will not be repeated here.
[0111] The above embodiments have described the implementation details of the route processing scheme in this application. The following will further explain the technical solution of the embodiments of this application by taking the use of a fifth-degree polynomial as the parametric equation of the curved segment of the roundabout road as an example:
[0112] In one embodiment of this application, when segmenting the roundabout road to be processed in the road network to obtain at least two curve segments of the roundabout road, either the segment can be divided between any two adjacent shape points on the roundabout road, or the roundabout road can be sampled at equal intervals and then the segment can be divided between any two sampled points, or other segmentation methods can be used to segment the roundabout road to be processed.
[0113] In some alternative embodiments, a technique can be used to sample the roundabout road at equal intervals and then divide the area between any two sampling points into a segment. This division method is equivalent to a low-pass filter, which can filter out high-frequency spikes in the original roundabout route data, achieving a preliminary smoothing effect. For example, a point can be sampled every 5 meters on the roundabout road.
[0114] In some alternative embodiments, since lower-order polynomials cannot adequately adapt to scenarios with large roundabout curvatures and the fitting effect is unsatisfactory, fifth-order polynomials can be used to represent the various segments (i.e., curve segments) of the roundabout road. In other embodiments of this application, higher-order polynomials can also be used to represent the various segments of the roundabout road.
[0115] Optionally, in the o-th segment of the roundabout road, the coordinates of any point are expressed in the form of the following parametric equation:
[0116]
[0117]
[0118] Where, x i,t The x-coordinate of the point on the i-th segment is represented by y. i,t Let represent the ordinate of the point on the i-th segment; t represents a set parameter, where 0 ≤ t ≤ 1, and when t = 0, it corresponds to the starting position coordinate (x, y) of the i-th segment. i,0 y i,0 When y = 1, the coordinates of the endpoint position (x) of the i-th segment are given. i,1 y i,1 ); The coefficients represent the polynomial coefficients corresponding to the i-th segment. Each segment's parametric equation contains these 12 parameters, which uniquely determine the shape of the segment. Therefore, these are the parameters that this application ultimately aims to solve.
[0119] Given any value of t, the corresponding coordinates can be calculated; specifically, t = 0 corresponds to the starting coordinates of the i-th segment, i.e.:
[0120]
[0121]
[0122] t=1 corresponds to the coordinates of the endpoint of the i-th segment, that is:
[0123]
[0124]
[0125] The first derivative at each point on the i-th segment can be expressed as:
[0126]
[0127]
[0128] The second derivative at each point on the i-th segment can be expressed as:
[0129]
[0130]
[0131] The third derivative at each point on the i-th segment can be expressed as:
[0132]
[0133]
[0134] To ensure sufficient smoothness of the fitted roundabout route data, the obtained curve segments need to be continuous at the connection points between consecutive segments and also continuous in higher-order derivatives. In one embodiment of this application, the curve segments can be required to be continuous at the first, second, and third derivatives. Therefore, the following four types of geometric constraint equations can be listed:
[0135]
[0136]
[0137]
[0138]
[0139] In this context, geometric continuity means that the endpoint of the i-th segment overlaps (or is called continuous) with the starting point of the (i+1)-th segment; first derivative continuity means that the first derivative of the endpoint of the i-th segment is continuous with the first derivative of the starting point of the (i+1)-th segment; second derivative continuity means that the second derivative of the endpoint of the i-th segment is continuous with the second derivative of the starting point of the (i+1)-th segment; and third derivative continuity means that the third derivative of the endpoint of the i-th segment is continuous with the third derivative of the starting point of the (i+1)-th segment.
[0140] In the embodiments of this application, since the roundabout road is a closed curve, the endpoint of the last segment (i.e., the nth segment) and the starting point of the first segment (i.e., the i-th segment) obtained by dividing the roundabout road should also satisfy the above four types of constraint equations, namely:
[0141]
[0142]
[0143]
[0144]
[0145] Substituting the coordinates of the points mentioned above into the constraint equations, we obtain the following constraint conditions:
[0146] C0 continuity constraint:
[0147]
[0148]
[0149]
[0150]
[0151] C1 continuity constraint:
[0152]
[0153]
[0154]
[0155]
[0156] C2 continuity constraint:
[0157]
[0158]
[0159]
[0160]
[0161] C3 Continuity Constraint:
[0162]
[0163]
[0164]
[0165]
[0166] Due to the constraints imposed by the C0 constraints on the two segments, the offset does not need to be constrained repeatedly. Therefore, it is only necessary to constrain the offset of the starting point of each segment. Thus, the following n sets of offset constraint equations can be established:
[0167] -L≤x i,0 -X i,0 ≤L(i=1,...,n)
[0168] -L≤y i,0 -Y i,0 ≤L(i=1,...,n)
[0169] Among them, (X) i,0 Y i,0 The coordinates of the starting point of the i-th segment are represented by ; L represents the maximum allowable offset of the coordinate components, which is a hyperparameter of the optimization model. It can specify the maximum allowable movement distance before and after fitting in different scenarios. A smaller value for L results in a curve closer to the original curve after fitting, but also a worse smoothing effect. Therefore, a balance must be struck between these two factors. Optionally, L can be set to 2 meters or other values.
[0170] Will and Substituting into the above equation, we get:
[0171]
[0172]
[0173] The above are the constraints of the optimization model. The objective function is then established. In this embodiment, L1 loss for some polynomial coefficients is introduced. Since the purpose of smoothing the roundabout route is to minimize the curvature at each point on the smoothed route, it is clear that the curvature is minimized if each segment is a straight line. To achieve the goal of making the curves of each smoothed segment as close to a straight line as possible, it is desirable that the coefficients of the higher-order terms (greater than first-order terms) of each segment be as close to 0 as possible.
[0174] Referring to the parametric equations in the foregoing embodiments, embodiments of this application aim to ensure that each segment... Ideally, it should be equal to 0, that is, we hope it will be equal to 0. To be as small as possible. Therefore, embodiments of this application propose the following objective function:
[0175]
[0176] The objective function described above contains absolute values, making it non-differentiable and difficult to handle. Therefore, in this embodiment, the objective function can be transformed into a relaxation problem. Specifically, intermediate variables can be introduced for each parameter that is to be minimized, thus rewriting the objective function as follows:
[0177]
[0178] Simultaneously satisfying the following constraint equations:
[0179]
[0180] as well as:
[0181]
[0182]
[0183] Generally, limiting the smoothness of a curve involves restricting its maximum curvature. However, expressing the piecewise curvature using polynomial coefficients in this embodiment is complex, resulting in a model that is not a quadratic or linear programming problem, leading to low solution efficiency and failing to meet the timeliness requirements of large-scale map data compilation. Therefore, this embodiment transforms the goal of minimizing curvature into a goal of making the curve as close to a straight line as possible. Specifically, it borrows the idea of Lasso regression in machine learning, introducing L1 loss into the coefficients of some polynomials. However, unlike Lasso regression, this embodiment only penalizes the coefficients of higher-order terms, cleverly achieving the goal of minimizing the curvature of the curve and making it as close to a straight line as possible. Lasso regression can make the final optimization variables sparse (as close to zero as possible), thus enabling model selection.
[0184] Specifically, in the embodiments of this application, although it is assumed that each segment is a fifth-degree polynomial, the L1 loss function makes the coefficients as close to 0 as possible. Therefore, if a segment is very close to a straight line, then the coefficients of that segment greater than one degree are all 0. That is, although it is assumed to be a fifth-degree polynomial, due to the model selection ability given by the L1 loss function, the actual solution may be a first-degree polynomial. This model selection ability is handled automatically without human intervention, has strong robustness and generalization ability, and can dynamically adapt to the straight parts and the curvature parts in the island. The straight parts are first-degree polynomials, and the curvature parts are higher-degree polynomials.
[0185] In summary, the optimization model established in this application embodiment is as follows:
[0186] Solve as well as
[0187]
[0188] st
[0189] C0 continuity constraint:
[0190]
[0191]
[0192]
[0193]
[0194] C1 continuity constraint:
[0195]
[0196]
[0197]
[0198]
[0199] C2 continuity constraint:
[0200]
[0201]
[0202]
[0203]
[0204] C3 Continuity Constraint:
[0205]
[0206]
[0207]
[0208]
[0209] Endpoint offset constraint:
[0210]
[0211]
[0212] Intermediate variable constraints:
[0213]
[0214]
[0215]
[0216]
[0217]
[0218]
[0219]
[0220]
[0221] as well as:
[0222]
[0223]
[0224]
[0225]
[0226]
[0227]
[0228]
[0229]
[0230] The optimization model established in the above embodiments of this application is a linear programming model. There are well-established algorithms (such as the simplex method and interior-point method) that can solve this type of problem, as well as mature solvers (such as CPLEX and Gurobi) that can be directly called. Linear programming models have the following advantages: they are highly efficient, capable of solving large-scale linear programming problems in polynomial time; linear programming is a special type of convex optimization model, possessing both local and global optima, thus ensuring the stability of the calculation results; and the theory of linear programming is very mature, with in-depth research on its properties, solution algorithms, and sensitivity analysis. This provides a solid theoretical foundation for the fitting and smoothing problem of island route data.
[0231] For the coefficients of each segment obtained from the solution Based on the requirements for the smoothness of the roundabout route data, any number of coordinate points can be dynamically interpolated to achieve the purpose of smoothing the roundabout route data, because any given t can be used to calculate the corresponding coordinate points.
[0232] Suppose we want to interpolate m points within a segment (excluding the start and end points of the segment), then we can let...
[0233] Therefore, a certain segment corresponds to These 12 parameters are converted into the following m+2 coordinate points:
[0234]
[0235]
[0236] in
[0237] In the embodiments of this application, after reconstructing the m+2 coordinate points of the n segments of the roundabout road, they can be arranged in sequence to obtain the reconstructed complete centerline of the roundabout. Specifically, as follows... Figure 7 and Figure 8 As shown, the roundabout centerline obtained by smoothing according to the technical solution of this application embodiment not only meets the smoothing requirements of the roundabout route, but also, compared with the roundabout centerline after smoothing in related technologies, the roundabout centerline after smoothing using the technical solution of this application embodiment matches the actual roundabout route shape better, significantly improving the smoothing effect of the roundabout route.
[0238] When restoring the coordinates of each segment, parallel computing using CPU multithreading or parallel computing using the client's GPU can be employed to improve computation speed. For example, different threads of the CPU can be used to perform interpolation processing within different curve segments; or different cores of the GPU can be used to perform interpolation processing within different curve segments. Furthermore, in other embodiments of this application, big data distributed computing frameworks such as Hadoop and Spark can be used for multi-machine distributed computing to improve computation speed, for example, by using different distributed nodes to perform interpolation processing within different curve segments, etc.
[0239] In some optional embodiments, a new objective function can be introduced based on the above objective function V1 to form a multi-objective optimization problem. Specifically, all segment endpoints, i.e. (X... i,0 Y i,0 ) and (x i,0 x i,0 The square of the distance plus (X) i,1 Y i,1 ) and (x i,1 y i,1 The squared distance is used as the shape loss:
[0240]
[0241] Among them, (X) i,1 Y i,1 ) represents the coordinates of the endpoint of the i-th segment.
[0242] Similarly, due to the constraints of the start and end positions, the shape loss at the start and end positions is zero; furthermore, due to the constraints of the C0 constraints of the two segments, the shape loss does not need to be calculated repeatedly. Therefore, it is only necessary to calculate the shape loss corresponding to the start position of each segment, which simplifies V2 to:
[0243]
[0244] In some alternative embodiments, the previous objective function V1 and the newly introduced objective function V2 can be linearly weighted, thus transforming the multi-objective optimization problem into a single-objective optimization problem, i.e.:
[0245] V = k1V1 + k2V2
[0246] Here, k1 and k2 are the weight coefficients corresponding to the two objectives; the larger the coefficient, the more important the corresponding objective. For example, if k1 is significantly greater than k2, it means that shape loss should be reduced first; if k1 is significantly less than k2, it means that curvature should be reduced first. k1 and k2 can be assigned according to different scenarios and are the other two hyperparameters of the optimization model. The modified optimization model is a quadratic programming model, and methods such as the interior point method, ellipsoid algorithm, effective set method, and augmented Lagrange method can be used to solve it.
[0247] Among these methods, the interior-point method is an algorithm that finds the optimal solution within the feasible region, particularly suitable for convex quadratic programming problems. It constructs a penalty function to transform the constraints into part of the objective function, gradually approaching the optimal solution during iteration. The ellipsoid algorithm is a geometrically based method for solving quadratic programming problems. It constructs an ellipsoid within the feasible region and continuously narrows the ellipsoid's range to approach the optimal solution. The effective set method is a specific algorithm for solving convex quadratic programming problems. It analyzes the properties of the objective function and constraints to determine an effective set containing all possible optimal solutions, then searches this effective set to find the global optimum. The augmented Lagrange method combines the Lagrange method and the penalty function method. It introduces penalty function terms and Lagrange multipliers to transform the constraints into part of the objective function and constructs an augmented Lagrange function for solving. This method is effective in solving quadratic programming problems with complex constraints.
[0248] The technical solution of the above embodiments of this application can effectively control the curvature change of the roundabout by processing each segment of the roundabout, so that the smoothed roundabout route data is closer to the actual road shape, improving the smoothing effect of the roundabout route data. On the other hand, it can automatically and efficiently solve the fitting curve of the roundabout route data without the need to manually assume the standard shape of the roundabout, thereby enhancing the flexibility and adaptability of the smoothing processing of the roundabout route data, and can accurately restore the smoothed roundabout route data, meeting the high precision requirements of application scenarios such as lane-level navigation.
[0249] The following describes an embodiment of the apparatus described in this application, which can be used to execute the road data processing method described above in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the road data processing method described above in this application.
[0250] Figure 9 A block diagram of a road data processing apparatus according to an embodiment of this application is shown. This road data processing apparatus can be applied to a computer device, such as a server (e.g.,...). Figure 3 The server 302 shown can also be a terminal device (such as...). Figure 3 The vehicle terminal 301 shown in the figure.
[0251] Reference Figure 9 As shown, a road data processing apparatus 900 according to an embodiment of this application includes: an acquisition unit 901, a division unit 902, a calculation unit 904, a processing unit 906, and an interpolation unit 908.
[0252] The acquisition unit 901 is configured to acquire map data corresponding to the road network, the map data including roundabout route data, the roundabout route data referring to the roundabout roads in the road network; the division unit 902 is configured to group the roundabout route data to obtain curve segment data corresponding to each curve segment of at least two curve segments of the roundabout road, wherein each curve segment is represented by a parametric equation of multiple polynomials in the corresponding curve segment data; the calculation unit 904 is configured to calculate the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to the at least two curve segments; the processing unit 906 is configured to solve for the coefficients of the parametric equations corresponding to each curve segment with minimizing the sum of the absolute values as the optimization objective; the interpolation unit 908 is configured to interpolate a set number of coordinate points in the curve segment data corresponding to each curve segment based on the parametric equations and the coefficients of the parametric equations, and generate smoothed roundabout route data based on the interpolated coordinate points.
[0253] In some embodiments of this application, based on the foregoing scheme, the processing unit 906 is configured to: generate a geometric constraint equation based on the relationship that the endpoint position of the previous curve segment coincides with the starting position of the next curve segment in the at least two curve segments; and solve the coefficients of the parametric equation corresponding to each curve segment based on the geometric constraint equation, with minimizing the sum of the absolute values of the coefficients of the multiple terms as the optimization objective.
[0254] In some embodiments of this application, based on the foregoing scheme, the processing unit 906 is configured to: determine the coordinate representation of the endpoint position of the previous curve segment and the coordinate representation of the starting position of the next curve segment according to the parametric equation corresponding to the previous curve segment and the parametric equation corresponding to the next curve segment; set the coordinate representation of the endpoint position of the previous curve segment to be equal to the coordinate representation of the starting position of the next curve segment, and set the derivative of the coordinate representation of the endpoint position to be equal to the derivative of the coordinate representation of the starting position, so as to obtain the geometric constraint equation.
[0255] In some embodiments of this application, based on the foregoing scheme, the processing unit 906 is configured to: set the first derivative of the coordinate representation of the endpoint position to be equal to the first derivative of the coordinate representation of the starting position, and set the second derivative of the coordinate representation of the endpoint position to be equal to the second derivative of the coordinate representation of the starting position.
[0256] In some embodiments of this application, based on the foregoing scheme, the processing unit 906 is further configured to: set the second or higher derivative of the coordinates of the endpoint position to be equal to the second or higher derivative of the coordinates of the starting position.
[0257] In some embodiments of this application, based on the foregoing scheme, the processing unit 906 is further configured to: generate an offset constraint equation based on the offset of the starting position of each curve segment; and solve the coefficients of the parametric equation corresponding to each curve segment based on the offset constraint equation in the process of minimizing the sum of the absolute values of the coefficients of the multiple terms.
[0258] In some embodiments of this application, based on the foregoing scheme, the processing unit 906 is configured to: determine the coordinate representation of the starting position of each curve segment according to the parametric equation corresponding to each curve segment; calculate the offset between the coordinate representation of the starting position of each curve segment and the starting position coordinates of each curve segment according to the coordinate representation of the starting position of each curve segment and the starting position coordinates of each curve segment; and generate the offset constraint equation by using the offset being less than or equal to a set distance threshold and greater than or equal to the negative number of the distance threshold as a constraint condition.
[0259] In some embodiments of this application, based on the foregoing scheme, the processing unit 906 is configured to: replace the absolute value of each multinomial coefficient with a set parameter variable to convert the sum of the absolute values into the sum of the parameter variables; take minimizing the sum of the parameter variables as the optimization objective, and with the parameter variables being greater than or equal to 0, and with the multinomial coefficients being greater than or equal to the opposite of the parameter variables and less than or equal to the parameter variables as constraints, solve the coefficients of the parametric equations for each curve segment.
[0260] In some embodiments of this application, based on the foregoing scheme, the processing unit 906 is further configured to: calculate the distance between the coordinate representation of the starting position of each curve segment and the coordinates of the starting position of each curve segment, and use the square of the distance as the shape loss of each curve segment; calculate the sum of the shape losses of the at least two curve segments based on the shape loss of each curve segment; and solve for the coefficients of the parametric equation corresponding to each curve segment with minimizing the sum of the absolute values of the coefficients of the multiple terms as the optimization objective, including: solving for the coefficients of the parametric equation of each curve segment with minimizing the sum of the absolute values of the coefficients of the multiple terms and the sum of the shape losses as the optimization objective.
[0261] In some embodiments of this application, based on the foregoing scheme, the processing unit 906 is configured to: perform a weighted summation of the sum of absolute values and the sum of shape losses according to the set weights to obtain a weighted sum value; and solve for the coefficients of the parametric equation corresponding to each curve segment with minimizing the weighted sum value as the optimization objective.
[0262] In some embodiments of this application, based on the aforementioned scheme, the division unit 902 is configured to: sample the roundabout route data at equal intervals, divide the curve segment data between two adjacent sampling points into a group, and obtain the curve segment data corresponding to each curve segment of the roundabout road.
[0263] In some embodiments of this application, based on the foregoing scheme, the interpolation unit 908 is configured to: interpolate a set number of coordinate points in the curve segment data corresponding to at least two curve segments respectively by parallel processing according to the parametric equations and coefficients of the parametric equations corresponding to each curve segment.
[0264] In some embodiments of this application, based on the foregoing scheme, the interpolation unit 908 is configured to: interpolate a set number of coordinate points in the curve segment data corresponding to at least two curve segments respectively through distributed processing, according to the parametric equations corresponding to each curve segment and the coefficients of the parametric equations.
[0265] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing the computer device of the present application is shown. The computer device may be the server or terminal device in the foregoing embodiments.
[0266] It should be noted that, Figure 10 The computer system 1000 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0267] like Figure 10 As shown, the computer system 1000 may include a Central Processing Unit (CPU) 1001, which can perform various appropriate actions and processes based on a program stored in Read-Only Memory (ROM) 1002 or a program loaded from storage portion 1008 into Random Access Memory (RAM) 1003, such as performing the methods described in the above embodiments. The RAM 1003 also stores various programs and data required for system operation. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An Input / Output (I / O) interface 1005 is also connected to the bus 1004.
[0268] The following components can be connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. Removable media 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1010 as needed so that computer programs read from them can be installed into storage section 1008 as needed.
[0269] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit (CPU) 1001, it performs various functions defined in the system of this application.
[0270] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a computer program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0271] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and a computer program.
[0272] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0273] In another aspect, this application also provides a computer-readable medium, which may be included in the computer device described in the above embodiments; or it may exist independently and not assembled into the computer device. The computer-readable medium carries one or more computer programs, which, when executed by the computer device, cause the computer device to perform the methods described in the above embodiments.
[0274] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0275] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computer device to execute the method according to the embodiments of this application. For example, it can execute... Figure 4 or Figure 6 The road data processing method shown.
[0276] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0277] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for processing road data in electronic maps, characterized in that, include: Obtain map data corresponding to the road network, the map data including roundabout route data, the roundabout route data referring to the roundabout roads in the road network; The roundabout route data is grouped to obtain curve segment data corresponding to each curve segment in at least two curve segments of the roundabout road, wherein each curve segment is characterized by a parametric equation of multiple polynomials in the corresponding curve segment data; Calculate the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to each of the at least two curve segments; Using minimizing the sum of the absolute values as the optimization objective, the coefficients of the parametric equation corresponding to each curve segment are solved; Based on the parametric equations and coefficients of each curve segment, a set number of coordinate points are interpolated in the curve segment data corresponding to each curve segment, and smoothed roundabout route data is generated based on the interpolated coordinate points.
2. The road data processing method according to claim 1, characterized in that, The step of solving for the coefficients of the parametric equation corresponding to each curve segment, with the optimization objective of minimizing the sum of the absolute values, includes: Based on the relationship that the endpoint of the first curve segment coincides with the starting point of the second curve segment in the at least two curve segments, a geometric constraint equation is generated. Based on the geometric constraint equations, with minimizing the sum of absolute values as the optimization objective, the coefficients of the parametric equations corresponding to each curve segment are solved.
3. The road data processing method according to claim 2, characterized in that, The step of generating geometric constraint equations based on the coincidence of the endpoint position of the preceding curve segment and the starting position of the following curve segment in the at least two curve segments includes: Based on the parametric equations corresponding to the previous curve segment and the next curve segment, determine the coordinate representation of the endpoint position of the previous curve segment and the coordinate representation of the starting position of the next curve segment. The coordinate representation of the endpoint of the previous curve segment is set to be equal to the coordinate representation of the starting point of the next curve segment, and the derivative of the coordinate representation of the endpoint is set to be equal to the derivative of the coordinate representation of the starting point, so as to obtain the geometric constraint equation.
4. The road data processing method according to claim 3, characterized in that, Setting the derivative of the coordinates of the endpoint position to be equal to the derivative of the coordinates of the starting position includes: The first derivative of the coordinates of the endpoint is set to be equal to the first derivative of the coordinates of the starting point, and the second derivative of the coordinates of the endpoint is set to be equal to the second derivative of the coordinates of the starting point.
5. The road data processing method according to claim 4, characterized in that, Setting the derivative of the coordinates of the endpoint position to be equal to the derivative of the coordinates of the starting position further includes: The second or higher derivative expressed in terms of the coordinates of the endpoint is set to be equal to the second or higher derivative expressed in terms of the coordinates of the starting point.
6. The road data processing method according to claim 1, characterized in that, The smoothing method further includes: Based on the offset of the starting position of each curve segment, an offset constraint equation is generated; In the process of minimizing the sum of absolute values, the coefficients of the parametric equations corresponding to each curve segment are solved based on the offset constraint equation.
7. The road data processing method according to claim 6, characterized in that, The step of generating offset constraint equations based on the offset of the starting position of each curve segment includes: The coordinate representation of the starting position of each curve segment is determined based on the parametric equation corresponding to each curve segment; Based on the coordinate representation of the starting position of each curve segment and the coordinates of the starting position of each curve segment, calculate the offset between the coordinate representation of the starting position of each curve segment and the coordinates of the starting position. The offset constraint equation is generated by using the offset being less than or equal to a set distance threshold and greater than or equal to the opposite of the distance threshold as a constraint condition.
8. The road data processing method according to any one of claims 1 to 7, characterized in that, The step of solving for the coefficients of the parametric equation corresponding to each curve segment, with the optimization objective of minimizing the sum of the absolute values, includes: The absolute value of each coefficient of a multiple term is replaced by a set parameter variable, so that the sum of the absolute values is converted into the sum of the parameter variables; The optimization objective is to minimize the sum of the parameter variables, and the constraints are that the parameter variables are greater than or equal to 0, and the coefficients of the multiple terms are greater than or equal to the negatives of the parameter variables and less than or equal to the parameter variables. The coefficients of the parametric equations corresponding to each curve segment are then solved.
9. The road data processing method according to claim 1, characterized in that, The smoothing method further includes: Based on the coordinate representation of the starting position of each curve segment and the coordinates of the starting position of each curve segment, the distance between the coordinate representation of the starting position of each curve segment and the coordinates of the starting position is calculated, and the square of the distance is used as the shape loss of each curve segment. The sum of the shape losses of the at least two curve segments is calculated based on the shape loss of each curve segment; The step of solving the coefficients of the parametric equation corresponding to each curve segment with minimizing the sum of the absolute values as the optimization objective includes: solving the coefficients of the parametric equation corresponding to each curve segment with minimizing the sum of the absolute values and the sum of the shape loss as the optimization objective.
10. The road data processing method according to claim 9, characterized in that, The optimization objective, which is to minimize the sum of the absolute values and the sum of the shape losses, involves solving for the coefficients of the parametric equations corresponding to each curve segment, including: The sum of the absolute values and the sum of the shape losses are weighted and summed according to the set weights to obtain a weighted sum value; The coefficients of the parametric equation corresponding to each curve segment are solved by minimizing the weighted sum as the optimization objective.
11. The road data processing method according to any one of claims 1 to 10, characterized in that, The roundabout route data is grouped to obtain curve segment data corresponding to each of at least two curve segments of the roundabout road, including: The roundabout route data is sampled at equal intervals, and the curve segment data between two adjacent sampling points is grouped together to obtain the curve segment data corresponding to each curve segment of the roundabout road.
12. The road data processing method according to any one of claims 1 to 10, characterized in that, Based on the parametric equations and coefficients of each curve segment, a set number of coordinate points are interpolated from the curve segment data corresponding to each curve segment, including: Based on the parametric equations and coefficients of each curve segment, a set number of coordinate points are obtained by interpolation in the curve segment data corresponding to at least two curve segments through parallel processing; or, Based on the parametric equations and coefficients of each curve segment, a set number of coordinate points are obtained by interpolation in the curve segment data corresponding to at least two curve segments through distributed processing.
13. A road data processing device for electronic maps, characterized in that, include: The acquisition unit is configured to acquire map data corresponding to the road network, wherein the map data includes roundabout route data, and the roundabout route data refers to the roundabout roads in the road network; The segmentation unit is configured to group the roundabout route data to obtain curve segment data corresponding to each of at least two curve segments of the roundabout road, wherein each curve segment is characterized in the corresponding curve segment data by a parametric equation of multiple polynomials. The calculation unit is configured to calculate the sum of the absolute values of the coefficients of the multiple terms contained in the parametric equations corresponding to each of the at least two curve segments; The processing unit is configured to solve for the coefficients of the parametric equation corresponding to each curve segment, with minimizing the sum of the absolute values as the optimization objective. The interpolation unit is configured to interpolate a set number of coordinate points in the curve segment data corresponding to each curve segment based on the parametric equation and the coefficients of the parametric equation, and generate smoothed roundabout route data based on the interpolated coordinate points.
14. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the road data processing method according to any one of claims 1 to 12.
15. A computer device, characterized in that, include: One or more processors; A memory for storing one or more computer programs, which, when executed by the one or more processors, cause the computer device to implement the road data processing method according to any one of claims 1 to 12.
16. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, and a processor of a computer device reads from the computer-readable storage medium and executes the computer program, causing the computer device to perform the road data processing method according to any one of claims 1 to 12.