A data processing method and related apparatus
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2025-01-07
- Publication Date
- 2026-07-07
Smart Images

Figure CN122347516A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of map technology, and in particular to a data processing method and related apparatus. Background Technology
[0002] Nowadays, in order to adapt to the complex road conditions in the real world, electronic maps will present a three-dimensional road effect to reflect the relationship between roads in the real traffic environment (such as interchanges), providing users with an immersive user experience.
[0003] When rendering 3D road effects, the road elevation is required, as it reflects the road's height relative to a preset horizontal datum. In related technologies, methods for determining road elevation generally struggle to guarantee smoothness, easily leading to significant elevation differences between nearby points on the same road. This affects the rendering effect of roads in electronic maps, resulting in unreasonable abrupt changes in elevation on the rendered roads. Summary of the Invention
[0004] This application provides a data processing method and related apparatus that can improve the smoothness of road elevation, thereby enhancing the rendering effect of roads in electronic maps and avoiding unreasonable height abrupt changes on the rendered roads.
[0005] A first aspect of this application provides a data processing method, the method comprising:
[0006] Construct spline functions corresponding to each road segment within the processing range; the spline functions are used to characterize the elevation changes of the corresponding road segments, and the spline functions include the function parameters to be solved;
[0007] For each road segment, the elevation expression corresponding to the representative location point on the road segment is determined based on the spline function corresponding to the road segment;
[0008] Based on the positional relationships between the representative location points on different road segments and the attributes of the representative location points on their respective road segments, elevation constraints are constructed; the elevation constraints are used to indicate the conditions that the elevation of the representative location point needs to satisfy, based on the elevation expression corresponding to the representative location point.
[0009] A target function is constructed using the function parameters in each of the spline functions; the target function is used to indicate the expected requirements for the function parameters in each of the spline functions.
[0010] Based on the elevation constraints and the objective function, the function parameters in each spline function are solved to obtain the objective parameter values corresponding to the function parameters in each spline function.
[0011] For each road segment, the elevation of the location point on the road segment is determined based on the target parameter value corresponding to the function parameter in the spline function corresponding to the road segment.
[0012] A second aspect of this application provides a data processing apparatus, the apparatus comprising:
[0013] The function construction module is used to construct spline functions corresponding to each road segment within the processing range; the spline functions are used to characterize the elevation changes of the corresponding road segments, and the spline functions include the function parameters to be solved;
[0014] The elevation expression module is used to determine the elevation expression corresponding to the representative location point on each road segment based on the spline function corresponding to the road segment.
[0015] The constraint construction module is used to construct elevation constraints based on the positional relationships between representative location points on different road segments and the attributes of the representative location points on their respective road segments; the elevation constraints are used to indicate the conditions that the elevation of the representative location point needs to satisfy based on the elevation expression corresponding to the representative location point.
[0016] A target construction module is used to construct a target function using the function parameters in each of the spline functions; the target function is used to indicate the expected requirements for the function parameters in each of the spline functions;
[0017] The parameter solving module is used to solve the function parameters in each spline function according to the elevation constraint conditions and the objective function, so as to obtain the objective parameter values corresponding to the function parameters in each spline function.
[0018] The elevation determination module is used to determine the elevation of the location points on each road segment based on the target parameter value corresponding to the function parameter in the spline function corresponding to the road segment.
[0019] A third aspect of this application provides a computer device, the device comprising a processor and a memory:
[0020] The memory is used to store computer programs;
[0021] The processor is configured to perform the steps of the data processing method as described in the first aspect above, according to the computer program.
[0022] A fourth aspect of this application provides a computer-readable storage medium for storing a computer program for performing the steps of the data processing method described in the first aspect.
[0023] A fifth aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the data processing method described in the first aspect.
[0024] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0025] This application provides a data processing method that proposes a scheme for determining road elevation based on spline functions. The method includes: constructing spline functions corresponding to each road segment within the processing range. These spline functions characterize the elevation changes of the corresponding road segment. The spline functions include function parameters to be solved; that is, the elevation of the corresponding road segment is characterized by a spline function containing the function parameters to be solved. Then, for each road segment, based on the spline function corresponding to that road segment, the elevation expression corresponding to a representative location point on that road segment is determined; that is, the elevation of the representative location point on that road segment is represented using the spline function corresponding to that road segment. Furthermore, based on the positional relationships between representative points on different road segments and the attributes of these representative points within their respective road segments, elevation constraints are constructed. These constraints indicate the conditions that the elevations of the representative points must satisfy, based on their corresponding elevation expressions. In other words, by referring to the positional relationships between representative points and their attributes within their respective road segments, and utilizing the elevation expressions of the representative points on each road segment, the conditions that the elevations of each representative point must satisfy are constructed, thus yielding the elevation constraints. Additionally, objective functions are constructed using the function parameters in each spline function. These objective functions indicate the expected requirements for the function parameters in each spline function. Then, based on the elevation constraints and objective functions, the function parameters in each spline function are solved to obtain the corresponding objective parameter values. In other words, based on the constraints that the elevations of the representative points on each road segment should satisfy, and the expected requirements for the function parameters in each spline function, the function parameters in the spline functions are solved to obtain their parameter values. Finally, for each road segment, the elevation of the location point on the road segment is determined based on the target parameter value corresponding to the function parameter in the spline function corresponding to the road segment. That is, after determining the target parameter value corresponding to the function parameter, it is substituted into its corresponding spline function to obtain the spline curve representing the elevation change of the road segment. The elevation of any location point in the road segment can be determined from this spline curve.
[0026] The above method uses spline functions to represent road segments holistically from the dimension of "lines." Furthermore, it uses spline functions to represent the elevation of representative points on each road segment. Combining the constraints that the elevations of these representative points must satisfy with the desired parameters of the spline functions, the method solves for the function parameters of each road segment's corresponding spline function. This transforms the problem of determining the elevation of a road segment into solving for the function parameters within the spline functions. After obtaining the target parameter values corresponding to the function parameters in the spline functions, the elevations of road segments can be represented by continuous and smooth spline curves, improving the smoothness of road elevations and thus enhancing the rendering effect of roads in electronic maps, avoiding unreasonable height abrupt changes on the rendered roads. Attached Figure Description
[0027] Figure 1 This is a schematic diagram illustrating an application scenario of the data processing method provided in the embodiments of this application;
[0028] Figure 2 A flowchart illustrating the data processing method provided in an embodiment of this application;
[0029] Figure 3 A top view of a road provided for an embodiment of this application;
[0030] Figure 4 A schematic diagram of a vertical plane provided for an embodiment of this application;
[0031] Figure 5 A schematic diagram of a road provided for an embodiment of this application;
[0032] Figure 6 A schematic diagram of road segmentation provided for an embodiment of this application;
[0033] Figure 7 A schematic diagram illustrating the process of constructing continuous constraints within a group, provided for an embodiment of this application;
[0034] Figure 8 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application;
[0035] Figure 9 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application;
[0036] Figure 10 This is a schematic diagram of the server structure provided in an embodiment of this application. Detailed Implementation
[0037] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0038] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0039] The data processing method provided in this application can be executed by a computer device, which can be a terminal device or a server. The terminal device includes, but is not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server.
[0040] It should be noted that the information, data and signals involved in the embodiments of this application are all authorized by the relevant parties or fully authorized by all parties, and the collection, use and processing of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0041] To facilitate understanding of the data processing method provided in the embodiments of this application, the following example uses a server as the execution subject of the data processing method to illustrate the application scenarios of the data processing method.
[0042] See Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario of the data processing method provided in the embodiments of this application. For example... Figure 1 As shown, this application scenario includes a database 110 and a server 120. The server 120 can access the database 110 via the network, or the database 110 can be integrated inside the server 120.
[0043] Database 110 stores road network data, including road network data corresponding to the area to be processed. Server 120 can send a data retrieval request to database 110 to retrieve the road network data corresponding to the area to be processed from database 110. After retrieving the road network data corresponding to the area to be processed, server 120 can determine the various road segments within the area to be processed based on the road network data, which can be referred to... Figure 1 The road segment is defined as road segment 1, road segment 2, ..., and road segment N.
[0044] Server 120 can construct spline functions corresponding to each road segment within the processing range, such as... Figure 1 Spline function 1 corresponds to road segment 1, spline function 2 corresponds to road segment 2, ..., and spline function N corresponds to road segment N. This spline function is used to characterize the elevation changes of the corresponding road segment. The spline function includes the function parameters to be solved; that is, the elevation of the corresponding road segment is characterized by the spline function containing the function parameters to be solved.
[0045] Then, for each road segment, the server 120 can determine the elevation expression corresponding to the representative location point on the road segment according to the spline function corresponding to the road segment, such as elevation expression 1 corresponding to the representative location point on road segment 1, elevation expression 2 corresponding to the representative location point on road segment 2, ..., and elevation expression N corresponding to the representative location point on road segment N. That is, the elevation of the representative location point on the road segment is represented by the spline function corresponding to the road segment.
[0046] Furthermore, server 120 can construct elevation constraints based on the positional relationships between representative location points on different road segments and the attributes of the representative location points on their respective road segments. The elevation constraints are used to indicate the conditions that the elevation of the representative location points must meet based on the elevation expressions corresponding to the representative location points. In other words, by referring to the positional relationships between representative location points and the attributes of the representative location points on their respective road segments, the elevation expressions of the representative location points on each road segment can be used to construct the conditions that the elevation of each representative location point must meet, thereby obtaining the elevation constraints.
[0047] In addition, server 120 also needs to construct target functions using the function parameters in each spline function. The target function is used to indicate the expected requirements for the function parameters in each spline function, such as constructing the target function based on the expected requirements for the function parameters in spline function 1, the expected requirements for the function parameters in spline function 2, ..., and the expected requirements for the function parameters in spline function N.
[0048] Furthermore, server 120 can solve for the function parameters in each spline function based on the elevation constraints and the objective function, obtaining the target parameter values corresponding to the function parameters in each spline function. For example, it can obtain the target parameter value 1 corresponding to the function parameter in spline function 1, the target parameter value 2 corresponding to the function parameter in spline function 2, ..., and the target parameter value N corresponding to the function parameter in spline function N. In other words, it can solve for the function parameters in the spline functions based on the constraints that the elevations of representative points on each road segment should satisfy, and the expected requirements for the function parameters in each spline function, to obtain the parameter values of the function parameters in each spline function.
[0049] Finally, for each road segment, the server 120 can determine the elevation of the location point on the road segment based on the target parameter value corresponding to the function parameter in the spline function corresponding to the road segment. That is, after determining the target parameter value corresponding to the function parameter, it is substituted into its corresponding spline function to obtain a spline curve representing the elevation change of the road segment. The elevation of any location point in the road segment can be determined from this spline curve. Substituting the target parameter value 1 corresponding to the function parameter in spline function 1 into the spline function corresponding to road segment 1 yields a spline curve representing the elevation of road segment 1. The elevation of any point on road segment 1 can be determined on this spline curve. Similarly, substituting the target parameter value 2 corresponding to the function parameter in spline function 2 into the spline function corresponding to road segment 2 yields a spline curve representing the elevation of road segment 2. The elevation of any point on road segment 2 can be determined on this spline curve. Likewise, substituting the target parameter value N corresponding to the function parameter N into the spline function corresponding to road segment N yields a spline curve representing the elevation of road segment N. The elevation of any point on road segment N can be determined on this spline curve.
[0050] It should be understood that Figure 1 The application scenarios shown are merely examples. In practical applications, the data processing methods provided in this application embodiment can also be applied to other scenarios. No limitations are made here on the application scenarios of the data processing methods provided in this application embodiment.
[0051] The data processing method provided in this application will be described in detail below through method embodiments.
[0052] See Figure 2 , Figure 2 This is a flowchart illustrating the data processing method provided in an embodiment of this application. For ease of description, the following description uses a server as the execution subject of this data processing method. Figure 2 As shown, the data processing method includes the following steps:
[0053] S201: Construct spline functions corresponding to each road segment within the processing range; the spline functions are used to characterize the elevation changes of the corresponding road segments, and the spline functions include the function parameters to be solved.
[0054] The area to be processed can be any region within the road network data, such as an area with a three-dimensional road effect. Specifically, a three-dimensional road effect can represent different elevations at different locations on the same road, or different roads situated at different elevation planes, such as elevated roads or grade-separated roads. This application aims to determine the elevations of locations on each road within the area to be processed, so as to reflect the aforementioned three-dimensional road effect through the elevations of these locations. Of course, in practical applications, the area to be processed can also be an area without a three-dimensional road effect; therefore, this application does not specifically limit the area to be processed.
[0055] Each road segment within the processing area refers to a segment of the road included within the processing area. A road can include at least one road segment. Spline functions are used to characterize the elevation changes of the corresponding road segments. Elevation refers to the height difference between each location point on the road segment and the preset horizontal datum. Elevation changes reflect the changes in the height of each location point on the road segment relative to the preset horizontal datum.
[0056] Specifically, spline functions are used to characterize the shape of the corresponding road segment on its corresponding vertical plane. The vertical plane is a plane perpendicular to the preset horizontal base plane, determined based on the projection line segment of the road segment onto the preset horizontal base plane. The projection line segment of the road segment on the preset horizontal base plane refers to the line segment formed by vertically projecting the road segment onto the preset horizontal base plane. After determining the projection line segment, a vertical plane perpendicular to the preset horizontal base plane can be determined based on the projection line segment. This vertical plane intersects the preset horizontal base plane at the projection line segment.
[0057] For example, you can refer to Figure 3 , Figure 3 A top view of a road provided in an embodiment of this application. Figure 3 The image shows four locations on a road: location A, location B, location C, and location D. By translating these locations, we can obtain the corresponding locations 1, 2, 3, and 4. Figure 3 It also includes the distance between location points in a preset horizontal base plane, which can be obtained through d. 12 The distance between point 1 and point 2 in the preset horizontal base plane can be represented by d. 23 The distance between point 2 and point 3 in the preset horizontal base plane can be represented by d.34 This indicates the distance between position points 3 and 4 on a preset horizontal base plane. Then, each position point can be positioned from the side according to... Figure 3 Projecting along the ABCD direction, similar to a rotated sectional view in engineering drawings, yields a vertical plane.
[0058] For reference Figure 4 , Figure 4 A schematic diagram of the vertical plane provided in the embodiments of this application can be obtained through d 12 This d represents the lateral distance between point 1 and point 2 in the vertical plane. 12 Essentially, it is the distance between position 1 and position 2 in the preset horizontal base plane, which can be expressed by h. 12 This represents the vertical distance between point 1 and point 2 in the vertical plane; it can be represented by d. 23 This d represents the lateral distance between point 2 and point 3 in the vertical plane. 23 Essentially, it is the distance between position points 2 and 3 in the preset horizontal base plane, which can be expressed by h. 23 This represents the vertical distance between point 2 and point 3 in the vertical plane; it can be represented by d. 34 This d represents the lateral distance between point 3 and point 4 in the vertical plane. 34 Essentially, it is the distance between position points 3 and 4 in the preset horizontal base plane, which can be expressed by h. 34 This represents the height distance between point 3 and point 4 in the vertical plane. Correspondingly, spline functions can be used... Figure 4 The vertical plane shown represents the shape of the corresponding road segment.
[0059] A spline function is a special type of function defined by piecewise polynomials. Low-order spline interpolation can produce similar effects to high-order polynomial interpolation. In the embodiments of this application, the spline function initially constructed for each road segment includes function parameters to be solved. The function parameters to be solved refer to the function coefficients used in the spline function for solving. For example, the spline function can be a cubic polynomial, and the polynomial coefficients in the cubic polynomial can be used as function parameters to be solved, as shown in Formula 1, which is a cubic polynomial used as the spline function.
[0060] F(x) = ax 3 +bx 2 Formula 1: +cx+d
[0061] In Formula 1 above, a, b, c, and d are the polynomial coefficients in a cubic polynomial, meaning that these polynomial coefficients can be used as function parameters to be solved.
[0062] In one possible implementation, road segments can be divided in the following way:
[0063] Based on each road within the scope to be processed, at least one series group is constructed; the series group includes at least one road, and when the series group includes multiple roads, there is a one-to-one connection between the two connected roads in the series group;
[0064] For each series group, the series group is divided into at least one road segment according to a preset segment length threshold.
[0065] A series group refers to a road combination determined based on the topological connection relationship between roads within the processing range. It is used to further divide the roads into segments. That is, after determining the series groups within the processing range, road segments can be divided based on the series groups.
[0066] Based on the roads within the processing area, at least one series group can be constructed, each containing at least one road. When a series group includes multiple roads, the two connected roads within the group have a one-to-one connection. That is, when constructing series groups based on the roads within the processing area, roads with a one-to-one connection can be grouped into a single series group, which terminates at points where two or more roads connect. If only two roads are connected at a connection point, the connection between these two roads can be considered a one-to-one connection.
[0067] For example, you can refer to Figure 5 , Figure 5 A schematic diagram of a road provided for an embodiment of this application. Figure 5 The system includes five roads: link1, link2, link3, link4, and link5. Link1 and link3 overlap, as do link4 and link5. Figure 5 As shown, link3 and link5 are connected one-to-one at point K, so they can be grouped into the same series group. At point J, there are three connecting paths: link1, link2, and link4. It is clear that link1, link2, and link4 are not connected one-to-one with each other. Therefore, these three paths can be grouped into different series groups. Following the above method for determining series groups... Figure 5 The road diagram shown includes four series groups: the first series group includes link1, the second series group includes link2, the third series group includes link4, and the fourth series group includes link3 and link5.
[0068] After identifying the series groups within the processing range, each series group can be divided into at least one road segment according to a preset segment length threshold. For example, with a preset segment length threshold of 100 meters, if the road length corresponding to the series group is less than or equal to 100 meters, the entire series group can be considered as a single road segment, which can be represented by a spline curve. If the road length corresponding to the series group is greater than 100 meters, the series group can be divided into several road segments with a length of less than or equal to 100 meters, based on a 100-meter interval. This application does not specifically limit the preset segment length threshold.
[0069] For reference Figure 6 , Figure 6 This is a schematic diagram of road segmentation provided in an embodiment of this application. Figure 6 Based on Figure 5 The road segments are divided into four cascade groups. Specifically, taking a preset segment length threshold of 100 meters as an example, the length of road link1 in the first cascade group is less than 100 meters, therefore, road link1 can be considered as a road segment, i.e., FAJ is considered as a road segment; the length of road link2 in the second cascade group is also less than 100 meters, therefore, road link2 can also be considered as a road segment, i.e., JE is considered as a road segment; the length of road link4 in the third cascade group is also less than 100 meters, therefore, road link4 can also be considered as a road segment, i.e., JBH is considered as a road segment; the total length of roads link3 and link5 in the fourth cascade group is greater than 100 meters. According to the segment length threshold, this cascade group can be divided into two road segments, GAC and CKBD. In addition, Figure 6 Point A in the diagram is the overlay location between road link 1 and link 3, and point B is the overlay location between road link 4 and link 5.
[0070] As can be seen, the above method can group roads with one-to-one connections within the processing range into a single series group, and roads without one-to-one connections into different series groups. Then, for each series group, it can be divided into at least one road segment according to a preset segment length threshold. This facilitates subsequent elevation calculations based on road segments of appropriate length, avoiding excessive computational resources consumed by too many road segments and preventing the calculated spline curve from accurately representing road elevation changes due to too few road segments.
[0071] After identifying the road segments within the processing range, a corresponding spline function can be constructed for each road segment. For example, a cubic polynomial can be used to construct the spline function for each road segment. In this way, by constructing spline functions, each concatenated group within the processing range can be expressed as several continuous and smooth spline curves.
[0072] S202: For each road segment, determine the elevation expression corresponding to the representative location point on the road segment based on the spline function corresponding to the road segment.
[0073] Representative location points on a road segment refer to the location points that serve as representative locations within the road segment. For example, representative location points on a road segment may include location points located within the overlapping area of the road, the starting point of the road segment, and the ending point of the road segment. The overlapping area refers to the area where different roads overlap when viewed from above.
[0074] An elevation expression is an expression representing the elevation of a representative location point. The elevation expression corresponding to a representative location point can be determined based on the spline function corresponding to the road segment and the distance parameter of the representative location point on the road segment. The distance parameter reflects the position of the representative location point on the road segment. After constructing the spline function corresponding to each road segment, for each road segment, the distance parameter of the representative location point on that road segment can be substituted into the spline function corresponding to that road segment to obtain the elevation expression corresponding to that representative location point. The distance parameter is the independent variable in the spline function. When the function parameters in the spline function are to be solved, substituting the distance parameter of the representative location point as the independent variable into the spline function cannot yield the specific elevation of the representative location point, but only the elevation expression used to characterize the elevation of that representative location point.
[0075] In one possible implementation, the step of "determining the elevation expression corresponding to the representative location point on the road segment based on the spline function corresponding to the road segment" in S202 above may include:
[0076] Based on the distance between the representative location point and the starting point of the road segment, and the total length of the road segment, determine the representative distance ratio of the representative location point; substitute the representative distance ratio into the spline function corresponding to the road segment to obtain the elevation expression corresponding to the representative location point.
[0077] The representative distance ratio of a representative location point refers to the distance parameter of that point, which is used to determine the elevation expression corresponding to that point. The representative distance ratio can be determined by the ratio of the distance between the representative location point and the starting point of the road segment to the total length of the road segment; this ratio can be used as the representative distance ratio of the representative location point. Then, substituting this representative distance ratio into the spline function corresponding to the road segment yields the elevation expression for the representative location point.
[0078] by Figure 6 Taking road segment link1 as an example, the starting point of this road segment is F, and the representative location point of this road segment is A. The representative distance ratio corresponding to point A can be expressed by formula 2.
[0079]
[0080] Among them, t A Let t represent the representative distance ratio of the representative location point A in the road segment, FA represent the distance between the representative location point A and the starting point F in the road segment, and FJ represent the total length of the road segment. The representative distance ratio of each representative location point in the road segment is a constant. Therefore, we can change the variable t to a constant T and substitute the representative distance ratio into the spline function corresponding to the road segment to obtain the elevation expression corresponding to the representative location point.
[0081] For example, for the j-th segment in the i-th cascade group, the elevation expression corresponding to the representative location point on this road segment can be represented by Formula 3.
[0082]
[0083] in, This represents the elevation expression corresponding to the representative location point on the j-th road segment in the i-th cascade group. as well as The coefficients are the polynomial coefficients in the spline function, which are the function parameters to be solved in the spline function corresponding to the road segment. T represents the representative distance ratio of the location point.
[0084] Thus, the representative distance ratio corresponding to the representative location point on the road segment can be determined by the above method. Based on the representative distance ratio of the representative location point and the spline function corresponding to the road segment to which the representative location point belongs, the elevation expression corresponding to the representative location point on the road segment can be constructed. This realizes the representation of the elevation of the representative location point on the road segment through the elevation expression. Subsequently, relevant elevation constraints can be constructed based on the elevation expression corresponding to the representative location point.
[0085] In one possible implementation, if there are a first road segment and a second road segment with an overlapping relationship within the area to be processed, the representative location point on the first road segment includes the first overlapping location point on the first road segment located in the overlapping area, and the representative location point on the second road segment includes the second overlapping location point on the second road segment located in the overlapping area, wherein the overlapping area is the overlapping area of the first road segment and the second road segment in the top view direction.
[0086] If the first road segment and the second road segment overlap, it means that there is an area where the first road segment and the second road segment overlap vertically in the top-down view, i.e., an overlapping area. The first overlapping point is a location on the first road segment within the overlapping area, and the second overlapping point is a location on the second road segment within the overlapping area. In other words, the first and second overlapping points can be indicated by the same location point in the top-down view; for example, it can be referenced... Figure 6 The road segmentation diagram shown can be FAJ for the first road segment and GAC for the second road segment. Point A is the overlapping position between the first road segment and the second road segment in the top view. Point A can refer to the first overlapping position on the first road segment or the second overlapping position on the second road segment.
[0087] If there are first road segments and second road segments with overlapping relationships within the area to be processed, the first overlapping location point can be used as the representative location point on the first road segment, and the second overlapping location point can be used as the representative location point on the second road segment.
[0088] In one possible implementation, if there are a third road segment and a fourth road segment with inter-group connectivity within the processing range, the representative location point on the third road segment includes the first connected location point on the third road segment located in the inter-group connectivity region, and the representative location point on the fourth road segment includes the second connected location point on the fourth road segment located in the inter-group connectivity region. The inter-group connectivity relationship is the connectivity relationship between road segments in different serial groups, and the inter-group connectivity region is the connection region between the third road segment and the fourth road segment.
[0089] If there is an inter-group connection between the third road segment and the fourth road segment, it means that the third road segment and the fourth road segment belong to different series groups, and these two road segments are connected. For example, the end point of the third road segment connects to the beginning point of the fourth road segment. The inter-group connection area refers to the connection area between the third road segment and the fourth road segment. For example, the inter-group connection area can be the connection point between the third road segment and the fourth road segment. That is, the connection point can be the end point of the third road segment or the beginning point of the fourth road segment.
[0090] For example, you can refer to Figure 6 The road segmentation diagram shown can be represented as follows: the third road segment can be FAJ, and the fourth road segment can be JE. As can be seen from the above introduction of the series groups, the third road segment and the fourth road segment belong to two different series groups. For example, if the third road segment belongs to the first series group and the fourth road segment belongs to the second series group, and these two series groups are connected at point J, it means that there is an inter-group connection between the third road segment and the fourth road segment. The inter-group connection area can be represented by point J.
[0091] The first connecting point refers to a point on the third road segment located within the inter-group connecting area. If the connection between the third and fourth road segments is that the end point of the third road segment connects to the start point of the fourth road segment, then the first connecting point is the end point of the third road segment. The second connecting point refers to a point on the fourth road segment located within the inter-group connecting area. If the connection between the third and fourth road segments is that the end point of the third road segment connects to the start point of the fourth road segment, then the second connecting point is the start point of the fourth road segment.
[0092] If there are third and fourth road segments with inter-group connectivity within the processing area, the first connected location point can be used as the representative location point on the third road segment, and the second connected location point can be used as the representative location point on the fourth road segment.
[0093] In one possible implementation, if there are a fifth road segment and a sixth road segment with an intra-group connection within the processing range, and the tail end of the fifth road segment is connected to the head end of the sixth road segment, the representative position point on the fifth road segment includes the end position point of the fifth road segment, and the representative position point on the sixth road segment includes the start position point of the sixth road segment. The intra-group connection is the connection between road segments in the same serial group.
[0094] If the fifth road segment and the sixth road segment are connected within the same group, it means that the fifth road segment and the sixth road segment belong to the same series group, and the connection point of the fifth road segment and the sixth road segment within the series group is a one-to-one connection. Within the series group, the end of the fifth road segment can be connected to the beginning of the sixth road segment.
[0095] The end point of the fifth road segment refers to the point located at the end of the fifth road segment. If the end of the fifth road segment connects to the beginning of the sixth road segment, the end point of the fifth road segment can be used as the representative point on the fifth road segment. The start point of the sixth road segment refers to the point located at the beginning of the sixth road segment. If the end of the fifth road segment connects to the beginning of the sixth road segment, the start point of the sixth road segment can be used as the representative point on the sixth road segment.
[0096] For example, you can refer to Figure 6 The road segmentation diagram shown depicts road segment 5 as GAC and road segment 6 as CKBD. Road segments 5 and 6 belong to a series group, indicating an intra-group connection. Point K can be considered both the end and beginning of road segment 5. Therefore, when the end of road segment 5 connects to the beginning of road segment 6, the ending point K of road segment 5 can be considered the representative point on road segment 5, and the starting point K of road segment 6 can be considered the representative point on road segment 6.
[0097] In one possible implementation, when the road segment is the first road segment in a series group, the representative location point on the road segment includes the starting location point of the road segment, which serves as the group starting location point of the series group to which the road segment belongs.
[0098] When a road segment is the first road segment in a series group, its starting point can be used as its representative point. Essentially, this starting point is the group starting point of the series group to which the road segment belongs. For example, taking the fourth series group as an example, which includes road segments GAC and CKBD, with GAC being the first road segment in the series group, the starting point of GAC is point G. Point G can be used as the representative point of GAC, and it is also essentially the group starting point of the series group.
[0099] When a road segment is the last road segment in a series group, the representative location point on the road segment includes the end location point of the road segment, which serves as the end location point of the series group to which the road segment belongs.
[0100] When a road segment is the last road segment in a series group, its termination point can be used as its representative point. This termination point is essentially the termination point of the series group to which the road segment belongs. For example, taking the fourth series group as an example, which includes road segments GAC and CKBD, with CKBD being the last road segment in the series group, the termination point of CKBD is point D. Point D can be used as the representative point of CKBD, and it is also essentially the termination point of the series group.
[0101] S203: Based on the positional relationships between representative location points on different road segments and the attributes of the representative location points on their respective road segments, construct elevation constraints; the elevation constraints are used to indicate the conditions that the elevation of the representative location points must satisfy, based on the elevation expression corresponding to the representative location points.
[0102] The positional relationship between representative points on different road segments refers to the positional relationship between representative points belonging to different road segments. Specifically, it can include overlapping positional relationships, connecting positional relationships, etc. Among them, the overlapping positional relationship means that when viewed from a top-down angle, there is an area where the two road segments overlap vertically, and the representative points on the two road segments located in this area can be considered to have an overlapping positional relationship. The connecting positional relationship can be further divided into inter-group connecting relationship and intra-group connecting relationship. The inter-group connecting relationship refers to the connection relationship between representative points of two road segments belonging to different series groups. The intra-group connecting relationship refers to the connection relationship between representative points of two road segments belonging to the same series group. In both cases, the representative point belonging to different road segments is essentially the same point, which serves as the starting point and ending point on the two connected road segments, respectively.
[0103] For different positional relationships between representative location points, corresponding elevation constraints can be applied. For example, when two representative location points have a overlapping positional relationship, the difference between their respective elevations should exceed a preset height threshold. Another example is when two representative location points have an inter-group connection relationship, the elevations of their respective locations should satisfy the inter-group geometric continuity condition. Inter-group geometric continuity means that connected series groups need to maintain a geometrical continuity at the connection point. Yet another example is when two representative location points have an intra-group connection relationship, the elevations of their respective locations should satisfy both intra-group geometric continuity and intra-group derivative continuity conditions. Intra-group geometric continuity means that two connected road segments within a series group need to maintain a geometrical continuity at the connection point, and intra-group derivative continuity means that two connected road segments within a series group need to maintain a continuous derivative relationship at the connection point, i.e., ensuring the slope continuity of the two road segments at the connection point.
[0104] The attributes of a representative location point on its respective road segment are used to indicate the attributes that the representative location point should have at its location on the road segment. For example, when the representative location point is the start or end point of its respective series group, the slope of the representative location point should be 0.
[0105] As an example, elevation constraints can be constructed using the elevation expressions corresponding to road segments to reflect the positional relationships between representative points on different road segments, as well as the attributes of the representative points within their respective road segments. Elevation constraints are the conditions that must be met in determining the elevation of a point; they are used to indicate the conditions that the elevation of a representative point must satisfy, based on the elevation expression corresponding to that point.
[0106] In one possible implementation, within the area to be processed, there exist a first road segment and a second road segment with a covering relationship. The representative location points on the first road segment include the first covering location points on the first road segment located in the covering area, and the representative location points on the second road segment include the second covering location points on the second road segment located in the covering area. In this case, the elevation constraint conditions include covering constraint conditions. The covering constraint conditions are constructed based on the covering position relationship between the first covering location points and the second covering location points. The covering constraint conditions are used to indicate the conditions that the elevation difference between the first covering location points and the second covering location points needs to satisfy.
[0107] Overlapping constraint conditions refer to the elevation conditions that representative locations within the overlapped area on road segments with overlapped relationships must meet. Specifically, overlapping constraint conditions are used to indicate the conditions that the elevation difference between the first overlapped location point and the second overlapped location point must meet. The elevation expressions corresponding to the first overlapped location point and the second overlapped location point can be used to express the conditions that the elevation difference between the first overlapped location point and the second overlapped location point must meet, thus obtaining the overlapping constraint conditions.
[0108] In one possible implementation, the gland constraint condition can be constructed in the following way:
[0109] Based on the elevation expressions corresponding to the first and second capping locations, the elevation difference expression is determined. Based on the elevation difference expression, the capping relaxation parameters corresponding to the capping area, and the preset elevation difference threshold, capping constraints are constructed. The capping relaxation parameters are used to provide adjustment space for the elevation difference threshold, and the capping relaxation parameters are the parameters to be solved.
[0110] The elevation difference expression refers to the difference between the elevation expression corresponding to the first capping point and the elevation expression corresponding to the second capping point.
[0111] For example, taking the first capping location point as the location point above the capping area and the second capping location point as the location point below the capping area, the first road segment can be the j-th segment in the i-th series group, and the second road segment can be the q-th segment in the p-th series group. The elevation expression corresponding to the first capping location point can be represented by Formula 4.
[0112]
[0113] Among them, h u T represents the elevation expression corresponding to the first capping point. u This indicates the proportion of the distance corresponding to the first capping position point. as well as This represents the function parameters in the spline function corresponding to the first road segment.
[0114] The elevation expression corresponding to the second capping location can be represented by Formula 5.
[0115]
[0116] Among them, h d T represents the elevation expression corresponding to the location of the second capping point. d This indicates the proportion of the distance corresponding to the second capping position point. as well as This represents the function parameters in the spline function corresponding to the second road segment.
[0117] The elevation difference expression can be determined by subtracting the elevation expression corresponding to the first capping point from the elevation expression corresponding to the second capping point.
[0118] The capping relaxation parameter corresponding to the capping region refers to the variable parameter in the capping constraint condition. It provides adjustment space for the elevation difference threshold; that is, the elevation difference threshold value can be flexibly adjusted through the capping relaxation parameter to increase the probability of successfully solving the function parameters. The preset elevation difference threshold refers to the pre-set maximum elevation difference between capping regions, for example, 5 meters. It should be understood that different capping regions correspond to different capping relaxation parameters, which are the parameters to be solved. That is, when solving using the solver, the specific values of the capping relaxation parameters corresponding to different capping regions can be solved simultaneously.
[0119] Based on the elevation difference expression, the capping relaxation parameter corresponding to the capping area, and the preset elevation difference threshold, the capping constraint conditions can be obtained. For example, refer to Formula 6, which is the capping constraint condition.
[0120]
[0121] in, Let r be the elevation difference expression. i For the cap relaxation parameter, 0 <= r i <= H, where H is the preset elevation difference threshold.
[0122] As can be seen, by using the above method based on the elevation difference expression, the capping relaxation parameter corresponding to the capping area, and the preset elevation difference threshold, the capping constraint condition can be constructed. The capping relaxation parameter can provide adjustment space for the elevation difference threshold, thereby increasing the probability of successfully solving the capping relaxation parameter and enhancing the robustness of the elevation calculation process.
[0123] As can be seen, by using the above method, when there are first road segments and second road segments with overlapping relationships within the area to be processed, the elevation constraint conditions include the corresponding overlapping constraint conditions. Therefore, the elevation difference between representative locations in the overlapping area can be constructed based on the overlapping position relationship between the first and second overlapping locations. This allows for the constraint on the elevation difference of locations in the overlapping area within the road segment.
[0124] In one possible implementation, if there are a third road segment and a fourth road segment with inter-group connectivity within the processing area, and the representative location point on the third road segment includes a first connected location point located in the inter-group connectivity area on the third road segment, and the representative location point on the fourth road segment includes a second connected location point located in the inter-group connectivity area on the fourth road segment, then the elevation constraint condition includes an inter-group continuity constraint condition. The inter-group continuity constraint condition is constructed based on the connection position relationship between the first connected location point and the second connected location point, and the inter-group continuity constraint condition is used to indicate the elevation continuity of the first connected location point and the second connected location point.
[0125] Inter-group continuity constraints refer to the elevation requirements that representative points located within the inter-group connection area on road segments with inter-group connectivity must satisfy. Specifically, inter-group continuity constraints indicate that the elevations of the first and second connected points are continuous, meaning that the elevations of the first and second connected points are equal. The elevation expressions corresponding to the first and second connected points can be used to express the elevation requirements that the first and second connected points must satisfy, thus obtaining the inter-group continuity constraints.
[0126] In one possible implementation, inter-group continuity constraints can be constructed as follows:
[0127] Based on the elevation expressions corresponding to the first and second connected points, equations are constructed to obtain the inter-group continuity constraints.
[0128] The first and second connected points are in a connected state in the inter-group connected area. The heights of these two points in the inter-group connected area should be equal. Therefore, an equation can be constructed based on the elevation expressions corresponding to the first and second connected points.
[0129] For example, taking the third road segment as the j-th segment in the i-th cascade group and the fourth road segment as the q-th segment in the p-th cascade group as an example, the inter-group continuity constraint can be expressed by formula 7.
[0130]
[0131] Wherein, the left side of the equation represents the elevation expression corresponding to the first connected point on the third road segment, and the right side of the equation represents the elevation expression corresponding to the second connected point on the fourth road segment, T n This represents the percentage of the distance between the first connected points. as well as T represents the function parameter in the spline function corresponding to the third road segment. mThis represents the percentage of the distance between the second connected points. as well as This represents the function parameters in the spline function corresponding to the fourth road segment.
[0132] As can be seen, by constructing equations based on the elevation expressions of the first and second connected position points using the above method, inter-group continuity constraints can be obtained. Furthermore, through the inter-group continuity constraints, the elevations of representative position points on road segments with inter-group connectivity can be constrained to the same height, thereby improving the elevation smoothness of road segments with inter-group connectivity.
[0133] As can be seen from the above method, when there are third and fourth road segments with inter-group connectivity within the area to be processed, the elevation constraint conditions include inter-group continuity constraints. These constraints can be constructed based on the connection position relationship between the first and second connected position points. The elevation of the representative position point in the inter-group connectivity area must meet certain conditions. Thus, the inter-group continuity constraints can be used to ensure that the road segments with inter-group connectivity maintain consistent elevations in the inter-group connectivity area.
[0134] In one possible implementation, within the processing range, there exist a fifth road segment and a sixth road segment with an intra-group connection relationship, where the tail end of the fifth road segment connects to the head end of the sixth road segment, and the representative location point on the fifth road segment includes the end point of the fifth road segment, and the representative location point on the sixth road segment includes the start point of the sixth road segment, the elevation constraint condition includes an intra-group continuity constraint condition. The intra-group continuity constraint condition is constructed based on the connection position relationship between the end point of the fifth road segment and the start point of the sixth road segment. The intra-group continuity constraint condition is used to indicate the elevation continuity between the end point and the start point, and the continuous elevation change trend.
[0135] Intra-group continuity constraints refer to the elevation requirements that must be met by representative points located within the connected areas of road segments that are connected within a group. Specifically, intra-group continuity constraints indicate that the elevations of the connecting end and start points on two road segments with intra-group connectivity are continuous, and the elevation change trend is continuous. This means that the elevations of the end and start points at the connection point are equal, and their derivatives at the connection point are also equal. The elevation requirements that the end and start points must meet can be expressed using the corresponding elevation expressions for the end and start points, their first derivatives, and their second derivatives, thus obtaining the intra-group continuity constraints.
[0136] In one possible implementation, the spline function is a cubic polynomial, and the method for constructing the intra-group continuous constraints can be referred to... Figure 7 , Figure 7 This is a schematic diagram of the process for constructing continuous constraints within a group, provided in an embodiment of this application.
[0137] S701: Based on the elevation expressions corresponding to the termination point and the starting point, construct equations to obtain geometric continuity constraints.
[0138] Piecewise spline curves require that road segments connected within a group have equal elevations at the connection points and that their corresponding derivatives are also equal. When the spline function is a cubic polynomial, the elevations of the termination point and the starting point should satisfy the following constraint formula.
[0139]
[0140] Formula 8 states that the elevations of the termination point and the starting point should be consistent. This represents the elevation expression corresponding to the termination point. Formula 9 represents the elevation expression corresponding to the starting position point; it also states that the first derivative of the elevations of the ending and starting positions should be consistent. The first derivative of the elevation expression corresponding to the termination point. Formula 10 represents the first derivative of the elevation expression corresponding to the starting position point; Formula 10 indicates that the second derivative of the elevations of the ending and starting positions should be consistent. The second derivative of the elevation expression corresponding to the termination point. This represents the second derivative of the elevation expression corresponding to the starting position point.
[0141] Geometric continuity constraints are used to indicate the elevation continuity between the termination point and the starting point, specifically to restrict the termination point and the starting point to have the same elevation.
[0142] Based on the elevation expressions corresponding to the termination and starting points, equations can be constructed to obtain the geometric continuity constraints. Specifically, by substituting the elevation expressions corresponding to the termination and starting points into Equation 8 above, the geometric continuity constraints can be obtained.
[0143] For example, the range to be processed includes n cascaded groups, and the i-th cascaded group includes m i Taking the fifth road segment as the j-th segment in the i-th cascade group and the sixth road segment as the (j+1)-th segment in the i-th cascade group as an example, the geometric continuity constraint can be expressed by Equation 11.
[0144]
[0145] In this equation, the left side represents the elevation expression corresponding to the termination point of the fifth road segment, and the right side represents the elevation expression corresponding to the starting point of the sixth road segment. The value of i ranges from 1 to n, and the value of j ranges from 1 to m. i Between -1 and 1.
[0146] S702: Based on the first derivative of the elevation expression corresponding to the termination point and the first derivative of the elevation expression corresponding to the starting point, construct an equation to obtain the first derivative continuity constraint condition.
[0147] The first derivative continuity constraint is used to indicate that the first-order change trend of the elevation of the termination point and the starting point is continuous. This means that the first derivative continuity constraint is used to ensure that the first derivative of the elevation expression of the termination point and the starting point remains consistent.
[0148] Based on the first derivatives of the elevation expressions corresponding to the termination and starting points, equations can be constructed to obtain the first derivative continuity constraints. Specifically, when the spline function is a cubic polynomial, the first derivative of the spline function can be expressed by Equation 12.
[0149]
[0150] In the above formula Let T represent the first derivative expression of the spline function corresponding to the j-th segment in the i-th cascade group, and let T represent the distance ratio of the position points on the j-th segment in the i-th cascade group.
[0151] Substituting the representative distance ratio of the termination point into Formula 12 above, we can obtain the first derivative of the elevation expression corresponding to the termination point. Substituting the representative distance ratio of the starting point into Formula 12 above, we can obtain the first derivative of the elevation expression corresponding to the starting point. Then, substituting the first derivatives of the elevation expressions corresponding to the termination point and the starting point into Formula 9 above, we can obtain the first derivative continuity constraint condition.
[0152] Taking the fifth road segment as the j-th segment in the i-th cascade group and the sixth road segment as the (j+1)-th segment in the i-th cascade group as an example, the first derivative continuity constraint can be expressed by formula 13.
[0153]
[0154] In this equation, the left side represents the first derivative of the elevation expression corresponding to the termination point of the fifth road segment, and the right side represents the first derivative of the elevation expression corresponding to the starting point of the sixth road segment. The value of i ranges from 1 to n, and the value of j ranges from 1 to m.i Between -1 and 1.
[0155] S703: Based on the second derivative of the elevation expression corresponding to the termination point and the second derivative of the elevation expression corresponding to the starting point, construct an equation to obtain the second derivative continuity constraint condition.
[0156] The second derivative continuity constraint is used to indicate that the second-order variation trend of the elevation of the termination point and the starting point is continuous. This means that the second derivative continuity constraint is used to ensure that the second derivatives of the elevation expressions of the termination point and the starting point are consistent.
[0157] Based on the second derivatives of the elevation expressions corresponding to the termination and starting points, equations can be constructed to obtain the second derivative continuity constraints. Specifically, when the spline function is a cubic polynomial, the second derivative of the spline function can be expressed by Equation 14.
[0158]
[0159] In the above formula Let T represent the second derivative expression of the spline function corresponding to the j-th segment in the i-th cascade group, and let T represent the distance ratio of the position points on the j-th segment in the i-th cascade group.
[0160] Substituting the representative distance ratio of the termination point into Formula 14 above, we can obtain the second derivative of the elevation expression corresponding to the termination point. Substituting the representative distance ratio of the starting point into Formula 14 above, we can obtain the second derivative of the elevation expression corresponding to the starting point. Then, substituting the second derivatives of the elevation expressions corresponding to the termination point and the starting point into Formula 10 above, we can obtain the second derivative continuity constraint condition.
[0161] Taking the fifth road segment as the j-th segment in the i-th cascade group and the sixth road segment as the (j+1)-th segment in the i-th cascade group as an example, the second derivative continuity constraint can be expressed by formula 15.
[0162]
[0163] In this equation, the left side represents the second derivative of the elevation expression corresponding to the termination point of the fifth road segment, and the right side represents the second derivative of the elevation expression corresponding to the starting point of the sixth road segment. The value of i ranges from 1 to n, and the value of j ranges from 1 to m. i Between -1 and 1.
[0164] S704: Treat geometric continuity constraints, first-order derivative continuity constraints, and second-order derivative continuity constraints as intra-group continuity constraints.
[0165] Finally, the geometrical continuity constraint determined through the above steps, the first-order derivative continuity constraint for ensuring the first derivative of the elevations of the termination and starting points remains consistent, and the second-order derivative continuity constraint for ensuring the second derivative of the elevations of the termination and starting points remains consistent, can be used as intra-group continuity constraints.
[0166] As can be seen, geometric continuity constraints, first derivative continuity constraints, and second derivative continuity constraints can be constructed using the above methods. Through these intra-group continuity constraints, the elevations of representative points on road segments with intra-group connectivity, as well as the corresponding first and second derivatives, can be constrained to the same value, thereby improving the elevation smoothness of road segments with intra-group connectivity.
[0167] Therefore, through the above method, it can be seen that if there are fifth and sixth road segments with intra-group connectivity within the processing range, and the end of the fifth road segment connects to the beginning of the sixth road segment, the elevation constraint condition includes intra-group continuous constraint conditions. This can be constructed based on the connection position relationship between the termination point and the starting point, and the elevation of the termination point and the starting point must meet certain conditions. Thus, the intra-group continuous constraint conditions can be used to restrict the elevation of representative points on road segments with intra-group connectivity to remain consistent and to maintain a consistent elevation change trend.
[0168] In one possible implementation, where the road segment is the first road segment in a series group, and the representative location point on the road segment includes the starting location point of the road segment, and the starting location point is the group starting location point of the series group to which the road segment belongs, the elevation constraint includes a starting point constraint. The starting point constraint is constructed based on the slope attribute of the group starting location point, and the starting point constraint is used to indicate the conditions that the slope at the group starting location point needs to satisfy.
[0169] The starting point constraint refers to the slope condition that must be satisfied when a road segment is the first road segment in a series of road segments, serving as the representative location of that road segment. Specifically, the starting point constraint indicates the slope condition that must be satisfied at the starting location of the group. Since the slopes of the starting and ending points of each series of road segments are both 0, this starting point constraint indicates that the slope of the starting location of the group is 0. This starting point constraint can be constructed using the slope attribute of the starting location of the group. For example, the first derivative of the elevation expression corresponding to the starting location of the group can be used to express the slope condition that must be satisfied at the starting location of the group, thus obtaining the starting point constraint.
[0170] When a road segment is the last road segment in a series group, and the representative location point on the road segment includes the end point of the road segment, and the end point is the end point of the series group to which the road segment belongs, the elevation constraints include endpoint constraints. The endpoint constraints are constructed based on the slope attribute of the group's end point and are used to indicate the conditions that the slope at the group's end point must satisfy.
[0171] The endpoint constraint refers to the slope condition that must be satisfied at the termination point, which is the representative location point of the road segment, when the road segment is the last road segment in a series group. Specifically, the endpoint constraint indicates the slope condition that must be satisfied at the termination point of the group. The slope of the start and end points of each series group is 0. Therefore, the endpoint constraint indicates that the slope of the termination point of the group is 0. The endpoint constraint can be constructed using the slope attribute of the termination point of the group. For example, the first derivative of the elevation expression corresponding to the termination point of the group can be used to express the slope condition that must be satisfied at the termination point of the group, thus obtaining the endpoint constraint.
[0172] As an example, if the spline function is a cubic polynomial, the starting constraints can be constructed as follows:
[0173] Based on the first derivative of the elevation expression corresponding to the starting position point of the group and 0, an equation is constructed to obtain the starting point constraint conditions.
[0174] When the spline function is a cubic polynomial, the expression for the first derivative of the spline function can be found in Formula 12 above. The representative distance ratio of the group's starting position points is 0. Substituting the representative distance ratio of the group's starting position points into Formula 12, we can obtain the first derivative of the elevation expression corresponding to the group's starting position points. Then, by using the first derivative of the elevation expression corresponding to the group's starting position points and 0, we can construct an equation to obtain the starting constraint conditions shown in Formula 16.
[0175]
[0176] In this context, Formula 16 represents the starting point constraint, which indicates that the slope of the starting point of the i-th cascaded group is 0. The left side of the equation represents the first derivative of the elevation expression corresponding to the starting point of the group.
[0177] As another example, if the spline function is a cubic polynomial, the endpoint constraints can be constructed as follows:
[0178] Based on the first derivative of the elevation expression corresponding to the group's termination point and 0, an equation is constructed to obtain the endpoint constraint conditions.
[0179] When the spline function is a cubic polynomial, the representative distance ratio of the group's termination point is 1. Substituting this representative distance ratio into Formula 12, we can obtain the first derivative of the elevation expression corresponding to the group's termination point. Then, by using the first derivative of the elevation expression corresponding to the group's termination point and 0, we can construct an equation to obtain the endpoint constraint condition shown in Formula 17.
[0180]
[0181] In this context, the endpoint constraint represented by Formula 17 indicates that the slope of the termination point of the i-th cascade group is 0. The left side of the equation represents the first derivative of the elevation expression corresponding to the termination point of the group.
[0182] As can be seen, the above method can be used to construct start point constraints and end point constraints respectively. The start point constraint can limit the slope of the starting point of the first road segment in the series group to 0, and the end point constraint can limit the slope of the ending point of the last road segment in the series group to 0, thereby improving the smoothness of the spline curves corresponding to the road segments in the series group.
[0183] Therefore, using the above method, when a road segment is the first road segment in a series group, the elevation constraints include start-point constraints. These constraints can be constructed based on the slope attributes of the group's starting point, defining the slope requirements of the starting point of this road segment. This allows the start-point constraints to limit the slope of the starting point of the first road segment in the series group. Similarly, when a road segment is the last road segment in a series group, the elevation constraints include end-point constraints. These constraints can be constructed based on the slope attributes of the group's ending point, defining the slope requirements of the ending point of this road segment. This allows the end-point constraints to limit the slope of the ending point of the last road segment in the series group, thereby improving the elevation smoothness of the road segments.
[0184] S204: Construct the objective function using the function parameters in each spline function; the objective function is used to indicate the expected requirements for the function parameters in each spline function.
[0185] The objective function is used to indicate the desired requirements for the function parameters in each spline function. In the rendering task of road 3D effect, it is desirable for the elevations of the position points on the road segments to be as concentrated as possible, that is, it is desirable for the elevations of the position points on the road segments to be as similar as possible and as close to 0 as possible. In order to make the elevations of the position points on each road segment as similar as possible and as close to 0 as possible, it is necessary to make the values of the function parameters in each spline function approach 0. In other words, the desired requirement indicated by the objective function is to make the function parameters in each spline function as small as possible.
[0186] After obtaining the spline functions corresponding to each road segment, the objective function can be constructed using the function parameters in each spline function. For example, the objective function can be represented by Equation 18.
[0187]
[0188] Where minV2 represents the objective function constructed using the function parameters of each spline function, indicating the minimum value of the function parameters in each spline function; n represents the number of cascaded groups within the range to be processed; m i This represents the number of road segments within the i-th cascade group.
[0189] In one possible implementation, where the constructed elevation constraints include capping constraints, the "constructing an objective function using the function parameters in each spline function" in S204 above may include:
[0190] The objective function is constructed using the function parameters in each spline function and the corresponding capping relaxation parameters for each capping region within the range to be processed. The objective function is also used to indicate the expected requirements for the capping relaxation parameters for each capping region.
[0191] When road segments with overlapping relationships exist within the processing area, an objective function can be constructed using the function parameters of each spline function and the overlapping relaxation parameters corresponding to each overlapping region within the processing area. This objective function also indicates the desired requirements for the overlapping relaxation parameters corresponding to each overlapping region. In practical applications, it is desirable for the overlapping relaxation parameters to be as small as possible, i.e., as close to 0 as possible, so as to maximize the approximation of the elevation difference between overlapping regions to the elevation difference threshold. Therefore, the objective function can also indicate the desired requirement of minimizing the overlapping relaxation parameters corresponding to each overlapping region.
[0192] After obtaining the spline function corresponding to each road segment and the capping relaxation parameter corresponding to each capping area, the objective function can be constructed using the function parameters in each spline function and the capping relaxation parameter corresponding to each capping area. For example, the objective function can be represented by Equation 19.
[0193]
[0194] Where V represents the objective function, minV2 represents the expected requirements of the function parameters in each spline function in the objective function, and K represents the number of capping regions within the range to be processed.
[0195] Therefore, the above method can be used to construct an objective function based on the function parameters in each spline function and the corresponding capping relaxation parameters of each capping region within the processing range. This objective function can not only indicate the expected requirements for the function parameters in each spline function, but also the expected requirements for the capping relaxation parameters of each capping region. This ensures that the function parameters in each spline function obtained in the final solution are as small as possible, while the capping relaxation parameters of each capping region are also as small as possible. Thus, the objective function can be constructed from different dimensions, making the expected requirements indicated by the objective function richer, which is conducive to solving for more accurate spline function parameters and capping relaxation parameters.
[0196] In one possible implementation, the above-mentioned "constructing the target function using the function parameters in each spline function and the capping relaxation parameters corresponding to each capping region within the range to be processed" may include:
[0197] The first objective function is constructed based on the sum of the squares of the various gland relaxation parameters;
[0198] A second objective function is constructed based on the sum of the squares of the function parameters in each spline function;
[0199] The first objective function and the second objective function are weighted and summed to obtain the objective function; the objective function is used to indicate how to minimize the relaxation parameters of each gland and the function parameters in each spline function.
[0200] In this application, the ideal road is expected to have sufficient smoothness. Road smoothness means that the curvature corresponding to the position points on the spline curve should be as small as possible. If the spline curve corresponding to the road segment within the processing range is a straight line, the curvature corresponding to the position points on the spline curve is minimized. Therefore, the goal of minimizing curvature can be transformed into the goal of making the spline curve as close to a straight line as possible. Simultaneously, this application also aims for the position points on the road segment to be as concentrated as possible, i.e., it aims for the position points on the road segment to be as close to 0 as possible. Based on these two desired requirements, the idea of ridge regression in machine learning can be borrowed to introduce squared loss (L2) into the objective function.
[0201] For example, a first objective function can be constructed based on the sum of the squares of the various capping relaxation parameters. That is, the sum of the squares of the capping relaxation parameters corresponding to each capping region within the processing range can be used as the first objective function. The first objective function indicates the desired requirement for the capping relaxation parameters corresponding to each capping region; that is, the desired requirement indicated by the first objective function is to minimize the capping relaxation parameters corresponding to each capping region.
[0202] Furthermore, a second objective function can be constructed based on the sum of the squares of the function parameters in each spline function. Specifically, the sum of the squares of the function parameters in the spline functions corresponding to each road segment within the processing range can be used as the second objective function. This second objective function indicates the desired requirement for the function parameters in each spline function; that is, the desired requirement indicated by the second objective function is to minimize the number of function parameters in each spline function.
[0203] Finally, a weighted sum of the first and second objective functions can be performed to transform the multi-objective optimization problem into a single-objective optimization problem, yielding the objective function. This objective function indicates how to minimize the various cap relaxation parameters and the function parameters in each spline function. For example, the objective function can be expressed by Equation 20.
[0204] V = K1V1 + K2V2 (Formula 20)
[0205] Wherein, V represents the objective function, V1 represents the first objective function, K1 represents the weight coefficient corresponding to the first objective function, V2 represents the second objective function, and K2 represents the weight coefficient corresponding to the second objective function. The larger the weight coefficient, the more important the objective function corresponding to the weight coefficient. The weight coefficient can be set according to the scenario. For example, K1 can be 100 and K2 can be 1, that is, in this embodiment of the application, priority is given to ensuring the elevation difference of the covered area. In this regard, this application does not specifically limit the weight coefficient of the first objective function and the weight coefficient of the second objective function.
[0206] Substituting the first and second objective functions determined above into Formula 20, we can obtain the final objective function, which can be found in Formula 21.
[0207]
[0208] in, Denotes the first objective function. This represents the second objective function.
[0209] As can be seen, the objective function obtained by the above method not only indicates the expected requirements for the function parameters in each spline function, but also the expected requirements for the capping relaxation parameters corresponding to each capping region. This ensures that the function parameters in each spline function and the capping relaxation parameters corresponding to each capping region are minimized, thereby improving the generalization ability of the objective function used for solving and facilitating the determination of more accurate spline function parameters and capping relaxation parameters. Furthermore, this method can calculate the elevation of any point on a road segment based on the obtained spline function parameters and capping relaxation parameters without introducing other calculation strategies or other road parameters, avoiding calculation errors caused by numerous calculation strategies.
[0210] S205: Based on the elevation constraints and the objective function, solve for the function parameters in each spline function to obtain the objective parameter values corresponding to the function parameters in each spline function.
[0211] The target parameter value refers to the result obtained by solving for the function parameters in the spline function. The target parameter value is used to indicate the specific function parameter values of the spline function when characterizing the elevation changes of road segments.
[0212] As an example, after determining the elevation constraints and objective function, these can be input into a solver for solving. The solver calculates the function parameters of each spline function and outputs the corresponding solution results for each spline function's function parameters, thus obtaining the objective parameter values for each spline function's function parameters. If the objective function also includes capping relaxation parameters for each capping region within the processing range, the solver can also output the specific parameter values for each capping region's capping relaxation parameters. The solver here could be, for example, an interior point optimizer (Ipopt) or an operator splitting quadratic programming solver (OSQP), or other open-source optimization solvers.
[0213] S206: For each road segment, determine the elevation of the location points on the road segment based on the target parameter value corresponding to the function parameter in the spline function corresponding to the road segment.
[0214] After determining the target parameter values for the function parameters in the spline function corresponding to each road segment, the elevation of the location points on that road segment can be determined based on these target parameter values. For example, by substituting the target parameter values into the spline function corresponding to that road segment, a spline curve representing the elevation of that road segment can be obtained. The elevation of any representative location point on that road segment can then be determined on this spline curve.
[0215] It should be noted that the final determined elevation of the location points on the road segment can be either the representative location point in the road segment or any location point in the road segment.
[0216] In one possible implementation, after determining the target parameter values corresponding to the function parameters in the spline function corresponding to the road segment, the distance ratio of the location point can be determined based on the distance between the location point and the starting point of the road segment, as well as the total length of the road segment; and the distance ratio is then substituted into the spline function after being assigned the target parameter values to obtain the elevation of the location point.
[0217] In other words, for each location point in a road segment, the distance ratio of that location point can be determined based on the ratio between the distance between that location point and the starting point of the road segment and the total length of the road segment. The distance ratio of a location point refers to the distance parameter representing the point, and the elevation corresponding to that location point can be determined based on this distance parameter.
[0218] The spline function based on the target parameter assignment refers to the spline function formed by substituting the target parameter into the corresponding elevation expression. By substituting the distance ratio of the location point into the spline function based on the target parameter assignment, the elevation of the location point can be obtained.
[0219] As can be seen, after determining the distance ratio of the location points in the road segment, substituting it into the spline function based on the target parameter assignment, the elevation of the location points can be obtained. Thus, the elevation of the location points in the road segment is determined through a continuous and smooth spline curve, improving the smoothness of the road elevation.
[0220] In the data processing method provided in this application embodiment, road segments are represented holistically from the dimension of "lines" using spline functions. Then, the elevation of representative points on the road segments is represented using spline functions. Combining the constraints that the elevations of representative points in the road segments must satisfy, and the expected requirements of the spline function's parameter function, the function parameters in the spline function corresponding to each road segment are solved. This transforms the problem of determining the elevation of a road segment into the problem of solving the function parameters in the spline function. After obtaining the target parameter values corresponding to the function parameters in the spline function, the elevation of the road segments can be represented by continuous and smooth spline curves, improving the smoothness of road elevations and thus enhancing the rendering effect of roads in electronic maps, avoiding unreasonable height abrupt changes on the rendered roads.
[0221] Finally, combining Figure 6 Provide a comprehensive example. The scope to be processed is... Figure 6 Taking the five roads included as an example, the roads within the processing range can be divided into four concatenated groups. The first concatenated group can include link1, which can consist of a road segment. The starting point of this road segment is point F, and the ending point is point J. The spline function corresponding to this road segment can include...
[0222] The second concatenation group may include link2, which can consist of a road segment with its starting point at point J and its ending point at point E. The spline function corresponding to this road segment may include...
[0223] The third concatenation group may include link4, which can consist of a road segment with its starting point at point J and its ending point at point H. The spline function corresponding to this road segment may include...
[0224] The fourth concatenation group may include link3 and link5. The starting point of this group is point G, and the ending point is point D. This group can consist of two road segments: the first segment can consist of points G, A, and C, and the second segment can consist of points C, K, B, and D. The spline function corresponding to the first road segment may include... The spline function corresponding to the second road segment can include
[0225] like Figure 6 As shown, link1 and link3 have a overlapping relationship. Assuming that link1 at point A is higher than link3, the representative distance ratio corresponding to point A on link1 can be expressed as: Point A on link3 belongs to the first road segment in the fourth cascade group. The distance ratio corresponding to point A on link3 can be expressed as follows: Therefore, the capping constraint conditions determined based on point A can be expressed by formula 22.
[0226]
[0227] Substituting the representative distance ratio of point A in link1 and the representative distance ratio of point A in link3 into the above formula 22, we can obtain the overlay constraint condition that includes the representative distance ratio of point A, which can be referred to formula 23.
[0228]
[0229] like Figure 6 As shown, link4 and link5 have a overlapping relationship. Assuming that link5 at point B is higher than link4, and point B on link5 belongs to the second segment of the fourth series group, the representative distance ratio corresponding to point B on link5 can be expressed as: The distance ratio corresponding to point B on link4 can be expressed as... Therefore, the capping constraint conditions determined based on point B can be expressed by formula 24.
[0230]
[0231] Substituting the representative distance ratios of point B in link4 and link5 into formula 24 above, we can obtain the overlay constraint condition that includes the representative distance ratio of point B, as shown in formula 25.
[0232]
[0233] Furthermore, the value range of the gland relaxation parameter r1 in Formula 23 is 0 <= r1 <= H, and the value range of the gland relaxation parameter r2 in Formula 25 is 0 <= r2 <= H. H in the above value range represents the preset elevation difference threshold.
[0234] for Figure 6 For point J in the link1, point J is the termination point in the first cascaded group, and the distance ratio corresponding to point J in the link1 can be expressed as T. J,1 =1, point J on link2 is the starting point in the second cascaded group, and the distance ratio corresponding to point J on link2 can be expressed as T. J,2=0, point J on link4 is the starting point in the third cascaded group, and the distance ratio corresponding to point J on link4 can be expressed as T. J,4 =0. Therefore, based on the representative distance ratio of representative location points on the road segments with inter-group connectivity, we can construct the elevation expression of the representative location point on its respective road segment, and then construct inter-group continuity constraints based on the elevation expressions of each representative location point on different road segments.
[0235] The inter-group continuity constraints constructed based on point J on link1 and point J on link2 can be expressed as follows:
[0236] The inter-group continuity constraints constructed based on point J on link1 and point J on link4 can be expressed as follows:
[0237] The fourth series group consists of two road segments; that is, the two road segments in the fourth series group are connected within the group. Following the construction method of the geometric continuity constraints described above, the geometric continuity constraints that the constructed termination point (i.e., point C of the first road segment in the fourth series group) and starting point (i.e., point C of the second road segment in the fourth series group) should satisfy can be expressed as follows:
[0238] Following the above method for constructing first-order derivative continuity constraints, the first-order derivative continuity constraints that the constructed termination and starting positions should satisfy can be expressed as follows:
[0239] Following the above method for constructing the second derivative continuity constraint, the second derivative continuity constraint that the constructed termination and start points should satisfy can be expressed as follows:
[0240] Based on the above method of constructing the starting constraint, the starting constraint for point F, the starting position point of the first cascaded group, can be expressed as follows: The starting point constraint for point J, the starting position point of the second cascaded group, can be expressed as follows: The starting point constraint for point J, the starting position point of the third cascaded group, can be expressed as follows: The starting constraint condition for point G, the starting position point of the fourth cascade group, can be expressed as follows:
[0241] Based on the above method of constructing endpoint constraints, the endpoint constraint constructed for point J, the group termination point in the first cascade group, can be expressed as follows: The endpoint constraint for point E, the end point of the second cascaded group, can be expressed as follows: The endpoint constraint for point H, the end point of the third cascade group, can be expressed as follows: The endpoint constraint for point D, the termination point of the fourth cascade group, can be expressed as follows:
[0242] Based on the above method of constructing the objective function, the constructed objective function can be referred to Formula 26.
[0243]
[0244] After determining the above constraints and objective function, a solver can be used to solve for the function parameters in the spline functions based on these constraints and objective function. This yields the objective parameter values corresponding to the function parameters in each spline function. In other words, solving the problem using a solver can obtain...
[0245] These function parameters each correspond to a target parameter value, as well as the specific value of the cap relaxation parameter.
[0246] After determining the target parameter values corresponding to the above function parameters, the distance ratios of each location point on the road segment are substituted into the spline function after being assigned based on the target parameter values, and the elevation of each location point on the road segment can be obtained.
[0247] For point F on link1, which is the starting point of the first cascade group, its corresponding distance ratio can be expressed as T. F,1 =0, the elevation of point F can be represented by formula 27.
[0248]
[0249] For point J on link1, which is the termination point of the first cascade group, its corresponding distance ratio can be expressed as T. J,1 =1, and the elevation corresponding to point J can be represented by formula 28.
[0250]
[0251] For point A on link1, which belongs to the first series group, its corresponding distance ratio can be expressed as: The elevation corresponding to point A can be represented by formula 29.
[0252]
[0253] For point E on link2, which is the termination point of the second series group, its corresponding distance ratio can be expressed as T. E,2 =1, and the elevation corresponding to point E can be represented by formula 30.
[0254]
[0255] For point H on link4, which is the termination point of the third cascade group, the corresponding distance ratio can be expressed as T. H,4 =1, and the elevation corresponding to point H can be represented by formula 31.
[0256]
[0257] For point B on link4, which belongs to the third series group, its corresponding distance ratio can be expressed as: The elevation corresponding to point B can be represented by formula 32.
[0258]
[0259] For point G on link3, which is the starting point of the first road segment in the fourth series group, its corresponding distance ratio can be expressed as T. G,3 =0, the elevation corresponding to point G can be represented by formula 33.
[0260]
[0261] For point A on link3, which belongs to the first road segment in the fourth series group, its corresponding distance ratio can be expressed as: The elevation corresponding to point A can be represented by formula 34.
[0262]
[0263] For point C on link3, which is the termination point of the first road segment in the fourth series group, its corresponding distance ratio can be expressed as T. C,3 =1, and the elevation corresponding to point C can be represented by formula 35.
[0264]
[0265] For point K on link3, which belongs to the second road segment in the fourth series group, its corresponding distance ratio can be expressed as: The elevation corresponding to point K can be represented by formula 36.
[0266]
[0267] For point D on link 5, which is the termination point of the second road segment in the fourth series group, its corresponding distance ratio can be expressed as T. D,5 =1, and the elevation corresponding to point D can be represented by formula 37.
[0268]
[0269] For point B on link 5, which belongs to the second road segment in the fourth series group, its corresponding distance ratio can be expressed as: The elevation corresponding to point B can be represented by formula 38.
[0270]
[0271] Therefore, the elevation of each location point on each road segment within the processing range can be calculated using the data processing method described above.
[0272] Based on the data processing method provided in the foregoing embodiments, this application also provides a corresponding data processing apparatus. The following, in conjunction with... Figure 8 To explain, Figure 8 This is a schematic diagram of the structure of a data processing apparatus 800 provided in an embodiment of this application. The apparatus includes:
[0273] The function construction module 801 is used to construct spline functions corresponding to each road segment within the processing range; the spline functions are used to characterize the elevation changes of the corresponding road segments, and the spline functions include function parameters to be solved.
[0274] The elevation expression module 802 is used to determine the elevation expression corresponding to the representative location point on each road segment based on the spline function corresponding to the road segment.
[0275] The constraint construction module 803 is used to construct elevation constraints based on the positional relationships between the representative location points on different road segments and the attributes of the representative location points on their respective road segments; the elevation constraints are used to indicate the conditions that the elevation of the representative location point needs to satisfy based on the elevation expression corresponding to the representative location point.
[0276] The target construction module 804 is used to construct a target function using the function parameters in each of the spline functions; the target function is used to indicate the expected requirements for the function parameters in each of the spline functions.
[0277] The parameter solving module 805 is used to solve the function parameters in each spline function according to the elevation constraint conditions and the objective function, so as to obtain the objective parameter values corresponding to the function parameters in each spline function.
[0278] The elevation determination module 806 is used to determine the elevation of the location points on each road segment based on the target parameter value corresponding to the function parameter in the spline function corresponding to the road segment.
[0279] Optionally, the device further includes the following units for dividing the road into segments:
[0280] A serial group construction unit is used to construct at least one serial group based on each road within the range to be processed; the serial group includes at least one of the roads, and when the serial group includes multiple roads, there is a one-to-one connection between two connected roads in the serial group;
[0281] A segmentation unit is used to divide each of the series groups into at least one road segment according to a preset segment length threshold.
[0282] Optionally, the elevation expression module 802 includes:
[0283] The representative distance ratio determination unit is used to determine the representative distance ratio of the representative location point based on the distance between the representative location point and the starting point of the road segment, and the total length of the road segment; and to substitute the representative distance ratio into the spline function corresponding to the road segment to obtain the elevation expression corresponding to the representative location point.
[0284] Correspondingly, the elevation determination module 806 includes:
[0285] An elevation determination unit is used to determine the distance ratio of the location point based on the distance between the location point and the starting point of the road segment, and the total length of the road segment; and to input the distance ratio into a spline function after assigning the target parameter value to obtain the elevation of the location point.
[0286] Optionally, if there are a first road segment and a second road segment with a covering relationship within the area to be processed, the representative location point on the first road segment includes the first covering location point on the first road segment located in the covering area, and the representative location point on the second road segment includes the second covering location point on the second road segment located in the covering area, wherein the covering area is the overlapping area of the first road segment and the second road segment in the top view direction;
[0287] The elevation constraint conditions include capping constraint conditions, which are constructed based on the capping position relationship between the first capping position point and the second capping position point. The capping constraint conditions are used to indicate the conditions that the elevation difference between the first capping position point and the second capping position point needs to satisfy.
[0288] Optionally, the device further includes the following units for constructing the gland constraint conditions:
[0289] The elevation difference expression determination unit is used to determine the elevation difference expression based on the elevation expression corresponding to the first capping position point and the elevation expression corresponding to the second capping position point;
[0290] The capping constraint construction unit is used to construct the capping constraint based on the elevation difference expression, the capping relaxation parameter corresponding to the capping area, and the preset elevation difference threshold; the capping relaxation parameter is used to provide adjustment space for the elevation difference threshold, and the capping relaxation parameter is a parameter to be solved.
[0291] Optionally, the target construction module 804 includes:
[0292] The objective function construction unit is used to construct the objective function using the function parameters in each of the spline functions and the capping relaxation parameters corresponding to each of the capping regions within the range to be processed; the objective function is also used to indicate the expected requirements for the capping relaxation parameters corresponding to each of the capping regions.
[0293] Optionally, if there are a third road segment and a fourth road segment with inter-group connectivity within the processing range, the representative location point on the third road segment includes the first connected location point on the third road segment located in the inter-group connectivity region, and the representative location point on the fourth road segment includes the second connected location point on the fourth road segment located in the inter-group connectivity region. The inter-group connectivity relationship is the connectivity relationship between road segments in different serial groups, and the inter-group connectivity region is the connection region between the third road segment and the fourth road segment.
[0294] The elevation constraints include inter-group continuity constraints, which are constructed based on the connection position relationship between the first connected position point and the second connected position point. The inter-group continuity constraints are used to indicate the elevation continuity between the first connected position point and the second connected position point.
[0295] Optionally, the device further includes the following units for constructing the inter-group continuity constraints:
[0296] The inter-group continuity constraint determination unit is used to construct an equation based on the elevation expression corresponding to the first connected position point and the elevation expression corresponding to the second connected position point to obtain the inter-group continuity constraint.
[0297] Optionally, if there are a fifth road segment and a sixth road segment with an intra-group connection within the range to be processed, and the tail end of the fifth road segment is connected to the head end of the sixth road segment, the representative position point on the fifth road segment includes the end position point of the fifth road segment, and the representative position point on the sixth road segment includes the start position point of the sixth road segment. The intra-group connection is the connection relationship between road segments in the same serial group.
[0298] The elevation constraints include intra-group continuity constraints, which are constructed based on the connection position relationship between the end point of the fifth road segment and the start point of the sixth road segment. The intra-group continuity constraints are used to indicate that the elevations of the end point and the start point are continuous and that the elevation change trend is continuous.
[0299] Optionally, the spline function is a cubic polynomial, and the device further includes the following units for constructing the intra-group continuous constraints:
[0300] The geometric continuity constraint determination unit is used to construct equations based on the elevation expressions corresponding to the termination position point and the elevation expressions corresponding to the starting position point to obtain the geometric continuity constraint conditions.
[0301] The first derivative continuous constraint condition determination unit is used to construct an equation based on the first derivative of the elevation expression corresponding to the termination position point and the first derivative of the elevation expression corresponding to the starting position point, and obtain the first derivative continuous constraint condition.
[0302] The second derivative continuous constraint condition determination unit is used to construct an equation based on the second derivative of the elevation expression corresponding to the termination position point and the second derivative of the elevation expression corresponding to the starting position point, and obtain the second derivative continuous constraint condition.
[0303] The intra-group continuity constraint determination unit is used to take the geometric continuity constraint, the first derivative continuity constraint, and the second derivative continuity constraint as the intra-group continuity constraint.
[0304] Optionally, when the road segment is the first road segment in the series group, the representative location point on the road segment includes the starting location point of the road segment, which serves as the group starting location point of the series group to which the road segment belongs; the elevation constraint condition includes a starting point constraint condition, which is constructed based on the slope attribute of the group starting location point, and the starting point constraint condition is used to indicate the conditions that the slope at the group starting location point needs to satisfy;
[0305] When the road segment is the last road segment in the series group, the representative location point on the road segment includes the termination location point of the road segment, which serves as the group termination location point of the series group to which the road segment belongs; the elevation constraint condition includes the endpoint constraint condition, which is constructed based on the slope attribute of the group termination location point, and the endpoint constraint condition is used to indicate the conditions that the slope at the group termination location point needs to satisfy.
[0306] Optionally, the spline function is a cubic polynomial, and the device further includes the following units for constructing the starting point constraints:
[0307] The starting point constraint determination unit is used to construct an equation based on the first derivative of the elevation expression corresponding to the starting position point of the group and 0, and obtain the starting point constraint.
[0308] The device also includes the following units for constructing the endpoint constraints:
[0309] The endpoint constraint determination unit is used to construct an equation based on the first derivative of the elevation expression corresponding to the termination position point of the group and 0, and obtain the endpoint constraint.
[0310] Optionally, the objective function construction unit includes:
[0311] The first objective function construction unit is used to construct a first objective function based on the sum of the squares of each of the aforementioned gland relaxation parameters;
[0312] The second objective function construction unit is used to construct a second objective function based on the sum of the squares of the function parameters in each of the spline functions;
[0313] The summation unit is used to perform a weighted summation of the first objective function and the second objective function to obtain the objective function; the objective function is used to indicate how to minimize the function parameters in each of the capping relaxation parameters and the function parameters in each of the spline functions.
[0314] This application also provides a computer device, which may specifically be a terminal device or a server. The terminal device and server provided in this application will be described below from the perspective of hardware implementation.
[0315] See Figure 9 , Figure 9 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. For example... Figure 9 As shown, for ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application. The terminal can be any terminal device including mobile phones, tablets, personal digital assistants (PDAs), point-of-sale (POS) terminals, in-vehicle computers, etc. Taking a computer as an example:
[0316] Figure 9 This is a block diagram illustrating a portion of the structure of a computer associated with the terminal provided in an embodiment of this application. (Reference) Figure 9 The computer includes: a radio frequency (RF) circuit 1210, a memory 1220, an input unit 1230 (including a touch panel 1231 and other input devices 1232), a display unit 1240 (including a display panel 1241), a sensor 1250, an audio circuit 1260 (connected to a speaker 1261 and a microphone 1262), a wireless fidelity (WiFi) module 1270, a processor 1280, and a power supply 1290, etc. Those skilled in the art will understand that... Figure 9 The computer architecture shown does not constitute a limitation on the computer and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0317] The memory 1220 can be used to store software programs and modules. The processor 1280 executes various computer functions and data processing by running the software programs and modules stored in the memory 1220. The memory 1220 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer (such as audio data, telephone directory, etc.). In addition, the memory 1220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0318] The processor 1280 is the control center of the computer, connecting various parts of the computer through various interfaces and lines. It performs various computer functions and processes data by running or executing software programs and / or modules stored in the memory 1220, and by calling data stored in the memory 1220. Optionally, the processor 1280 may include one or more processing units; preferably, the processor 1280 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 1280.
[0319] In this embodiment of the application, the processor 1280 included in the terminal is used to execute the steps in the data processing methods described in the foregoing embodiments.
[0320] See Figure 10 , Figure 10 This is a schematic diagram of the structure of a server 1300 provided in an embodiment of this application. The server 1300 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 1322 (e.g., one or more processors) and memory 1332, and one or more storage media 1330 (e.g., one or more mass storage devices) for storing application programs 1342 or data 1344. The memory 1332 and storage media 1330 can be temporary or persistent storage. The program stored in the storage media 1330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 1322 may be configured to communicate with the storage media 1330 and execute the series of instruction operations stored in the storage media 1330 on the server 1300.
[0321] Server 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input / output interfaces 1358, and / or one or more operating systems, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0322] The steps performed by the server in the above embodiments can be based on this Figure 10The server structure shown is illustrated. The CPU 1322 is used to execute the steps in the data processing methods described in the foregoing embodiments.
[0323] This application also provides a computer-readable storage medium for storing a computer program that performs the steps of the data processing methods described in the foregoing embodiments.
[0324] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the data processing methods described in the foregoing embodiments.
[0325] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0326] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0327] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0328] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0329] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing computer programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0330] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0331] 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.
[0332] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A data processing method, characterized in that, The method includes: Construct spline functions corresponding to each road segment within the processing range; the spline functions are used to characterize the elevation changes of the corresponding road segments, and the spline functions include the function parameters to be solved; For each road segment, the elevation expression corresponding to the representative location point on the road segment is determined based on the spline function corresponding to the road segment; Based on the positional relationships between the representative location points on different road segments and the attributes of the representative location points on their respective road segments, elevation constraints are constructed; the elevation constraints are used to indicate the conditions that the elevation of the representative location point needs to satisfy, based on the elevation expression corresponding to the representative location point. A target function is constructed using the function parameters in each of the spline functions; the target function is used to indicate the expected requirements for the function parameters in each of the spline functions. Based on the elevation constraints and the objective function, the function parameters in each spline function are solved to obtain the objective parameter values corresponding to the function parameters in each spline function. For each road segment, the elevation of the location point on the road segment is determined based on the target parameter value corresponding to the function parameter in the spline function corresponding to the road segment.
2. The method according to claim 1, characterized in that, The road is divided into segments in the following way: Based on each road within the range to be processed, at least one series group is constructed; the series group includes at least one of the roads, and when the series group includes multiple roads, there is a one-to-one connection between two connected roads in the series group; For each of the series groups, the series group is divided into at least one road segment according to a preset segment length threshold.
3. The method according to claim 1 or 2, characterized in that, The step of determining the elevation expression corresponding to the representative location point on the road segment based on the spline function corresponding to the road segment includes: Based on the distance between the representative location point and the starting point of the road segment, and the total length of the road segment, the representative distance ratio of the representative location point is determined; the representative distance ratio is then substituted into the spline function corresponding to the road segment to obtain the elevation expression corresponding to the representative location point. Determining the elevation of the location points on the road segment based on the target parameter values corresponding to the function parameters in the spline function corresponding to the road segment includes: Based on the distance between the location point and the starting point of the road segment, and the total length of the road segment, the distance ratio of the location point is determined; the distance ratio is then substituted into the spline function assigned based on the target parameter value to obtain the elevation of the location point.
4. The method according to any one of claims 1 to 3, characterized in that, In the case where there are a first road segment and a second road segment with an overlapping relationship within the area to be processed, the representative location point on the first road segment includes the first overlapping location point on the first road segment located in the overlapping area, and the representative location point on the second road segment includes the second overlapping location point on the second road segment located in the overlapping area. The overlapping area is the overlapping area of the first road segment and the second road segment in the top view direction. The elevation constraint conditions include capping constraint conditions, which are constructed based on the capping position relationship between the first capping position point and the second capping position point. The capping constraint conditions are used to indicate the conditions that the elevation difference between the first capping position point and the second capping position point needs to satisfy.
5. The method according to claim 4, characterized in that, The capping constraint condition is constructed in the following way: Based on the elevation expression corresponding to the first capping position point and the elevation expression corresponding to the second capping position point, determine the elevation difference expression; Based on the elevation difference expression, the cap relaxation parameter corresponding to the cap area, and the preset elevation difference threshold, the cap constraint conditions are constructed. The cap relaxation parameter is used to provide adjustment space for the elevation difference threshold, and the cap relaxation parameter is the parameter to be solved.
6. The method according to claim 5, characterized in that, The construction of the target function using the function parameters in each of the spline functions includes: The objective function is constructed using the function parameters in each spline function and the capping relaxation parameters corresponding to each capping region within the range to be processed; the objective function is also used to indicate the expected requirements for the capping relaxation parameters corresponding to each capping region.
7. The method according to any one of claims 2 to 6, characterized in that, If there are a third road segment and a fourth road segment with inter-group connectivity within the processing range, the representative location point on the third road segment includes the first connected location point on the third road segment located in the inter-group connectivity region, and the representative location point on the fourth road segment includes the second connected location point on the fourth road segment located in the inter-group connectivity region. The inter-group connectivity relationship is the connectivity relationship between road segments in different serial groups, and the inter-group connectivity region is the connection region between the third road segment and the fourth road segment. The elevation constraints include inter-group continuity constraints, which are constructed based on the connection position relationship between the first connected position point and the second connected position point. The inter-group continuity constraints are used to indicate the elevation continuity between the first connected position point and the second connected position point.
8. The method according to claim 7, characterized in that, The inter-group continuity constraints are constructed in the following manner: Based on the elevation expressions corresponding to the first connected position point and the second connected position point, an equation is constructed to obtain the inter-group continuity constraint condition.
9. The method according to any one of claims 2 to 8, characterized in that, If there are a fifth road segment and a sixth road segment with an intra-group connection within the processing range, and the tail end of the fifth road segment is connected to the head end of the sixth road segment, then the representative position point on the fifth road segment includes the end position point of the fifth road segment, and the representative position point on the sixth road segment includes the start position point of the sixth road segment. The intra-group connection refers to the connection relationship between road segments in the same serial group. The elevation constraints include intra-group continuity constraints, which are constructed based on the connection position relationship between the end point of the fifth road segment and the start point of the sixth road segment. The intra-group continuity constraints are used to indicate that the elevations of the end point and the start point are continuous and that the elevation change trend is continuous.
10. The method according to claim 9, characterized in that, The spline function is a cubic polynomial, and the intra-group continuity constraints are constructed in the following manner: Based on the elevation expression corresponding to the termination point and the elevation expression corresponding to the starting point, an equation is constructed to obtain the geometric continuity constraint condition. Based on the first derivative of the elevation expression corresponding to the termination point and the first derivative of the elevation expression corresponding to the starting point, an equation is constructed to obtain the first derivative continuity constraint condition. Based on the second derivative of the elevation expression corresponding to the termination point and the second derivative of the elevation expression corresponding to the starting point, an equation is constructed to obtain the second derivative continuity constraint condition. The geometric continuity constraint, the first derivative continuity constraint, and the second derivative continuity constraint are used as the intra-group continuity constraint.
11. The method according to any one of claims 2 to 10, characterized in that, When the road segment is the first road segment in the series group, the representative position point on the road segment includes the starting position point of the road segment, and the starting position point serves as the group starting position point of the series group to which the road segment belongs. The elevation constraints include starting point constraints, which are constructed based on the slope attributes of the starting point of the group. The starting point constraints are used to indicate the conditions that the slope at the starting point of the group needs to meet. When the road segment is the last road segment in the series group, the representative location point on the road segment includes the termination location point of the road segment, which serves as the group termination location point of the series group to which the road segment belongs; the elevation constraint condition includes the endpoint constraint condition, which is constructed based on the slope attribute of the group termination location point, and the endpoint constraint condition is used to indicate the conditions that the slope at the group termination location point needs to satisfy.
12. The method according to claim 11, characterized in that, The spline function is a cubic polynomial, and the starting point constraint is constructed in the following way: Based on the first derivative of the elevation expression corresponding to the starting position point of the group and 0, an equation is constructed to obtain the starting point constraint condition; The endpoint constraint is constructed in the following way: Based on the first derivative of the elevation expression corresponding to the termination point of the group and 0, an equation is constructed to obtain the endpoint constraint condition.
13. The method according to claim 6, characterized in that, The construction of the target function by utilizing the function parameters in each of the spline functions and the capping relaxation parameters corresponding to each capping region within the processing range includes: A first objective function is constructed based on the sum of the squares of each of the aforementioned gland relaxation parameters; A second objective function is constructed based on the sum of the squares of the function parameters in each of the spline functions. The first objective function and the second objective function are weighted and summed to obtain the objective function; the objective function is used to indicate how to minimize the function parameters of each of the capping relaxation parameters and the function parameters of each of the spline functions.
14. A data processing apparatus, characterized in that, The device includes: The function construction module is used to construct spline functions corresponding to each road segment within the processing range; the spline functions are used to characterize the elevation changes of the corresponding road segments, and the spline functions include the function parameters to be solved; The elevation expression module is used to determine the elevation expression corresponding to the representative location point on each road segment based on the spline function corresponding to the road segment. The constraint construction module is used to construct elevation constraints based on the positional relationships between representative location points on different road segments and the attributes of the representative location points on their respective road segments; the elevation constraints are used to indicate the conditions that the elevation of the representative location point needs to satisfy based on the elevation expression corresponding to the representative location point. A target construction module is used to construct a target function using the function parameters in each of the spline functions; the target function is used to indicate the expected requirements for the function parameters in each of the spline functions; The parameter solving module is used to solve the function parameters in each spline function according to the elevation constraint conditions and the objective function, so as to obtain the objective parameter values corresponding to the function parameters in each spline function. The elevation determination module is used to determine the elevation of the location points on each road segment based on the target parameter value corresponding to the function parameter in the spline function corresponding to the road segment.
15. A computer device, characterized in that, The device includes a processor and a memory; The memory is used to store computer programs; The processor is configured to execute the data processing method according to any one of claims 1 to 13 according to the computer program.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when executed by an electronic device, implements the data processing method according to any one of claims 1 to 13.
17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data processing method according to any one of claims 1 to 13.