Virtual elevation generation method and apparatus, computer device, and storage medium
By identifying matching road segments in the electronic map, performing interpolation processing, and adjusting elevation consistency constraints, the problem of large differences in virtual elevation between uphill and downhill roads was solved, achieving road elevation consistency and improving the accuracy of the electronic map.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-07-26
- Publication Date
- 2026-05-26
Smart Images

Figure CN115830552B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for generating virtual elevation data. Background Technology
[0002] As society develops, road traffic has become increasingly complex, and people often need to rely on electronic maps for route planning and navigation when traveling. Electronic maps can display uphill and downhill roads. Uphill and downhill roads refer to roads divided by barriers, road markings, and other dividing objects. The elevations of a pair of uphill and downhill roads in the direction perpendicular to the horizontal plane should be approximately equal.
[0003] In traditional electronic map generation methods, the virtual elevations of uphill and downhill roads are usually determined separately. This can result in a large difference between the virtual elevations of uphill and downhill roads, which does not reflect the reality that the elevations of a pair of uphill and downhill roads are not significantly different. Summary of the Invention
[0004] Therefore, it is necessary to provide a virtual elevation generation method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can make the elevations of the uphill and downhill roads consistent, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for generating virtual elevation, the method comprising:
[0006] Based on the road matching segments between uphill and downhill roads in the road network, the target road and the opposite road of the target road are determined from the uphill and downhill roads;
[0007] The first location point sequence corresponding to the road segment in the target road is interpolated to obtain the target location point sequence of the target road.
[0008] Multiple target location points are determined from the target location point sequence, and the corresponding opposite location point in the opposite road is determined for each target location point.
[0009] Generate elevation consistency constraints for each pair of target and object locations; the elevation consistency constraints are used to indicate the conditions that must be met for the difference between the virtual elevation of the target location and the virtual elevation of the corresponding opposing location.
[0010] Based on the elevation consistency constraints, the first virtual elevation of each target location point and the second virtual elevation of each opposing location point are determined.
[0011] In one embodiment, before interpolating the first location point sequence corresponding to the road matching segment in the target road to obtain the target location point sequence of the target road, the method further includes:
[0012] Determine the target route corresponding to the road matching segment in the target road, and determine the endpoints and corners in the target route;
[0013] According to the positional order of the endpoints and corners in the target route, the endpoints and corners in the target route are sorted to obtain the first position point sequence;
[0014] The step of interpolating the first location point sequence corresponding to the matching road segment in the target road to obtain the target location point sequence of the target road includes:
[0015] The target route is interpolated according to a preset interpolation interval to obtain multiple interpolation points. The multiple interpolation points and the first position point sequence are then combined to obtain the target position point sequence.
[0016] In one embodiment, the step of interpolating the target route according to a preset interpolation interval to obtain multiple interpolation points includes:
[0017] Determine the reference position point and the subsequent position point located after the reference position point in the first position point sequence, and determine the target subsequence in the first position point sequence that starts from the reference position point and ends at the subsequent position point;
[0018] When the number of position points included in the target subsequence is equal to the number threshold, interpolation points are sequentially inserted into the line segment formed by the reference position point and the subsequent position point according to the interpolation interval to obtain at least one interpolation point.
[0019] In one embodiment, determining the first virtual elevation of each target location point and the second virtual elevation of each opposing location point based on the elevation consistency constraints includes:
[0020] Generate distribution characteristic conditions; the distribution characteristic conditions characterize the conditions that need to be met to represent the degree of dispersion of the virtual elevation of each target location point and the virtual elevation of each opposing location point;
[0021] Based on the distribution characteristics and the elevation consistency constraints, the first initial virtual elevation of each target location point and the second initial virtual elevation of each opposing location point are adjusted to obtain the first virtual elevation of each target location point and the second virtual elevation of each opposing location point.
[0022] Secondly, this application also provides a virtual elevation generation device, the device comprising:
[0023] The road determination module is used to determine a target road and its opposite road from the uphill and downhill roads based on road matching segments between uphill and downhill roads in the road network;
[0024] The location point determination module is used to perform interpolation processing on the first location point sequence corresponding to the road matching segment in the target road to obtain the target location point sequence of the target road; determine multiple target location points from the target location point sequence, and determine the opposite location point in the opposite road corresponding to each target location point;
[0025] The condition generation module is used to generate elevation consistency constraints for each pair of target location points and object location points; the elevation consistency constraints are used to indicate the conditions that need to be met for the difference between the virtual elevation of the target location point and the virtual elevation of the corresponding opposing location point; and the first virtual elevation of each target location point and the second virtual elevation of each opposing location point are determined according to the elevation consistency constraints.
[0026] In one embodiment, the virtual elevation generation device further includes a road matching segment generation module, used to acquire a road network and identify uphill and downhill roads in the road network; determine a first road route and the endpoint of the first road route in the uphill road; determine a second road route and the endpoint of the second road route in the downhill road; and determine a road matching segment between the uphill road and the downhill road based on the endpoint of the first road route and the endpoint of the second road route.
[0027] In one embodiment, the road matching segment between the uphill road and the downhill road includes a first matching segment and a second matching segment; the road matching segment generation module is further configured to project the endpoint of the first road route onto the downhill road to obtain a first projection point; project the endpoint of the second road route onto the uphill road to obtain a second projection point; determine a first matching segment in the uphill road that matches the downhill road based on at least one of the endpoint of the first road route and the second projection point; and determine a second matching segment in the downhill road that matches the uphill road based on at least one of the endpoint of the second road route and the first projection point.
[0028] In one embodiment, the endpoints of the first road route include a first starting point and a first ending point; the endpoints of the second road route include a second starting point and a second ending point; the road matching segment generation module is further configured to: if both the first starting point and the first ending point are successfully projected, extract a road segment from the up-line with the first starting point and the first ending point as the position points on both sides, to obtain a first matching segment; if either the first starting point or the first ending point is successfully projected, select a first target endpoint that is successfully projected from the first starting point and the first ending point, and extract a road segment from the up-line with the first target endpoint and the second projection point as the position points on both sides, to obtain a first matching segment; if neither the first starting point nor the first ending point is successfully projected, and both the second starting point and the second ending point are successfully projected, extract a road segment from the up-line with the second projection point of the second starting point and the second projection point of the second ending point as the position points on both sides, to obtain a first matching segment.
[0029] In one embodiment, the road matching segment between the uphill road and the downhill road includes a first matching segment in the uphill road that matches the downhill road and a second matching segment in the downhill road that matches the uphill road; the road determination module is further configured to determine a first segment length of the first matching segment; determine a second segment length of the second matching segment; and select one road from the uphill road and the downhill road as the target road and the other as the opposite road based on the first segment length and the second segment length.
[0030] In one embodiment, the virtual elevation generation device is further configured to determine a target route in the target road corresponding to the road matching segment, and determine the endpoints and corners in the target route; sort the endpoints and corners in the target route according to the positional order of the endpoints and corners in the target route to obtain a first position point sequence; the position point determination module is further configured to perform interpolation processing on the target route according to a preset interpolation interval to obtain multiple interpolation points, and combine the multiple interpolation points and the first position point sequence to obtain a target position point sequence.
[0031] In one embodiment, the location point determination module is further configured to determine a reference location point and a subsequent location point following the reference location point in the first location point sequence; the length of the polyline formed by the target subsequences in the first location point sequence, starting from the reference location point and ending at the subsequent location point, is greater than or equal to a preset interpolation interval; at least one interpolation point is inserted into the polyline formed by the target subsequences according to the interpolation interval; according to the positional order of each interpolation point in the polyline formed by the target subsequences, each interpolation point is added between the reference location point and the subsequent location point in the first location point sequence to update the first location point sequence; the target interpolation point that satisfies the long distance condition is taken as the new reference location point, and the next round of interpolation process is entered, returning to the step of determining the subsequent location point following the reference location point to continue execution until the subsequent location point is the last sequential location point in the first location point sequence, and the distance between the reference location point and the subsequent location point is less than or equal to the interpolation interval, and the finally updated first location sequence points are taken as the target location point sequence.
[0032] In one embodiment, the position point determination module is further configured to traverse the position points in the first position point sequence that are located after the reference position point according to the order in which each position point is arranged in the first position point sequence; extract candidate subsequences from the first position point sequence that start from the reference position point and end at the currently traversed position point, and determine the length of the broken line formed by the candidate subsequences; when the length of the broken line formed by the candidate subsequences is less than the interpolation interval, continue traversing until the length of the broken line formed by the candidate subsequences extracted from the first position point sequence based on the currently traversed position point is greater than or equal to the interpolation interval, and take the currently traversed position point in the first position point sequence as the subsequent position point.
[0033] In one embodiment, the position point determination module is further configured to: determine the preceding position point in the first position point sequence that is adjacent to the subsequent position point and located before the subsequent position point when the number of position points included in the target subsequence is greater than a number threshold; obtain the length of the broken line formed by the intermediate subsequences in the first position point sequence that starts from the reference position point and ends at the preceding position point; determine the interpolation coordinates of the first interpolation point in the current round of interpolation process according to the length of the broken line formed by the intermediate subsequences and the interpolation interval, thereby obtaining the first interpolation point; and sequentially insert subsequent interpolation points in the line segment formed by the first interpolation point and the subsequent position point according to the interpolation interval, thereby obtaining each subsequent interpolation point.
[0034] In one embodiment, the position point determination module is further configured to determine the difference between the length of the broken line formed by the intermediate subsequence and the interpolation interval, obtain the difference length, and use the difference length as the distance between the first interpolation point in the current round of interpolation and the preceding position point; and obtain the interpolation coordinates of the first interpolation point in the current round of interpolation based on the first position coordinates of the preceding position point, the second position coordinates of the following position point, and the distance between the first interpolation point in the current round of interpolation and the preceding position point.
[0035] In one embodiment, the position point determination module is further configured to determine the ratio between the length of the line segment formed by the preceding position point and the following position point and the difference length, to obtain a length ratio; obtain the first position coordinates of the preceding position point and the second position coordinates of the following position point; determine the coordinate difference between the first position coordinates and the second position coordinates; fuse the length ratio and the coordinate difference to obtain fused coordinates; and superimpose the first position coordinates and the fused coordinates to obtain the interpolation coordinates of the first interpolation point in the current round of interpolation.
[0036] In one embodiment, the location point determination module is further configured to, when the number of location points included in the target subsequence is equal to the number threshold, sequentially insert interpolation points in the line segment formed by the reference location point and the subsequent location point according to the interpolation interval, to obtain at least one interpolation point.
[0037] In one embodiment, the location point determination module is further configured to, for each of the plurality of target location points, take a location point on the opposite road whose distance from the current target location point satisfies a first short distance condition as the opposite location point corresponding to the current target location point.
[0038] In one embodiment, the location point determination module is further configured to: when the current target location point is an interpolation point obtained by interpolating the first location point sequence, project the current target location point onto the opposing road to obtain a third projection point, and use the third projection point as the opposing location point corresponding to the current target location point; when the current target location point is the sequence endpoint of the first location point sequence, obtain a second location point sequence in the opposing road corresponding to the road matching segment, and filter out the opposing location point corresponding to the current target location point from the second location point sequence.
[0039] In one embodiment, the location point determination module is further configured to obtain a second location point sequence corresponding to the road matching segment in the opposing road; divide the opposing route in the opposing road into multiple route segments by using the location points in the second location point sequence; for each of the multiple route segments, a perpendicular line is drawn from the current target location point to the current route segment to obtain an intermediate perpendicular foot, and when the intermediate perpendicular foot falls into the current route segment, the intermediate perpendicular foot is used as a candidate perpendicular foot; the target perpendicular foot closest to the current target location point is selected from the multiple candidate perpendicular feet; and a third projection point corresponding to the current target location point is determined based on the target perpendicular foot.
[0040] In one embodiment, the location point determination module is further configured to determine the distances between the current target location point and each location point in the second location point sequence, thereby obtaining multiple candidate distances; filter out the target distance that satisfies the second shortest distance condition from the multiple candidate distances; and when the distance between the target perpendicular foot and the current target location point is less than or equal to the target distance, use the target perpendicular foot as the third projection point corresponding to the current target location point.
[0041] In one embodiment, the condition generation module is further configured to generate distribution feature conditions; the distribution feature conditions characterize the conditions that need to be met to determine the degree of dispersion of the virtual elevation of each target location point and the virtual elevation of each opposing location point; and adjust the first initial virtual elevation of each target location point and the second initial virtual elevation of each opposing location point according to the distribution feature conditions and the elevation consistency constraints, to obtain the first virtual elevation of each target location point and the second virtual elevation of each opposing location point.
[0042] In one embodiment, the condition generation module is further configured to obtain at least one pair of associated location points of a road from the road network, determine the positional association between the location points included in each pair of associated location points, generate a set of virtual elevation constraints corresponding to at least one pair of associated location points based on the positional association, the set of virtual elevation constraints includes at least one of overburden constraint, adjacent height continuity constraint, and slope constraint, and determine the first virtual elevation of each target location point, the second virtual elevation of each opposing location point, and the third virtual elevation corresponding to the location points included in each pair of associated location points based on the set of virtual elevation constraints and the elevation consistency constraint.
[0043] Thirdly, this application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in any of the virtual elevation generation methods provided in the embodiments of this application.
[0044] Fourthly, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the virtual elevation generation methods provided in the embodiments of this application.
[0045] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the virtual elevation generation methods provided in the embodiments of this application.
[0046] The aforementioned virtual elevation generation method, apparatus, computer equipment, storage medium, and computer program product, by determining the road matching segment between the uphill and downhill roads, can determine the target road and the opposing road in the uphill and downhill roads based on the determined road matching segment. By determining the target road segment, a first position point sequence corresponding to the road matching segment can be obtained. By obtaining the first position point sequence, interpolation processing can be performed on the first position point sequence to obtain a target position point sequence containing richer position points. By obtaining the target position point sequence, multiple target position points can be selected from the target position point sequence, and the opposing position point corresponding to each target position point in the opposing road can be determined. In this way, elevation consistency constraints corresponding to each pair of target position points and target position points can be generated. Through the generated multiple elevation consistency constraints, the first virtual elevation of each target position point and the second virtual elevation of each opposing position point can be obtained. Since the elevation consistency constraint condition requires the difference between the virtual elevation of the target location point and the virtual elevation of the corresponding opposite location point to meet the condition, the difference between the first virtual elevation and the corresponding second virtual elevation will satisfy the virtual elevation difference constrained by the elevation consistency constraint condition. As a result, the virtual elevation difference between the uphill and downhill roads rendered based on the first and second virtual elevations will be less than a certain elevation threshold, which is consistent with the reality that the elevations of a pair of uphill and downhill roads are not much different. Attached Figure Description
[0047] Figure 1 This is an application environment diagram of the virtual elevation generation method in one embodiment;
[0048] Figure 2 This is a flowchart illustrating a virtual elevation generation method in one embodiment;
[0049] Figure 3 This is a schematic diagram of the uphill and downhill roads in one embodiment;
[0050] Figure 4 This is a schematic diagram of the first location point sequence in one embodiment;
[0051] Figure 5 This is a schematic diagram of a target location point sequence in one embodiment;
[0052] Figure 6 This is a schematic diagram of the first matching region in one embodiment;
[0053] Figure 7 This is a flowchart illustrating interpolation in a first position point sequence according to an interpolation interval in one embodiment;
[0054] Figure 8 This is a flowchart illustrating the process of an insertion point in one embodiment;
[0055] Figure 9 This is a schematic diagram of the perpendicular foot in one embodiment;
[0056] Figure 10 This is a schematic diagram illustrating a projection failure in one embodiment;
[0057] Figure 11 This is a schematic diagram of the process of projecting a location point onto a polyline in one embodiment;
[0058] Figure 12 This is a schematic diagram illustrating an incorrect capping relationship in one embodiment;
[0059] Figure 13 This is a schematic diagram of a steep road descent in one embodiment;
[0060] Figure 14 This is a schematic diagram illustrating an uneven road junction in one embodiment;
[0061] Figure 15 This is a schematic diagram illustrating the elevation difference between the uphill and downhill roads in one embodiment;
[0062] Figure 16 This is a schematic diagram of the road network in one embodiment;
[0063] Figure 17 This is a schematic diagram of the overall process for generating virtual elevation in one embodiment;
[0064] Figure 18 This is a schematic diagram illustrating the process of generating elevation consistency constraints in one embodiment;
[0065] Figure 19 This is a flowchart illustrating a virtual elevation generation method in a specific embodiment;
[0066] Figure 20 This is a structural block diagram of a virtual elevation generation device in one embodiment;
[0067] Figure 21 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0069] The virtual elevation generation method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on the cloud or other servers. Both terminal 102 and server 104 can be used independently to execute the virtual elevation generation method provided in this embodiment. Terminal 102 and server 104 can also be used collaboratively to execute the virtual elevation generation method provided in this embodiment. Taking the example of terminal 102 and server 104 collaboratively executing the virtual elevation generation method provided in this embodiment, terminal 102 may run an electronic map application, and server 104 may be the backend server of the electronic map application. Server 104 can acquire the road network and identify the uphill and downhill roads in the road network, and determine the virtual elevation of the uphill and downhill roads by generating elevation consistency constraints corresponding to the uphill and downhill roads. Server 104 generates map data based on the determined virtual elevation and sends the map data to terminal 102, enabling the map application on terminal 102 to render and display an electronic map using the received map data. Terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0070] This application relates to intelligent transportation systems. For example, virtual elevation can be generated using the virtual elevation generation method described in this application, and the generated virtual elevation can be used to render electronic maps, thereby achieving more accurate navigation based on the rendered electronic maps. Intelligent Traffic Systems (ITS), also known as Intelligent Transportation Systems, effectively integrate advanced technologies (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) into transportation, service control, and vehicle manufacturing. This strengthens the connection between vehicles, roads, and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, improves the environment, and saves energy.
[0071] In one embodiment, such as Figure 2 As shown, a virtual elevation generation method is provided. The method is illustrated using a computer device as an example. The computer device can provide... Figure 1 The terminal or server in the system.
[0072] The virtual elevation generation method includes the following steps:
[0073] Step 202: Based on the road matching segments between uphill and downhill roads in the road network, determine the target road and the road opposite to the target road from the uphill and downhill roads.
[0074] In this context, "upbound road" and "downbound road" in the road network refer to two one-way roads formed by splitting a two-way road. For example, refer to... Figure 3 , Figure 3 A schematic diagram of an uphill road and a downhill road is shown in one embodiment. A road matching segment refers to a road segment that matches the uphill road and the downhill road. A road segment refers to a division of roads on a plan view; each road segment is called a road segment. The road matching segment between the uphill road and the downhill road includes: a first matching segment in the uphill road that matches the downhill road, and a second matching segment in the downhill road that matches the uphill road. For example, refer to... Figure 3 In the uphill section, segment 301 is the first matching segment that corresponds to the downhill section; in the downhill section, segment 302 is the second matching segment that corresponds to the uphill section. Segment 301 is centered on the broken line EFGJ. Segment 302 is centered on the broken line ABCK.
[0075] Specifically, when a pair of up-road and down-road roads in the road network are obtained, the computer equipment can determine the road matching segments between the up-road and down-road roads. That is, it can determine the first matching segment in the up-road that matches the down-road and the second matching segment in the down-road that matches the up-road. Further, based on the determined first and second matching segments, the computer equipment selects one road from the up-road and down-road as the target road and the other as the opposite road.
[0076] In one embodiment, when the road network is acquired, the computer device can identify the roads in the road network using a pre-trained machine learning model to obtain the uphill and downhill roads. The machine learning model can learn from samples to extract road features and identify the uphill and downhill roads in the road network based on the extracted features. The machine learning model can employ neural network models, dual-path network models (DPN), support vector machines, or logistic regression models, etc.
[0077] In one embodiment, the computer device may randomly select one of the up-road and down-road roads as the target road and the other as the opposite road.
[0078] In one embodiment, the uphill and downhill roads in the road network, as well as the road matching segments between the uphill and downhill roads, can be marked manually.
[0079] In one embodiment, when a pair of up-road and down-road roads are obtained, the computer device can translate the entire up-road road into the down-road road to obtain the overlapping area between the up-road and down-road roads. Based on this overlapping area, a first matching segment in the up-road road and a second matching segment in the down-road road are determined. For example, the segment in the translated up-road road that overlaps with the down-road road is taken as the first matching segment, and the segment in the down-road road that overlaps with the translated up-road road is taken as the second matching segment. The first and second matching segments are combined to obtain the matching road segment.
[0080] In one embodiment, the computer device determines a first area of a first matching road segment and a second area of a second matching road segment, and based on the first and second area areas, determines a target road in the up-traffic and down-traffic routes, and designates another road as the opposite road. For example, the computer device designates the road with the smaller area as the target road and the other as the opposite road. Exemplarily, if the first area is smaller than the second area, the computer device designates the up-traffic road as the target road and the down-traffic road as the opposite road.
[0081] In one embodiment, based on road matching segments between uphill and downhill roads in the road network, determining a target road and its opposite road from the uphill and downhill roads includes: determining a first segment length of a first matching segment; determining a second segment length of a second matching segment; and selecting one road from the uphill and downhill roads as the target road and the other as the opposite road based on the first segment length and the second segment length.
[0082] Specifically, when a first matching road segment is obtained in the uphill road, the computer device can determine a first matching route in the first matching road segment, for example, by using the road edge line of the first matching road segment as the first matching route, or by using the center line of the first matching road segment as the first matching route. Further, the computer device can determine a second matching road segment in the second matching road segment, for example, by using the road edge line of the second matching road segment as the second matching route, or by using the center line of the second matching road segment as the second matching route.
[0083] The computer device determines the route length of the first matched route and uses this route length as the first segment length of the first matched road segment in the upbound road. The computer device then determines the route length of the second matched road segment and uses this route length as the second segment length of the second matched road segment in the upbound road. Once the first and second segment lengths are obtained, the computer device can designate the road segment with the shorter segment as the target road segment and the other as the opposite road segment.
[0084] For example, refer to Figure 3 When the broken line EFGJ is the centerline of the first matching road segment, it can be used as the first matching route. In this case, the computer device can obtain the coordinates of points E, F, G, and J within the broken line EFGJ, and determine the length of the broken line based on these coordinates. This determined length is then used as the length of the first road segment. Similarly, when the broken line ABCK is the centerline of the second matching road segment, it can be used as the second matching route. The computer device determines the length of the broken line ABCK based on the coordinates of points A, B, C, and K within the broken line ABCK, and uses this determined length as the length of the second road segment. The coordinates can be obtained based on latitude and longitude coordinates provided by navigation data. If the length of the first road segment is less than the length of the second road segment, the computer device will use the upstream road as the target road; if the length of the first road segment is greater than the length of the second road segment, the computer device will use the downstream road as the target road. Figure 3 A schematic diagram of road matching segments in one embodiment is shown.
[0085] In one embodiment, the computer device may further determine the road edge lines constituting the first matching road segment and superimpose the lengths of the road edge lines constituting the first matching road segment to obtain the length of the first road segment. Correspondingly, the computer device determines the road edge lines constituting the second matching road segment and superimposes the lengths of the road edge lines constituting the second matching road segment to obtain the length of the second road segment.
[0086] Step 204: Perform interpolation on the first location point sequence of the corresponding road segment in the target road to obtain the target location point sequence of the target road.
[0087] The first location point sequence refers to a sequence that includes multiple location points in the target road, and the location points in the target road included in the first location point sequence fall into the road matching segment.
[0088] Specifically, when determining road matching segments, the computer equipment can identify road segments within the target road from the road matching segments, and use these segments as the target matching segments. The computer equipment then determines the target route within the target matching segments and identifies corner points and endpoints within the target route, using these identified corner points and endpoints as position points in the first position point sequence. The target route can be the centerline of the target road segment. The target route is often not a straight line; refer to... Figure 4 When the target road is not a straight road, the target route 403 in the target matching segment 402 can also be a broken line. A corner point refers to an extreme point, which can be a point in the broken line where the slope changes abruptly. For example, a corner point could be... Figure 4 The midpoints are location points G and F. Endpoints refer to the start and end points of the target route. For example, endpoints could be... Figure 4 Given positions J and E, and combining positions J, G, F, and E, we obtain the first sequence of positions. Figure 4 A schematic diagram of a first position point sequence in one embodiment is shown.
[0089] Furthermore, when the first location point sequence is obtained, the computer device can perform interpolation processing on the first location point sequence to generate multiple interpolation points, and insert the generated multiple interpolation points into the first location point sequence to obtain the target location point sequence of the target road.
[0090] In one embodiment, if the up-traffic road is the target road, then the first matching segment is the segment of the road matching segments located on the target road, that is, the first matching segment is the target matching segment. If the down-traffic road is the target road, then the second matching segment is the segment of the road matching segments located on the target road, that is, the second matching segment is the target matching segment.
[0091] In one embodiment, since the first location point sequence includes the corner points and endpoints of the target route in the target matching road segment, the first location point sequence can be interpolated by interpolating the target route. The computer device can perform interpolation in the target route according to a preset interpolation interval to obtain at least one interpolation point, and combine the first location point sequence and the generated interpolation point to obtain the target location point sequence. It is easy to understand that since a line is composed of infinitely many points, inserting interpolation points in a polyline can also be considered as finding interpolation points in the polyline. For example, refer to... Figure 5 When the target route in the target road is a polyline JGFE, the computer device can insert interpolation points L, M, and N into the polyline JGFE. That is, it finds points L, M, and N in the polyline JGFE. The computer device uses the sequence including position points J, G, L, M, F, N, and E as the target position point sequence. This is equivalent to adding interpolation points L, M, and N to the first position point sequence. Figure 5 A schematic diagram of a sequence of target location points is shown in one embodiment.
[0092] Step 206: Determine multiple target location points from the target location point sequence, and determine the corresponding opposite location point on the opposite road for each target location point.
[0093] Specifically, when determining the sequence of target location points, the computer device can filter out interpolation points and endpoints of the target route from the sequence, and use the filtered interpolation points and endpoints of the target route as target location points. For each location point in the target location point sequence, the computer device determines the corresponding location point in the opposite road for each target location point, and uses the location point in the opposite road corresponding to the target location point as the opposite location point. The distance between the target location point and its corresponding opposite location point satisfies a preset first shortest distance condition. The first shortest distance condition means that the distance between the target location point and its corresponding target location point is less than the distance from the target location point to any location point in the opposite road.
[0094] For example, refer to Figure 5When the target route is a broken line EFGJ, and the target location point sequence includes location point J, location point G, interpolation point L, interpolation point M, location point F, interpolation point N, and location point E, since location points J and E are endpoints in the target route, both location points J and E are considered target location points. Furthermore, since interpolation points L, M, and N are interpolation points obtained after interpolating the first location point sequence, they are also considered target location points. Based on the first shortest distance condition, the computer equipment determines the opposite location point on the opposite road as A (corresponding to location point J), K (corresponding to location point E), P (corresponding to interpolation point L), Q (corresponding to interpolation point M), and R (corresponding to interpolation point N).
[0095] Step 208: Generate elevation consistency constraints for each pair of target location points and object location points; elevation consistency constraints are used to indicate the conditions that must be met for the difference between the virtual elevation of the target location point and the virtual elevation of the corresponding opposing location point.
[0096] Specifically, when multiple pairs of target location points and object location points are obtained, the computer device can generate elevation consistency conditions corresponding to each pair of target location points and opposing location points. Here, a pair of target location points and opposing location points refers to a target location point and its corresponding opposing location point. For example, referencing... Figure 5 A pair of target and opposing points can be point J and point A. The elevation consistency condition indicates the conditions that must be met to differentiate the virtual elevation of a target point from the virtual elevation of its corresponding opposing point. For example, the elevation consistency condition can be used to indicate the conditions that must be met to differentiate the virtual elevation of target point J from the virtual elevation of opposing point A. Virtual elevation refers to the height of points on a road displayed on an electronic map relative to the ground.
[0097] In one embodiment, combined with Figure 5 Given that target point J corresponds to opposing point A, target point L corresponds to opposing point P, target point M corresponds to opposing point Q, target point N corresponds to opposing point R, and target point E corresponds to opposing point K, the computer equipment can obtain the elevation consistency constraint formula and generate the following five elevation consistency constraint conditions based on the obtained elevation consistency constraint formula.
[0098] The elevation consistency constraint formula obtained by the computer equipment is (P(φ)-P(γ)). 2 ≤H 2Where P(φ) represents the virtual elevation of the target location point, P(γ) represents the virtual elevation of the opposing location point, and H is a pre-set elevation difference threshold. The smaller the absolute value of H, the smaller the elevation difference and the better the elevation consistency.
[0099] The five elevation consistency constraints generated based on the obtained formula are as follows:
[0100] (P j1 -P a2 ) 2 ≤H 2
[0101] (P l1 -P p2 ) 2 ≤H 2
[0102] (P m1 -P q2 ) 2 ≤H 2
[0103] (P n1 -P r2 ) 2 ≤H 2
[0104] (P e1 -P k2 ) 2 ≤H 2
[0105] Among them, P j1 P a2 P l1 P p2 P m1 P q2 P n1 P r2 P e1 P k2 The virtual elevations are J, A, L, P, M, Q, N, R, E, and K, respectively.
[0106] Step 210: Based on the consistency constraints of each elevation, determine the first virtual elevation of each target location point and the second virtual elevation of each opposing location point.
[0107] Specifically, the computer device acquires the first initial virtual elevation of each target location point and the second initial virtual elevation of each opposing location point. This application does not limit the source of the first and second initial virtual elevations; they can be randomly generated or collected by map data collectors. This application establishes a unified mathematical model to consider elevation consistency constraints, transforming the problem of generating virtual elevations into a mathematical optimization problem to obtain the optimal virtual elevations. More specifically, the computer device adjusts the acquired first and second initial virtual elevations using a data model to obtain the first virtual elevation of the target location points and the second virtual elevation of the opposing location points. Furthermore, in the mathematical model, the virtual heights of the target location points and their corresponding opposing location points on the road satisfy the aforementioned elevation consistency constraints.
[0108] In one embodiment, determining the first virtual elevation of each target location point and the second virtual elevation of each opposing location point based on the elevation consistency constraints includes: generating distribution characteristic conditions; the distribution characteristic conditions characterizing the conditions that need to be met to represent the degree of dispersion of the virtual elevations of each target location point and each opposing location point; and adjusting the first initial virtual elevation of each target location point and the second initial virtual elevation of each opposing location point based on the distribution characteristic conditions and the elevation consistency constraints to obtain the first virtual elevation of each target location point and the second virtual elevation of each opposing location point.
[0109] Specifically, the virtual elevations of target and opposing points along the road not only need to satisfy the aforementioned elevation consistency constraints, but also should ideally be as concentrated as possible. This is because when the virtual elevations corresponding to the target and opposing points along the road are as concentrated as possible, computer equipment can render high-quality visual effects. Therefore, in addition to satisfying the elevation consistency constraints, it is also necessary to satisfy the distribution characteristic conditions that characterize the degree of dispersion of virtual elevations.
[0110] Once the target and opposing locations are determined, the computer device can acquire a distribution feature information generation function and generate distribution feature conditions based on this function. The distribution feature information generation function is used to obtain the dispersion of the virtual elevations corresponding to the target and opposing locations on the road, while the distribution feature conditions characterize the conditions that must be met to achieve this dispersion. Since the computer device can render high-quality visual effects when the virtual elevations corresponding to the target and opposing locations on the road are as concentrated as possible, the specific distribution feature conditions can be designed to minimize the dispersion.
[0111] Furthermore, the computer equipment uses open-source convex optimization libraries such as Ipopt to adjust the first initial virtual elevation of each target location point and the second initial virtual elevation of each opposing location point, so that the final first virtual elevation of each target location point and the second virtual elevation of each opposing location point not only satisfy the distribution characteristic condition but also satisfy the consistency constraint condition of each elevation.
[0112] In one embodiment, the distribution characteristic condition can be to minimize the sum of the squares of the virtual elevations at each location point. This is because the sum of the squares of the virtual elevations approximates the variance of the virtual elevations, meaning that the sum of the squares of the virtual elevations characterizes the degree of dispersion of the virtual elevations.
[0113] In one embodiment, the distribution feature information generation function can be ξ = ΣP 2 (μ λ λ = 1, 2, ... In the distribution feature information generation function, ξ represents the dispersion value of the virtual elevation of each target location point and each opposing location point, also known as the distribution feature information, μ. λ Let P represent the λ-th position point, where λ ranges from [1, θ], and θ is the total number of target position points and opposing position points. 2 (μ λ ξ represents the virtual elevation of the λ-th location point, where the λ-th location point can be either the target location point or the opposing location point. The distribution characteristic condition for the function generated based on this distribution characteristic information can be ξ = ΣP. 2 (μ λ () Reach the minimum value.
[0114] In the above embodiments, by generating distribution feature conditions to characterize the degree of dispersion, the first virtual elevation of each target location point and the second virtual elevation of each opposing location point can be obtained based on the generation distribution feature conditions and the elevation consistency constraint conditions. This not only makes the elevation difference between the uphill and downhill roads rendered based on the first and second virtual elevations small, but also improves the rendering quality of the uphill and downhill roads.
[0115] In one embodiment, when the first virtual elevation of each target location point and the second virtual elevation of each second location point are obtained, the computer device can perform interpolation processing on the target road based on the first virtual elevation of each target location point to obtain the third virtual elevation of the remaining location points in the target road. Correspondingly, the computer device can also perform interpolation processing on the opposing road based on the second virtual elevation of each second location point to obtain the fourth virtual elevation of the remaining location points in the opposing road. The computer device obtains the virtual elevation of the target road using the first and third virtual elevations, and renders the target road according to its virtual elevation to obtain the target road displayed on the electronic map. The computer device obtains the virtual elevation of the opposing road based on the second and fourth virtual elevations, and renders the opposing road according to its virtual elevation to obtain the opposing road displayed on the electronic map.
[0116] In the aforementioned virtual elevation generation method, by determining the road matching segment between the uphill and downhill roads, the target roads and opposing roads in the uphill and downhill roads can be determined based on the determined road matching segment. By determining the target road segment, a first position point sequence corresponding to the road matching segment can be obtained. By obtaining the first position point sequence, interpolation processing can be performed on the first position point sequence to obtain a target position point sequence containing richer position points. By obtaining the target position point sequence, multiple target position points can be selected from the target position point sequence, and the opposing position point corresponding to each target position point in the opposing road can be determined. In this way, elevation consistency constraints corresponding to each pair of target position points and target position points can be generated. Through the generated multiple elevation consistency constraints, the first virtual elevation of each target position point and the second virtual elevation of each opposing position point can be obtained. Since the elevation consistency constraint condition requires the difference between the virtual elevation of the target location point and the virtual elevation of the corresponding opposite location point to meet the condition, the difference between the first virtual elevation and the corresponding second virtual elevation will satisfy the virtual elevation difference constrained by the elevation consistency constraint condition. As a result, the virtual elevation difference between the uphill and downhill roads rendered based on the first and second virtual elevations will be less than a certain elevation threshold, which is consistent with the reality that the elevations of a pair of uphill and downhill roads are not much different.
[0117] Furthermore, since this application can transform the problem of ensuring the consistency of road height between the up and down directions into a mathematical optimization problem, less raw data is required, and there is no need to use precision equipment to collect the absolute elevation of the road. This not only significantly reduces the cost of information collection, but also enables the efficient and high-quality generation of virtual road elevation data for lane-level navigation.
[0118] In one embodiment, before determining the target road and its opposite road from the uphill and downhill roads based on the road matching segment between uphill and downhill roads in the road network, the method further includes the step of determining the road matching segment. The step of determining the road matching segment includes: acquiring the road network and identifying uphill and downhill roads in the road network; determining a first road route and its endpoints in the uphill road; determining a second road route and its endpoints in the downhill road; and determining the road matching segment between the uphill and downhill roads based on the endpoints of the first road route and the second road route.
[0119] Specifically, the computer device acquires the road network and identifies the up-traffic roads and corresponding down-traffic roads within the acquired road network. Further, the computer device determines a first road route within the up-traffic roads and identifies the endpoints of the first road route. The first road route can be any line within the up-traffic roads, such as the centerline. The endpoints of the first road route can be either its two ends, such as its start and end points. Correspondingly, the computer device can also determine a second road route within the down-traffic roads and identify its endpoints. The second road route can also be any line within the down-traffic roads, such as the centerline, and its endpoints can be its start and end points. Further, based on the endpoints of the first and second road routes, the computer device determines the road matching segments between the up-traffic and down-traffic roads. For example, computer equipment can project the endpoints of the first road route onto the downhill road and the endpoints of the second road route onto the uphill road, and determine the road matching segments between the uphill and downhill roads based on the projection results.
[0120] In one embodiment, reference Figure 3 When the first road route is the centerline of the uphill road, it can be a broken line EFGH, where point E and point H are the endpoints of the first road route. When the second road route is the centerline of the downhill road, it can be a broken line DCBA, where point D and point A are the endpoints of the second road route. The computer equipment can project point E and point H onto the downhill road and point D and point A onto the uphill road, and obtain the road matching segment between the uphill and downhill roads based on the projection results.
[0121] In one embodiment, the road matching segment between the up-road and down-road includes a first matching segment and a second matching segment; determining the road matching segment between the up-road and down-road based on the endpoints of the first road route and the endpoints of the second road route includes: projecting the endpoints of the first road route onto the down-road to obtain a first projection point; projecting the endpoints of the second road route onto the up-road to obtain a second projection point; determining a first matching segment in the up-road that matches the down-road based on at least one of the endpoints of the first road route and the second projection point; and determining a second matching segment in the down-road that matches the up-road based on at least one of the endpoints of the second road route and the first projection point.
[0122] Specifically, the computer device can project the endpoints of the first road route onto the downstream road to obtain the first projection point. For example, referencing Figure 3 When the endpoint E of the first road route is projected onto the downhill road, a first projection point K is obtained. It is easily understood that since the endpoints of the first road route may include a start point and an end point, the computer device can project the start point and end point of the first road route onto the downhill road respectively, obtaining two first projection points. Correspondingly, the computer device can also project the endpoints of the second road route onto the uphill road, obtaining a second projection point. For example, refer to... Figure 3 When the endpoint A of the second road route is projected onto the uphill road, a second projection point J can be obtained. Since the endpoints of the second road route may include a start point and an end point, the computer device can project the start point and end point of the second road route onto the uphill road respectively, obtaining two second projection points.
[0123] Furthermore, the computer device determines a first matching segment in the uphill road that matches the downhill road, based on at least one of the endpoints of the first road route and a second projection point. For example, referring to... Figure 3 The computer equipment can determine, based on the endpoints of the first road route and the second projection point, the first matching segment in the uphill road that matches the downhill road as a segment centered on the broken line EFGJ, where position point J is the second projection point. The computer equipment can also determine, based on at least one of the endpoints of the second road route and the first projection point, the second matching segment in the downhill road that matches the uphill road. For example, referring to… Figure 3 The computer equipment can determine the second matching segment in the downhill road that matches the uphill road as the segment with the broken line ABCK as the center line, based on the endpoints of the second road route and the first projection point, where the location point K is the first projection point.
[0124] In this embodiment, by obtaining the projection points, the first matching road segment and the second matching road segment can be accurately determined based on the projection points, thereby improving the accuracy of determining the road matching road segment.
[0125] In one embodiment, the endpoints of the first road route include a first starting point and a first ending point. Determining a first matching road segment in the uphill road that matches the downhill road based on the endpoints of the first road route and a second projection point includes: determining a first matching road segment in the uphill road that matches the downhill road based on at least one of the endpoints of the first road route and a second projection point, including: if both the first starting point and the first ending point are successfully projected, extracting a road segment from the uphill road with the first starting point and the first ending point as the position points on both sides of the road, to obtain the first matching road segment; if either the first starting point or the first ending point is successfully projected, selecting a first target endpoint that is successfully projected from the first starting point and the first ending point, and extracting a road segment from the uphill road with the first target endpoint and the second projection point as the position points on both sides of the road, to obtain the first matching road segment; if neither the first starting point nor the first ending point is successfully projected, and both the second starting point and the second ending point are successfully projected, extracting a road segment from the uphill road with the second projection point of the second starting point and the second projection point of the second ending point as the position points on both sides of the road, to obtain the first matching road segment.
[0126] Specifically, for ease of description, the starting point of the first road route will be referred to as the first starting point, the ending point of the first road route as the first ending point, the starting point of the second road route as the second starting point, and the ending point of the second road route as the second ending point. The computer equipment selects points from the first starting point and the first ending point that are successfully projected onto the downhill road, and designates these selected points as the first target endpoints. Similarly, it selects points from the second starting point and the second ending point that are successfully projected onto the uphill road, and designates these selected points as the second target endpoints. Successful projection means that the foot of the perpendicular line drawn from the point to be projected onto the road falls into the road. For example, refer to... Figure 6 In (A), when a perpendicular line is drawn from point E down to the second road route of the downhill road, with the foot of the perpendicular at K and falling into the second road route, point E can be considered the first target endpoint of a successful projection. When a perpendicular line is drawn from point H down to the second road route of the downhill road, but the foot of the perpendicular does not fall into the second road route, point H is not the first target endpoint.
[0127] When the first target endpoint is determined, the computer device can determine the number of first target endpoints. When the number of first target endpoints is 1, the computer device can consider the projection of the first starting point or the first ending point to be successful. At this time, the computer device extracts a road segment from the upstream road with the second projection points corresponding to the first and second target endpoints as the position points on both sides of the edge line, thus obtaining the first matching road segment. For example, refer to... Figure 6In (A), the computer device extracts a road segment from the up-road with the second projection point J corresponding to the first target endpoint E and the second target endpoint A as the position points on both sides of the edge line, and obtains the first matching road segment, that is, the road area with EFGJ as the center line, and takes this road area as the first matching road segment.
[0128] When the number of first target endpoints is 2, it can be considered that both the first starting point and the first ending point have been successfully projected. At this time, the computer device extracts a road segment from the uplink road with the first starting point and the first ending point as the position points on both sides of the edge line, thus obtaining the first matching road segment. That is, the computer device directly uses the uplink road as the first matching road segment. For example, refer to... Figure 6 In (B), the computer equipment will use the road area centered on EFGH as the first matching segment.
[0129] When the number of first target endpoints is 0, it can be considered that neither the first starting point nor the first ending point has been successfully projected. At this time, the computer device determines the number of second target endpoints, and when the number of second target endpoints is determined to be 2, it is considered that both the second starting point and the second ending point have been successfully projected. Then, the computer device extracts a road segment from the uplink road with the second projection points of the second starting point and the second projection points of the second ending point as the position points on both sides of the edge line, obtaining the first matching road segment. That is, the computer device extracts a road segment from the uplink road with the two second projection points as the position points on both sides of the edge line, obtaining the first matching road segment. For example, refer to... Figure 6 In (C), the computer equipment will use the road area centered on KFGJ as the first matching road segment. Figure 6 A schematic diagram of the first matching region in one embodiment is shown.
[0130] In one embodiment, determining a second matching road segment in the downlink road that matches the uplink road based on at least one endpoint of the second road route and a first projection point includes: if both the second starting point and the second ending point are successfully projected, extracting a road segment from the downlink road with the second starting point and the second ending point as the position points on both sides of the road to obtain the second matching road segment; if either the second starting point or the second ending point is successfully projected, selecting a successfully projected second target endpoint from the second starting point and the second ending point, and extracting a road segment from the downlink road with the second target endpoint and the first projection point as the position points on both sides of the road to obtain the second matching road segment; if neither the second starting point nor the second ending point is successfully projected, but both the first starting point and the first ending point are successfully projected, extracting a road segment from the downlink road with the first projection point of the first starting point and the first projection point of the first ending point as the position points on both sides of the road to obtain the second matching road segment. Similar to obtaining the first matching road segment, a computer device can also use the above method to obtain the second matching road segment in the downlink road.
[0131] In the above embodiments, by determining the number of endpoints that are successfully projected, a road interception method can be selected in a targeted manner based on the determined number, thereby accurately intercepting the matching road segment based on the determined road interception method, thus reducing the probability of interception failure due to the selection of an unsuitable road interception method.
[0132] In one embodiment, before interpolating the first position point sequence corresponding to the matching road segment in the target road to obtain the target position point sequence of the target road, the method further includes: determining the target route corresponding to the matching road segment in the target road, and determining the endpoints and corners in the target route; sorting the endpoints and corners in the target route according to their positional order in the target route to obtain the first position point sequence; interpolating the first position point sequence corresponding to the matching road segment in the target road to obtain the target position point sequence of the target road, including: interpolating the target route according to a preset interpolation interval to obtain multiple interpolation points, and combining the multiple interpolation points and the first position point sequence to obtain the target position point sequence.
[0133] Specifically, since the road matching segment includes the target matching segment within the target road, the target route within the target road corresponding to the road matching segment refers to the target route within the target matching segment of the target road. The target route can be any route within the target matching segment, such as the centerline of the target matching segment. Furthermore, since the target route can be viewed as a broken line, the computer device can identify the endpoints and corners of the target route and sort them according to their order within the target route to obtain the first position point sequence. For example, refer to... Figure 5 When the target route in the target road is a broken line JGFE, the first position point sequence is [position point J, position point G, position point F, position point E].
[0134] Furthermore, the computer device acquires a preset interpolation interval and performs interpolation processing on the target route according to the interpolation interval to obtain multiple interpolation points. These interpolation points are then added to the first position point sequence to obtain the target position point sequence. For example, when the computer device inserts an interpolation point L in line segment GF of the target route, it can add the interpolation point L between position points G and F in the first position point sequence.
[0135] In this embodiment, by determining the target matching road segment corresponding to the road matching segment in the target road, the target route can be obtained based on the determined target matching road segment. Then, by identifying the corner points and endpoints of the target route, a first location point sequence can be obtained. By determining the first location point sequence, corresponding interpolation points can be added as a reference to obtain the target location point sequence.
[0136] In one embodiment, a reference position point and subsequent position points in a first position point sequence are determined; the length of the polyline formed by the target subsequences in the first position point sequence, starting from the reference position point and ending at the subsequent position points, is greater than or equal to a preset interpolation interval; at least one interpolation point is inserted into the polyline formed by the target subsequences according to the interpolation interval; interpolation points are added between the reference position point and the subsequent position point in the first position point sequence according to the positional order of each interpolation point in the polyline formed by the target subsequences to update the first position point sequence; the target interpolation point that meets the long distance condition is taken as the new reference position point, and the next round of interpolation process is entered, returning to the step of determining the subsequent position point after the reference position point to continue execution until the subsequent position point is the last position point in the first position point sequence, and the distance between the reference position point and the subsequent position point is less than or equal to the interpolation interval, and the finally updated first position sequence points are taken as the target position point sequence.
[0137] Specifically, the computer device determines a reference position point and subsequent position points in the first position point sequence. The computer device can perform multiple rounds of interpolation. In the first round of interpolation, the reference position point can be the first position point in the first position point sequence. The length of the broken line formed by the target subsequence in the first position point sequence, starting from the reference position point and ending at subsequent position points, is greater than or equal to a preset interpolation interval. For example, refer to... Figure 5 In the first round of interpolation, when the interpolation interval is 5 meters, the reference position is position point J, the length of the line segment formed by position point J and position point G is 3 meters, and the length of the line segment formed by position point G and position point F is 7 meters, position point F can be determined as the subsequent position point, and the target subsequence is [position point J, position point G, position point F]. Since the length of the broken line JGF formed by the target subsequence is 10 meters, which is greater than the interpolation interval of 5 meters.
[0138] Furthermore, the computer equipment inserts at least one interpolation point into the polyline formed by the target subsequence according to a preset interpolation interval, obtaining the interpolation coordinates corresponding to each interpolation point. For example, referencing... Figure 5In the first round of interpolation, the computer equipment inserts interpolation points L and M into the polyline JGF formed by the target subsequence, thereby obtaining the interpolation coordinates of interpolation points L and M. The interpolation coordinates refer to the coordinates of the interpolation points, which can be relative coordinates (e.g., coordinates relative to a reference point) or absolute coordinates (e.g., coordinates calculated based on the coordinates of the reference point, the interpolation interval, and the coordinates of subsequent points).
[0139] Furthermore, the computer device adds interpolation points to the first position point sequence according to their interpolation coordinates. For example, the computer device determines the order of the interpolation points in the target route based on their interpolation coordinates and adds them to the first position point sequence according to the determined order. The computer device then selects target interpolation points that meet the long-distance condition from at least one generated interpolation point and uses the selected target interpolation points as new reference position points. The interpolation point that meets the long-distance condition refers to the interpolation point farthest from the reference position point in one round of interpolation. For example, referencing... Figure 5 When the interpolation points obtained in the first round of interpolation are interpolation point L and interpolation point M, since the distance between interpolation point M and the reference position point J is greater than the distance between interpolation point L and the reference position point, interpolation point M can be used as the new reference position point.
[0140] Further, the computer device enters the next round of interpolation process, determines the subsequent position point corresponding to the new reference position point, and inserts interpolation points in the broken line formed by the target subsequence starting from the reference position point and ending at the subsequent position point, until the subsequent position point is the last position point in the first position point sequence, and the distance between the reference position point and the subsequent position point is less than or equal to the interpolation interval, thereby obtaining the target position point sequence.
[0141] In this embodiment, by performing multiple rounds of interpolation processing, each line segment in the target route can be traversed based on the multiple rounds of interpolation processing. Interpolation points are inserted at positions in each line segment that meet the interpolation interval. In this way, the probability of missing interpolation can be reduced and the comprehensiveness of interpolation can be improved.
[0142] In one embodiment, the step of determining the subsequent position point includes: traversing the position points in the first position point sequence that are located after the reference position point according to the order in which each position point is arranged in the first position point sequence; extracting candidate subsequences from the first position point sequence that start from the reference position point and end at the currently traversed position point, and determining the length of the broken line formed by the candidate subsequences; when the length of the broken line formed by the candidate subsequences is less than the interpolation interval, continuing to traverse until the length of the broken line formed by the candidate subsequences extracted from the first position point sequence based on the currently traversed position point is greater than or equal to the interpolation interval, and taking the currently traversed position point in the first position point sequence as the subsequent position point.
[0143] Specifically, when a reference position point is determined in the first position point sequence, and it is necessary to determine the subsequent position point corresponding to the reference position point, the computer device traverses the position points in the first position point sequence that are located after the reference position point, according to the order in which the position points are arranged in the first position point sequence. For the currently traversed position point in the first position point sequence, the computer device extracts a candidate subsequence from the first position point sequence, with the reference position point as the starting point and the currently traversed position point as the ending point, and determines the length of the broken line formed by each position point in the candidate subsequence. Furthermore, the computer device determines whether the length of the polyline formed by the candidate subsequences is less than the interpolation interval. If the length of the polyline corresponding to the candidate subsequence is less than the interpolation interval, it can be considered that an interpolation point cannot be inserted into the polyline formed by the candidate subsequences. At this time, the computer device continues to traverse, obtains the next traversed position point in the first position point sequence, and takes the obtained next traversed position point as the current traversed position point. It then returns to the step of extracting the candidate subsequence from the first position point sequence with the reference position point as the starting point and the current traversed position point as the ending point, and continues to execute until the length of the polyline formed by the candidate subsequences extracted from the first position point sequence based on the current traversed position point is greater than or equal to the interpolation interval. At this time, the computer device takes the current traversed position point as the subsequent position point.
[0144] For example, refer to Figure 5 In the first round of interpolation, when the computer determines position point J as the reference position point, it can start traversing from position point G and set position point G as the currently traversed position point. The computer determines whether the line segment formed by position points J and G is greater than or equal to the interpolation interval. If it is less than the interpolation interval, the computer continues traversing, obtains position point F, and sets position point F as the currently traversed position point. The computer determines whether the length of the polyline JGF is greater than or equal to the interpolation interval. If the length of the polyline JGF is greater than or equal to the interpolation interval, the computer determines position point F as the subsequent position point corresponding to position point J.
[0145] In one embodiment, the computer device can obtain the coordinates of each location point in the first location point sequence, and determine the length of the polyline corresponding to the candidate subsequence based on the determined location point coordinates. The location point coordinates can be latitude and longitude coordinates determined by a satellite positioning system.
[0146] In one embodiment, the length of the broken line formed by the target subsequence in the first position point sequence, starting from the reference position point and ending at the next position point, is greater than or equal to a preset interpolation interval, and the length of the broken line formed by the intermediate subsequence in the first position point sequence, starting from the reference position point and ending at the position point immediately preceding the next position point, is less than the interpolation interval.
[0147] In the above embodiments, by determining the subsequent position point corresponding to the reference position point based on the polyline length and the interpolation interval, the length of the polyline formed by the reference position point as the starting point and the subsequent position point as the ending point can be greater than or equal to the interpolation interval. In this way, interpolation points can be inserted into the polyline formed by the reference position point as the starting point and the subsequent position point as the ending point.
[0148] In one embodiment, inserting at least one interpolation point into a polyline formed based on the target subsequence according to the interpolation interval includes: when the number of position points included in the target subsequence is greater than a number threshold, determining the preceding position point in the first position point sequence that is adjacent to the subsequent position point and located before the subsequent position point; obtaining the length of the polyline formed by the intermediate subsequence in the first position point sequence that starts from the reference position point and ends at the preceding position point; determining the interpolation coordinates of the first interpolation point in the current round of interpolation process according to the length of the polyline formed by the intermediate subsequence and the interpolation interval, thus obtaining the first interpolation point; and sequentially inserting subsequent interpolation points into the line segment formed by the first interpolation point and the subsequent position point according to the interpolation interval, thus obtaining each subsequent interpolation point.
[0149] Specifically, when the number of position points included in the target subsequence is greater than a quantity threshold, and the subsequent position points in the first position point sequence are determined, the computer device can determine the preceding position point in the first position point sequence that is immediately adjacent to the subsequent position point. That is, the computer device determines the preceding position point in the first position point sequence that is adjacent to the subsequent position point and is located before the subsequent position point, and records the determined preceding position point as the preceding position point. The quantity threshold is specifically 2, meaning that the determined preceding position point and the reference position point are not the same position point. Further, when inserting the first interpolation point in a round of interpolation, the computer device obtains the length of the polyline formed by the intermediate subsequences in the first position point sequence, starting from the reference position point and ending at the preceding position point, and determines the difference between the length of the polyline formed by the intermediate subsequences and the interpolation interval, obtaining the difference length. In the line segment formed by the preceding and subsequent position points, the first interpolation point is inserted at the difference length from the preceding position point, obtaining the interpolation coordinates of the first interpolation point. For example, referencing... Figure 5 When the reference position is J, the preceding position is position G, the following position is position F, and the difference between the length of the broken line formed by the reference position J and the preceding position G and the interpolation interval is the difference length, the computer device interpolates the first interpolation point L at a distance of the difference length from position point G.
[0150] Furthermore, when inserting a non-first interpolation point during an interpolation round, the computer device inserts subsequent interpolation points sequentially within the line segment formed by the first interpolation point and subsequent position points, according to the interpolation interval, to obtain the interpolation coordinates corresponding to each subsequent interpolation point. For example, referencing... Figure 5 After the first interpolation point G is inserted, the computer device inserts an interpolation point M in the line segment formed by the first interpolation point G and the subsequent position point F according to the interpolation interval. In this way, one round of interpolation process is completed.
[0151] In the next round of interpolation, the computer device can use the last generated interpolation point M as the new reference position point and determine the subsequent position point corresponding to the interpolation point M. Then, it can continue to insert interpolation points in the broken line formed by the position points located between the interpolation point M and the subsequent position point in the sequence of the first position point.
[0152] In one embodiment, according to the interpolation interval, subsequent interpolation points are sequentially inserted into the line segment formed by the first interpolation point and the subsequent position points to obtain the interpolation coordinates corresponding to each subsequent interpolation point. This includes: taking the first interpolation point as the starting point, inserting an interpolation point at every interpolation interval in the line segment formed by the first interpolation point and the subsequent position points to obtain the interpolation coordinates corresponding to each subsequent interpolation point.
[0153] The computer calculates the length of the line segment formed by the first interpolation point and subsequent position points, and determines whether the length of the line segment is greater than or equal to the interpolation interval. If it is less than the interpolation interval, it means that a subsequent interpolation point cannot be inserted into the line segment formed by the first interpolation point and subsequent position points, and the next round of interpolation process begins. If the length of the line segment formed by the first interpolation point and subsequent position points is greater than or equal to the interpolation interval, the computer inserts a subsequent interpolation point at an interpolation interval from the first interpolation point, and uses the inserted subsequent interpolation point as the reference subsequent interpolation point, determining whether the length of the line segment formed by the reference subsequent interpolation point and subsequent position points is greater than or equal to the interpolation interval. If the value is greater than or equal to the interpolation interval, the computer device inserts another subsequent interpolation point at the interpolation interval of the reference subsequent interpolation point, and uses the newly inserted subsequent interpolation point as the new reference subsequent interpolation point. The process then returns to the step of determining whether the length of the line segment formed by the reference subsequent interpolation point and the subsequent position point is greater than or equal to the interpolation interval, and continues to execute until the line segment formed by the reference subsequent interpolation point and the subsequent position point is less than the interpolation interval.
[0154] In the above embodiments, by determining the length of the polyline, the coordinates of the interpolation point to be inserted can be determined based on the length of the polyline. Thus, the interpolation point can be obtained based on the determined coordinates of the interpolation point.
[0155] In one embodiment, when the number of position points included in the target subsequence equals a number threshold, the computer device inserts interpolation points sequentially into the line segment formed by the reference position point and the subsequent position point according to the interpolation interval, obtaining the interpolation coordinates corresponding to each interpolation point. Specifically, the number threshold can be 2, meaning that when the target subsequence only includes the reference position point and the subsequent position point, the computer device inserts interpolation points sequentially into the line segment formed by the reference position point and the subsequent position point according to the interpolation interval. That is, the computer device inserts one interpolation point at every interpolation interval in the line segment formed by the reference position point and the subsequent position point, obtaining the interpolation coordinates corresponding to each interpolation point.
[0156] In one embodiment, determining the interpolation coordinates of the first interpolation point in the current round of interpolation based on the length of the polyline formed by the intermediate subsequences and the interpolation interval includes: determining the difference between the length of the polyline formed by the intermediate subsequences and the interpolation interval, obtaining the difference length, and using the difference length as the distance between the first interpolation point in the current round of interpolation and the previous position point; obtaining the interpolation coordinates of the first interpolation point in the current round of interpolation based on the first position coordinates of the previous position point, the second position coordinates of the subsequent position point, and the distance between the first interpolation point in the current round of interpolation and the previous position point.
[0157] Specifically, the computer device determines the length of the polyline formed by the intermediate subsequences and subtracts the length of the polyline from the interpolation interval to obtain the difference length. Further, the computer device inserts the first interpolation point at the difference length from the preceding position point within the line segment formed by the preceding and following position points, obtaining the interpolation coordinates of the first interpolation point. For example, referencing... Figure 5 When the interpolation interval is 5 meters and the length of the line segment formed by the reference position point J and the previous position point G is 3 meters, the computer equipment can insert the first interpolation point L 2 meters away from the previous position point G.
[0158] In one embodiment, the interpolation coordinates of the first interpolation point in the current interpolation process are obtained based on the first position coordinates of the preceding position point, the second position coordinates of the following position point, and the distance between the first interpolation point in the current interpolation process and the preceding position point. This includes: determining the ratio between the length of the line segment formed by the preceding and following position points and the difference length, thus obtaining a length ratio; acquiring the first position coordinates of the preceding position point and the second position coordinates of the following position point; determining the coordinate difference between the first and second position coordinates; fusing the length ratio and the coordinate difference to obtain fused coordinates; and superimposing the first position coordinates and the fused coordinates to obtain the interpolation coordinates of the first interpolation point in the current interpolation process.
[0159] Specifically, when determining the preceding and succeeding position points, and the distance between the first interpolation point to be inserted and the preceding position point, the computer device can determine the interpolation coordinates of the first interpolation point in the following manner: When interpolation coordinates need to be determined, the computer device obtains the first position coordinates of the preceding position point and the second position coordinates of the succeeding position point, and subtracts the first coordinate from the second coordinate to obtain the coordinate difference. Based on the first and second position coordinates, the computer device determines the length of the line segment formed by the preceding and succeeding position points, and divides the difference length by the length of the line segment formed by the preceding and succeeding position points to obtain the length ratio. Further, the computer device multiplies the length ratio by the coordinate difference to fuse the length ratio and the coordinate difference, obtaining fused coordinates. The first position coordinates of the preceding position point are then superimposed with the fused coordinates to obtain the interpolation coordinates of the first interpolation point.
[0160] In one embodiment, the computer device can determine the interpolation coordinates of the first interpolation point using the following formula:
[0161] px = p1.x + d / D(p2.x - p1.x)
[0162] py = p1.y + d / D(p2.y - p1.y)
[0163] pz = p1.z + d / D(p2.z - p1.z)
[0164] Where px is the x-coordinate of the first interpolation point, py is the y-coordinate of the first interpolation point, and pz is the z-coordinate of the first interpolation point. d is the difference length, D is the length of the line segment formed by the preceding and following position points, (p1.x, p1.y, p1.z) are the first position coordinates, and (p2.x, p2.y, p2.z) are the second position coordinates.
[0165] In the above embodiments, by interpolating the target route according to the interpolation interval, multiple target location points can be obtained, thereby increasing the number of target location points. By increasing the number of target location points, the number of generated elevation consistency conditions can be increased, thus obtaining more accurate virtual elevations for the uphill and downhill roads based on multiple elevation consistency conditions.
[0166] In one embodiment, reference Figure 7 , Figure 7A flowchart illustrating interpolation in a first position point sequence according to an interpolation interval is shown in one embodiment. S701 Obtain the first position point sequence `line` and the interpolation interval `D`. S702 Set the index variable `index` = 1 and the remaining distance `tmpDis` = 0. S703 Add the first position point in the first position point sequence to the result point string `result`. S704 Determine whether the value of the index variable `index` is less than the number of position points included in the first position point sequence, i.e., determine whether `index` is less than `line.size()`. S705 If the value of the index variable `index` is less than the number of position points included in the first position point sequence, obtain the (index-1)th position point in the first position point sequence `line`, denoted as `p1`, and obtain the (index-1)th position point in the first position point sequence `line`, denoted as `p2`. S706 Calculate the length of the line segment formed by `p1` and `p2`, obtaining `d`, i.e., calculate `d = Distance(p1, p2)`. S707 Determine whether the sum of the remaining distance tmpDis and the length d of the line segment formed by P1 and P2 is less than the interpolation interval D, that is, whether tmpDis+d is less than D. S708 If tmpDis+d is less than D, it is considered that an interpolation point cannot be inserted into the line segment formed by P1 and P2. In this case, the computer device updates the remaining distance using the formula tmpDis = tmpDis+d, and S709 increments the index variable index by 1, that is, index = index+1, and returns to step S704. S710 If tmpDis+d is greater than or equal to D, the computer device inserts an interpolation point at a distance D-tmpDis from point p1 into the line segment formed by p1 and p2, denoted as tmpPoint, and adds tmpPoint to the result string result. S711 The computer device updates the remaining distance using the formula tmpDis = Distance(tmpPoint, p2), where Distance represents the distance between the two calculated points, i.e., the length of the line segment formed by the two calculated points. S712 The computer device determines whether tmpDis is greater than or equal to the interpolation interval D. If tmpDis is less than the interpolation interval D, it returns to step S709. S713 If tmpDis is greater than or equal to the interpolation interval D, the computer device inserts an interpolation point, denoted as tmpPoint, at an interpolation distance D from tmpPoint and within the line segment formed by tmpPoint and p2, and adds tmpPoint to the result string result. S714 The computer device updates the remaining distance using the formula tmpDis = tmpDis - D and returns to step S712 to continue execution.S715 If the value of the index variable index is greater than or equal to the number of position points included in the first position point sequence, the computer device determines whether the value of tmpDis is 0. If the value of tmpDis is 0, the computer device obtains the result point string and uses the result point string as the target position point sequence. S716 If the value of tmpDis is not 0, the computer device adds the last position point in the first position point sequence to the result point string result. S717 The result point string result is used as the target position point sequence.
[0167] In one embodiment, reference Figure 8 , Figure 8 A flowchart illustrating the insertion point is shown in one embodiment. The computer device can insert a point at a certain distance from the starting point between two position points. S801: Obtain the starting point P1 and the ending point P2. S802: Obtain the distance d from the interpolation point to P1. S803: The computer device calculates the distance D between p1 and p2 using the formula D = Distance(p1, p2). S804: Calculate the interpolation coordinates of the interpolation point p according to the formulas: px = p1.x + d / D(p2.x - p1.x); py = p1.y + d / D(p2.y - p1.y); pz = p1.z + d / D(p2.z - p1.z). Where (p1.x, p1.y, p1.z) are the coordinates of the starting point P1, (p2.x, p2.y, p2.z) are the coordinates of the ending point P2, px is the x-coordinate of the interpolation point p, py is the y-coordinate of the interpolation point p, and pz is the z-coordinate of the interpolation point p. The S805 computer device returns the interpolated coordinates of the interpolation point p.
[0168] In one embodiment, determining the opposite location point in the opposite road corresponding to each target location point includes: for each target location point among multiple target location points, taking the location point in the opposite road whose distance from the current target location point meets the first shortest distance condition as the opposite location point corresponding to the current target location point.
[0169] Specifically, when multiple target location points are obtained, for each target location point, the computer device determines the corresponding opposite location point on the opposite road. The distance between the target location point and its corresponding opposite location point satisfies a first shortest distance condition. This first shortest distance condition means that the distance between the target location point and its corresponding target location point is less than the distance from the target location point to any location point on the opposite road.
[0170] In one embodiment, the computer device can sequentially determine the opposing position point corresponding to each target position point, or the computer device can simultaneously determine the opposing position point corresponding to each target position point.
[0171] In the above embodiments, by using the location points in the opposite road that meet the first shortest distance condition as the opposite location points corresponding to the target location point, the difference in virtual elevation between the two location points with the shortest distance between the uphill and downhill roads rendered based on the determined target location point and the corresponding opposite location point can be within a reasonable range, making the rendered uphill and downhill roads more reasonable.
[0172] In one embodiment, a location point on the opposite road whose distance from the current target location point meets a first short distance condition is used as the opposite location point corresponding to the current target location point. This includes: when the current target location point is an interpolation point obtained by interpolating the first location point sequence, projecting the current target location point onto the opposite road to obtain a third projection point, and using the third projection point as the opposite location point corresponding to the current target location point; when the current target location point is the end point of the first location point sequence, obtaining a second location point sequence of the corresponding road matching segment in the opposite road, and filtering out the opposite location point corresponding to the current target location point from the second location point sequence.
[0173] Specifically, the computer device can sequentially determine the opposing position points corresponding to each target position point. The computer device can also simultaneously determine the opposing position points corresponding to each target position point. For better description, the following explanation uses the determination of the opposing position point corresponding to the current target position point as an example. Since the target position point can be an interpolation point obtained by interpolating the first position point sequence, or it can be a sequence endpoint in the first position point sequence, when the current target position point is an interpolation point obtained by interpolating the first position point sequence, the computer device can project the current target position point onto the opposing road to obtain a third projection point, and use the third projection point as the opposing position point corresponding to the current target position point. For example, refer to... Figure 5 If the current target location is the interpolation point L, the computer device projects the interpolation point L onto the opposite road to obtain the third projection point P, and uses the third projection point P as the opposite location point of the interpolation point L.
[0174] If the current target location is the endpoint of the first location point sequence, the computer device determines the second location point sequence of the corresponding road segment in the opposing road, and filters out the opposing location point corresponding to the current target location from the second location point sequence. Here, the sequence endpoint refers to the start or end point in the location point sequence. For example, refer to... Figure 5When the current target location is location point E, since location point E is the end point in the first location point sequence, the computer device searches for the opposite location point corresponding to location point E in the second location point sequence.
[0175] In one embodiment, when determining a road matching segment, the computer device can identify road segments located in the opposite road within the road matching segment and use these segments as the opposite matching segments. The computer device determines the opposite route within the opposite matching segment and identifies corners and endpoints in the opposite route, using the identified corners and endpoints as position points in a second position point sequence. The opposite route can be any route within the opposite matching segment; for example, the opposite route can be the centerline of the opposite matching segment. For example, referencing... Figure 5 In a road area centered on the broken line ABCK, the opposite matching road segment can be considered, and the broken line ABCK can represent the opposite route. It's easy to understand that when the target road is an uphill road, the opposite matching road segment is the first matching road segment; when the opposite road is a downhill road, the opposite matching road segment is the second matching road segment.
[0176] In one embodiment, when the current target location is an endpoint of a sequence in a first location point sequence, the computer device can search for the location point closest to the current target location from a second location point sequence, and use the found location point as the opposite location point to the current target location. For example, refer to... Figure 5 When the current target location is location point E, the computer device determines the location point closest to location point E in the second location point sequence as location point K, and then uses the found location point K as the opposite location point to location point E.
[0177] In one embodiment, if the current target location is the starting point in the first location point sequence, the computer device uses the starting point in the second location point sequence as the opposite location point corresponding to the current target location; if the current target location is the ending point in the first location point sequence, the computer device uses the ending point in the second location point sequence as the opposite location point corresponding to the current target location.
[0178] In the above embodiments, since the current target position point is the end point of the sequence in the first position point sequence, the opposing position point corresponding to the current target position point can be directly selected from the second position point sequence. Therefore, compared with obtaining the opposing position point through projection, the efficiency of determining the opposing position point is improved.
[0179] In one embodiment, projecting the current target location point onto the opposing road to obtain a third projection point includes: obtaining a second sequence of location points in the opposing road corresponding to the road matching segment; dividing the opposing route in the opposing road into multiple route segments using the location points in the second sequence; for each of the multiple route segments, drawing a perpendicular line from the current target location point to the current route segment to obtain an intermediate perpendicular foot, and when the intermediate perpendicular foot falls into the current route segment, using the intermediate perpendicular foot as a candidate perpendicular foot; selecting the target perpendicular foot closest to the current target location point from the multiple candidate perpendicular feet; and determining the third projection point corresponding to the current target location point based on the target perpendicular foot.
[0180] Specifically, the computer device acquires a second sequence of location points and, based on the coordinates of each point in the sequence on the opposite road, divides the opposite road into multiple route segments. For example, refer to... Figure 5 When the second location point sequence includes location point A, location point B, location point C and location point K, the computer device can divide the opposing route into route segment A to B, route segment B to C and route segment C to K based on location point A, location point B, location point C and location point K.
[0181] Furthermore, the computer device, passing through the current target location, draws a perpendicular line to each of the multiple route segments to obtain the intermediate foot of the perpendicular. It then determines whether the intermediate foot of the perpendicular falls within the corresponding route segment. If it does, the intermediate foot is selected as a candidate perpendicular. For example, refer to... Figure 8 Given that the current target location is point A, and multiple route segments include route segments H to G, G to F, and F to E, the computer equipment can draw perpendicular lines from point A to route segments H to G, G to F, and F to E, respectively. Since the foot of the perpendicular P1 drawn from point A to route segment H to G falls within route segment H to G, it is considered a candidate perpendicular foot. Similarly, since the foot of the perpendicular P2 drawn from point A to route segment F to E also falls within route segment F to E, it is considered a candidate perpendicular foot.
[0182] Furthermore, the computer selects the perpendicular closest to the current target position from among multiple candidate perpendiculars as the target perpendicular. For example, referencing... Figure 9Since the distance between candidate perpendicular P1 and the current target position is less than the distance between candidate perpendicular P2 and the current target position, candidate perpendicular P1 is chosen as the target perpendicular. The computer device then determines the third projection point corresponding to the current target position based on the target perpendicular. For example, the computer device uses the target perpendicular as the third projection point corresponding to the current target position. Figure 9 A schematic diagram of the perpendicular foot in one embodiment is shown.
[0183] In this embodiment, by taking the nearest candidate perpendicular as the target perpendicular, it is convenient to subsequently obtain the opposing position point that satisfies the first short distance condition with the current target position point based on the determined target perpendicular.
[0184] In one implementation, the third projection point corresponding to the current target position point is determined based on the target perpendicular foot, including: determining the distances between the current target position point and each position point in the second position point sequence to obtain multiple candidate distances; selecting the target distance that satisfies the second shortest distance condition from the multiple candidate distances; when the distance between the target perpendicular foot and the current target position point is less than or equal to the target distance, the target perpendicular foot is taken as the third projection point corresponding to the current target position point.
[0185] Specifically, the computer device can calculate the distances between the current target location and each location in the second location sequence, obtaining multiple candidate distances. For example, referencing... Figure 10 When the current target location is location point A, and the second location point sequence includes location points H, G, F, and E in the opposite route, the computer device calculates the distances between location point A and each of these locations, obtaining multiple candidate distances. Further, the computer device filters the candidate distances to select the target distance that satisfies a second shortest distance condition. Specifically, the second shortest distance condition can be the shortest distance among the candidate distances; therefore, the computer device uses the shortest distance among the candidate distances as the target distance.
[0186] Furthermore, the computer device determines whether the distance between the target's perpendicular foot and the current target position is greater than the target distance. If it is greater than the target distance, the computer device determines that the current target position fails to project and does not have a corresponding third projection point. If it is less than or equal to the target distance, the computer device uses the position of the target's perpendicular foot as the third projection point corresponding to the current target position. For example, referencing... Figure 10 Since the distance between position point A and the target's perpendicular foot P is greater than the distance between position point A and position point H, the projection of position point A is determined to have failed. Figure 10 A schematic diagram of a projection failure in one embodiment is shown.
[0187] It is worth noting that the computer equipment can also project the endpoints in the first road onto the down road to obtain a first projection point that has been successfully projected, and project the endpoints in the second road onto the up road to obtain a second projection point that has been successfully projected, in accordance with the above method.
[0188] In this embodiment, since the distance between the target location point and the corresponding opposing location point needs to meet the first shortest distance condition, when the distance between the target perpendicular foot and the current target location point is greater than the target distance, it can be considered that the distance between the opposing location point determined based on the target perpendicular foot and the corresponding target location point does not meet the first shortest distance condition. Therefore, judging the target location point as a projection failure can reduce the subsequent process of generating elevation consistency conditions based on incorrect opposing location points, thereby saving computer and other resources required to generate elevation consistency conditions.
[0189] In one embodiment, reference Figure 11 , Figure 11 A flowchart illustrating the projection of a location point onto a polyline in one embodiment is shown. S1101 Draw a perpendicular line from location point P to any line segment formed by two adjacent location points on the polyline. S1102 Classify the perpendiculars falling into the corresponding line segment into a candidate perpendicular set. S1103 The computer device determines whether the candidate perpendicular set is empty. S1104 If it is empty, it determines that location point P cannot be projected onto the polyline, and the projection fails. S1105 The computer device calculates the perpendicular closest to location point P in the candidate perpendicular set, denoted as the target perpendicular F, and obtains the distance D1 between location point P and the target perpendicular F. S1106 The computer device calculates the minimum distance between location point P and each endpoint and corner point of the polyline, obtaining the target distance D2. S1107 The computer device determines whether the distance D1 between location point P and the target perpendicular F is greater than the target distance D2. If so, it determines that location point P cannot be projected onto the polyline. If S1108 is less than or equal to the target distance D2, then the target perpendicular foot F is determined to be the projection point of the position point P onto the broken line segment.
[0190] In one embodiment, the method further includes: obtaining at least one pair of associated location points from the road network, and determining the location association relationship between the location points included in each pair of associated location points; generating a set of virtual elevation constraints corresponding to at least one pair of associated location points based on the location association relationship; the set of virtual elevation constraints includes at least one of the following: cover zone constraint, adjacent height continuity constraint, and slope constraint; determining the first virtual elevation of each target location point and the second virtual elevation of each opposing location point based on the elevation consistency constraint, including: determining the first virtual elevation of each target location point, the second virtual elevation of each opposing location point, and the third virtual elevation corresponding to the location points included in each pair of associated location points based on the set of virtual elevation constraints and the elevation consistency constraint.
[0191] Specifically, to further enhance the rationality of the generated virtual elevations of the uphill and downhill roads, the computer equipment can further generate virtual elevation constraints. These constraints, combined with elevation consistency constraints, are used to obtain the virtual elevations of the uphill and downhill roads. The computer equipment can generate virtual elevation constraints based on the road elevation relationships, road slopes, and whether there are abrupt changes in elevation between the two roads at their junctions.
[0192] For example, refer to Figure 12 During the rendering process of electronic maps, errors in road elevation relationships may cause upper-level roads to overlap with lower-level roads. This elevation relationship error is also known as an overlay error. Overlay relationship: This refers to a situation where, for two roads, one road is on top of the other; the road above covers the road below. Figure 12 A schematic diagram of an incorrect capping relationship is shown in one embodiment.
[0193] refer to Figure 13 During the rendering process of electronic maps, errors in the virtual elevation calculation of road slopes may cause steep drops in road elevations. Figure 13 A schematic diagram of a steep road descent in one embodiment is shown. (Reference) Figure 14 In the process of rendering electronic maps, errors in the calculation of virtual elevation at road junctions may result in uneven road junctions and abrupt changes. Figure 14 A schematic diagram illustrating an uneven road junction in one embodiment is shown. (Reference) Figure 15 In the process of rendering electronic maps, errors in the calculation of the virtual elevation of the uphill road and the downhill road may lead to a height difference between the uphill road and the downhill road. Figure 15 A schematic diagram showing an embodiment of an elevation difference between an uphill road and a downhill road is provided.
[0194] Therefore, to ensure that the final rendered uphill and downhill roads meet the above four conditions, the computer equipment can generate a set of virtual elevation constraints based on three requirements: "the vertical relationship (overlapping relationship) of the roads must be consistent with the real world; the road slope must be smooth; and the heights of the two roads at the junction point must be continuous and smooth near the junction point." It can also generate elevation consistency constraints based on the requirement that "the difference between the virtual elevations of the uphill and downhill roads must be less than a difference threshold." Combining the virtual elevation constraints and the elevation consistency constraints yields more reasonable uphill and downhill roads.
[0195] In one embodiment, when it is necessary to generate a set of virtual elevation constraints, the computer device can obtain at least one pair of associated location points of roads from the road network and determine the positional relationships between the location points included in each pair. For example, refer to... Figure 16 , Figure 16 The centerlines of five roads (link1, link2, link3, link4, and link5) are shown. Link1, link2, and link3 intersect at points A, B, and C, respectively. Link2 and link4 are adjacent at point D. Link4 is the up-going road, and link5 is the down-going road. If link2 is higher than link3 at point A, link1 is higher than link2 at point B, and link1 is higher than link3 at point C, then point A in link2 and point A in link3 are a pair of associated points. That is, a2 and a3 are a pair of associated points, and the positional relationship of these associated points is an overlapping relationship. Here, a2 represents point A in link2, a3 represents point A in link3, and so on.
[0196] Correspondingly, position point B in link1 and position point B in link2 are a pair of related position points, that is, b1 and b2 are a pair of related position points, and the positional relationship of the related position point pairs is always overlapping. Position point C in link1 and position point C in link3 are also a pair of related position points, that is, c1 and c3 are a pair of related position points, and the positional relationship of the related position point pairs is always overlapping.
[0197] If link2 and link4 are adjacent at point D, then point D in link2 and point D in link4 form an associated pair, that is, d2 and d4 form an associated pair, and the positional association relationship of the associated pair is an adjacency relationship. For link1, it is divided into three segments by point B and point C. Therefore, point F in link1 and point C in link1 form an associated pair, that is, f1 and c1 form an associated pair; point C in link1 and point B in link1 form an associated pair, that is, c1 and b1 form an associated pair; point B in link1 and point J in link1 form an associated pair, that is, b1 and j1 form an associated pair, and the positional association relationship of the associated pair is a slope relationship.
[0198] Furthermore, when determining the positional relationships between the points included in each pair of associated location points, the computer device can generate a set of virtual elevation constraints corresponding to at least one pair of associated location points based on these relationships. It is understood that a pair of associated location points has only one positional relationship; therefore, the computer device can generate a set of virtual elevation constraints based on a pair of associated location points and its positional relationships. Specifically, a pair of associated location points with a covering relationship must satisfy the covering area constraint condition: Pα - Pβ > h. The covering area constraint condition characterizes the vertical relationship of the road, meaning the covering relationship needs to be consistent with the real world.
[0199] In the formula, α and β represent two location points with a coverage relationship, and the navigation data indicates that location point α is above location point β. The letter "P" in this application represents virtual elevation, so it will not be explained or elaborated further. h represents the minimum height of the coverage area, i.e., the target height difference, which can be set according to the actual application scenario. In the test, it was found that a target height difference of 4 meters is more reasonable. If h is too low, the two roads in the coverage area may overlap, resulting in a poor visual effect.
[0200] Combination Figure 16 The description states that the relationships between location points a2 and a3, b1 and b2, and c1 and c3 are all capping relationships. When location point a2 is above location point a3, location point b1 is above location point b2, and location point c1 is above location point c3, the computer device, using the formula Pα-Pβ>h, can generate three specific capping zone constraints:
[0201] Pa2-Pa3>h
[0202] Pb1-Pb2>h
[0203] Pc1-Pc3>h
[0204] Among them, an adjacent pair of points must satisfy the adjacent height continuity constraint condition, which can be expressed by the formula Pε=Pδ.
[0205] In the formula, ε and δ represent two adjacent points, and the letter "P" represents virtual elevation. For two adjacent roads, they need to be continuous at their adjacent points; otherwise, abrupt changes in elevation will occur at the adjacent points, resulting in one road being higher than the other, which will affect the visual effect.
[0206] Combination Figure 16 Given that link2 and link4 are adjacent at point D, the computer device can generate a specific adjacent height continuity constraint condition: Pd2 = Pd4, based on the formula Pε = Pδ.
[0207] Among them, target location pairs with slope correlation must satisfy slope constraint conditions, which can be expressed by the formula (pθ-pγ). 2 2 d 2 (θ,γ) represents this.
[0208] In the formula, θ and γ represent a pair of related location points with a slope correlation, "P" represents the virtual elevation, and S represents the tangent of the maximum slope (i.e., the target slope), which can be set according to the actual application scenario. Testing revealed that a maximum slope of 1 angle is more reasonable. 2 (θ, γ) represents the distance between target points θ and γ on the plane. Since navigation data provides latitude and longitude coordinates, i.e., two-dimensional position information, the two-dimensional position information between two points can be calculated to obtain the distance. Therefore, d 2 (θ, γ) are known quantities. If the road is curved, then the planar distance is in radians.
[0209] Combination Figure 16 The road link1 is known to be divided into three segments by points B and C. Therefore, each segment should satisfy the slope constraint condition. That is, f1 and c1 are associated point pairs, c1 and b1 are associated point pairs, and b1 and j1 are associated point pairs, and the positional relationships of the points in the associated point pairs are all slope relationships. At this time, the computer equipment can use the formula (pθ-pγ) to... 2 2 d 2 (θ,γ) generates three specific slope constraints:
[0210] (Pf1-Pc1) 2 2 d2 (f1,c1)
[0211] (Pc1-Pb1) 2 2 d 2 (c1,b1)
[0212] (Pb1-Pj1) 2 2 d 2 (b1,j1)
[0213] Similarly, each segment in road link2 should satisfy the slope constraint condition:
[0214] (Ph2-Pb2) 2 2 d 2 (h2,b2)
[0215] (Pb2-Pa2) 2 2 d 2 (b2,a2)
[0216] (Pa2-Pd2) 2 2 d 2 (a2,d2)
[0217] Each segment in road link3 should meet the slope constraint condition:
[0218] (Pg3-Pc3) 2 2 d 2 (g3,c3)
[0219] (Pc3-Pa3) 2 2 d 2 (c3,a3)
[0220] (Pa3-Pk3) 2 2 d 2 (a3,k3)
[0221] Each segment in road link4 should meet the slope constraint condition:
[0222] (Pd4-Pp4) 2 2 d 2 (d4,p4)
[0223] (Pp4-Pq4) 2 2 d2 (p4,q4)
[0224] (Pq4-Pe4) 2 2 d 2 (q4,e4)
[0225] Each segment in road link 5 should meet the slope constraint condition:
[0226] (Pl5-Pr5) 2 2 d 2 (l5,r5)
[0227] (Pr5-Ps5) 2 2 d 2 (r5,s5)
[0228] (Ps5-Pu5) 2 2 d 2 (s5,u5)
[0229] (Pu5-Pv5) 2 2 d 2 (u5,v5)
[0230] (Pu5-Pn5) 2 2 d 2 (u5,n5)
[0231] Furthermore, the computer device generates multiple elevation consistency conditions according to the virtual elevation generation method in this embodiment, for example, referring to... Figure 16 When r5, s5, u5, and v5 are all target location points, and d4, p4, q4, and e4 are all opposing location points, the generated elevation consistency constraint is as follows:
[0232] (Pd4-Pr5) 2 <H
[0233] (Pp4-Ps5) 2 <H 2
[0234] (Pq4-Pu5) 2 <H 2
[0235] (Pe4-Pv5) 2 <H 2
[0236] Here, H is a pre-set elevation difference threshold. The smaller the absolute value of H, the smaller the elevation difference, and the better the elevation consistency. The letter "P" represents the virtual elevation.
[0237] The computer equipment integrates the set of virtual elevation constraints and elevation consistency constraints to determine the first virtual elevation of each target location point, the second virtual elevation of each opposing location point, and the third virtual elevation corresponding to the location points included in each pair of associated location points.
[0238] In one embodiment, the computer device may also generate distribution characteristic conditions, such as, referencing Figure 16 The computer equipment can generate a virtual elevation V representing the degree of dispersion among the virtual elevations of the associated location points, the target location point, and the opposing location points.
[0239] V = Pf1 2 +Pc1 2 +Pb1 2 +Pj1 2 +Ph2 2 +Pb2 2 +Pa2 2 +Pd2 2 +Pg3 2 +Pc3 2 +Pa3 2 +Pk3 2 +Pd4 2 +Pq4 2 +Pg4 2 +Pl5 2 +Pr5 2 +Ps5 2 +Pu5 2 +Pv5 2 +Pn5 2
[0240] Wherein, the letter "P" represents the virtual elevation, and f1 to n5 are... Figure 16 Location points within the road network.
[0241] Furthermore, the computer equipment generates corresponding distribution characteristic conditions based on the degree of dispersion V, and adjusts the initial virtual elevations of each target location point, each opposing location point, and each associated location point according to the distribution characteristic conditions, the set of virtual elevation constraints, and multiple elevation consistency constraints, so that the adjusted virtual elevations not only satisfy the set of virtual elevation constraints and multiple elevation consistency constraints, but also that the degree of dispersion corresponding to the adjusted virtual elevations reaches the minimum value.
[0242] In this embodiment, the initial virtual elevation is adjusted by combining virtual elevation constraints and elevation consistency conditions, so that the adjusted virtual elevation is more reasonable and reduces phenomena such as uneven heights, unsmooth connections, steep road drops, and inconsistencies between the rendering of uphill roads, downhill roads, and other roads associated with uphill and downhill roads and the real world. Figure 16 A schematic diagram of a road network in one embodiment is shown.
[0243] In one embodiment, reference Figure 17 , Figure 17 The diagram illustrates the overall process of generating virtual elevations in one embodiment. S1701 The computer device constructs constraints for the covered area based on the elevation relationship of the roads within the covered area. S1702 The computer device constructs continuous height constraints for adjacent points of two roads based on the road topology. S1703 The computer device constructs slope constraints between any two adjacent associated points on the roads. S1704 The computer device constructs height consistency conditions for the uphill and downhill roads. S1705 The computer device solves for the optimal virtual elevation based on the generated conditions. S1706 The computer device determines the virtual elevations of the remaining points between the points using interpolation.
[0244] In one embodiment, reference Figure 18 , Figure 18 A schematic diagram of the generation process for elevation consistency constraints in one embodiment is shown. S1801 The computer device acquires the uplink and downlink roads. S1802 Projects the endpoints of the centerline in the uplink road onto the downlink road to obtain a first projection point, and projects the endpoints of the centerlines in the downlink road onto the uplink road to obtain a second projection point. Based on the first and second projection points, a first matching segment in the uplink road and a second matching segment in the downlink road are obtained. S1803 The road with the shorter matching segment is selected as the target road, and interpolation points are inserted into the target route of the target road at fixed intervals. S1804 Projects the interpolation points onto the centerline of the opposing road. S1805 The interpolation points are paired with the corresponding projection points, and the endpoints of the first matching segment are paired with the endpoints of the second matching segment to obtain multiple height consistency relationship pairs. Each height consistency relationship pair includes a target location point and a corresponding opposing location point. S1806 Generates the elevation consistency constraint conditions corresponding to each height consistency relationship pair, and adjusts the initial virtual elevation using the elevation consistency constraint conditions.
[0245] In one embodiment, reference Figure 19 , Figure 19 A flowchart illustrating a virtual elevation generation method in a specific embodiment is shown.
[0246] S1902, The computer equipment acquires the road network and identifies the up-road and down-road roads in the road network; determines the first road route and the endpoints of the first road route in the up-road; determines the second road route and the endpoints of the second road route in the down-road.
[0247] S1904, the computer equipment projects the endpoints of the first road route onto the downhill road to obtain the first projection point; and projects the endpoints of the second road route onto the uphill road to obtain the second projection point.
[0248] S1906, the computer device determines a first matching segment in the up-road that matches the down-road based on at least one of the endpoints of the first road route and the second projection point; and determines a second matching segment in the down-road that matches the up-road based on at least one of the endpoints of the second road route and the first projection point.
[0249] S1908, the computer equipment determines the first segment length of the first matching road segment; determines the second segment length of the second matching road segment; and selects one road from the up-going road and the down-going road as the target road, and the other as the opposite road, based on the first segment length and the second segment length.
[0250] S1910, the computer device determines the target route corresponding to the road matching segment in the target road, and determines the endpoints and corners in the target route; according to the positional order of the endpoints and corners in the target route, the endpoints and corners in the target route are sorted to obtain the first position point sequence.
[0251] S1912, the computer device determines the reference position point and the subsequent position point in the first position point sequence; the length of the broken line formed by the target subsequence in the first position point sequence, which starts from the reference position point and ends at the subsequent position point, is greater than or equal to the preset interpolation interval.
[0252] S1914, The computer device inserts at least one interpolation point in a polyline based on the target subsequence according to the interpolation interval.
[0253] S1916, the computer device adds interpolation points between the reference position point and the subsequent position point in the first position point sequence according to the position arrangement order of each interpolation point in the broken line formed by the target subsequence, so as to update the first position point sequence.
[0254] S1919, the computer device takes the target interpolation point that meets the long distance condition among the interpolation points as the new reference position point, enters the next round of interpolation process, returns to the step of determining the subsequent position point after the reference position point and continues to execute until the subsequent position point is the last position point in the first position point sequence, and the distance between the reference position point and the subsequent position point is less than or equal to the interpolation interval, and finally updates the first position sequence points as the target position point sequence.
[0255] S1920, the computer device determines multiple target location points from the target location point sequence, and determines the corresponding opposite location point in the opposite road for each target location point.
[0256] S1922, The computer device generates elevation consistency constraints for each pair of target location points and object location points; the elevation consistency constraints are used to indicate the conditions that must be met for the difference between the virtual elevation of the target location point and the virtual elevation of the corresponding opposing location point.
[0257] S1924, The computer device obtains at least one pair of associated location points of a road from the road network, determines the positional relationship between the location points included in each pair of associated location points, and generates a set of virtual elevation constraints corresponding to at least one pair of associated location points based on the positional relationship; the set of virtual elevation constraints includes at least one of the following: cover zone constraint, adjacent height continuity constraint, and slope constraint.
[0258] S1926, The computer equipment determines the first virtual elevation of each target location point, the second virtual elevation of each opposing location point, and the third virtual elevation corresponding to the location points included in each pair of associated location points, based on the set of virtual elevation constraints and the elevation consistency constraints.
[0259] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0260] Based on the same inventive concept, this application also provides a virtual elevation generation device for implementing the virtual elevation generation method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more virtual elevation generation device embodiments provided below can be found in the limitations of the virtual elevation generation method described above, and will not be repeated here.
[0261] In one embodiment, such as Figure 20 As shown, a virtual elevation generation device 2000 is provided, including: a road determination module 2002, a location point determination module 2004, and a condition generation module 2006, wherein:
[0262] The road determination module 2002 is used to determine the target road and the opposite road of the target road from the uphill and downhill roads based on the road matching segments between uphill and downhill roads in the road network.
[0263] The location point determination module 2004 is used to perform interpolation processing on the first location point sequence of the corresponding road segment in the target road to obtain the target location point sequence of the target road; determine multiple target location points from the target location point sequence, and determine the corresponding opposite location point in the opposite road for each target location point.
[0264] The condition generation module 2006 is used to generate elevation consistency constraints for each pair of target location points and object location points; the elevation consistency constraints are used to indicate the conditions that must be met for the difference between the virtual elevation of the target location point and the virtual elevation of the corresponding opposing location point; based on each elevation consistency constraint, the first virtual elevation of each target location point and the second virtual elevation of each opposing location point are determined.
[0265] In one embodiment, the virtual elevation generation device 2000 further includes a road matching segment generation module 2008, which is used to acquire a road network and identify uphill and downhill roads in the road network; determine a first road route and the endpoint of the first road route in the uphill road; determine a second road route and the endpoint of the second road route in the downhill road; and determine a road matching segment between the uphill road and the downhill road based on the endpoint of the first road route and the endpoint of the second road route.
[0266] In one embodiment, the road matching segment between the up-road and down-road includes a first matching segment and a second matching segment; the road matching segment generation module 2008 is further configured to project the endpoint of the first road route onto the down-road to obtain a first projection point; project the endpoint of the second road route onto the up-road to obtain a second projection point; determine the first matching segment in the up-road that matches the down-road based on at least one of the endpoint of the first road route and the second projection point; and determine the second matching segment in the down-road that matches the up-road based on at least one of the endpoint of the second road route and the first projection point.
[0267] In one embodiment, the endpoints of the first road route include a first starting point and a first ending point; the endpoints of the second road route include a second starting point and a second ending point; the road matching segment generation module 2008 is further configured to, when both the first starting point and the first ending point are successfully projected, extract a road segment from the up-going road with the first starting point and the first ending point as the position points on both sides, to obtain a first matching segment; when either the first starting point or the first ending point is successfully projected, select the first target endpoint that is successfully projected from the first starting point and the first ending point, and extract a road segment from the up-going road with the first target endpoint and the second projection point as the position points on both sides, to obtain a first matching segment; when neither the first starting point nor the first ending point is successfully projected, and both the second starting point and the second ending point are successfully projected, extract a road segment from the up-going road with the second projection point of the second starting point and the second projection point of the second ending point as the position points on both sides, to obtain a first matching segment.
[0268] In one embodiment, the road matching segment between the up-road and down-road includes a first matching segment in the up-road that matches the down-road and a second matching segment in the down-road that matches the up-road; the road determination module 2002 is further configured to determine the first segment length of the first matching segment; determine the second segment length of the second matching segment; and select one road from the up-road and down-road as the target road and the other as the opposite road based on the first segment length and the second segment length.
[0269] In one embodiment, the virtual elevation generation device 2000 is further configured to determine the target route corresponding to the road matching segment in the target road, and determine the endpoints and corners in the target route; sort the endpoints and corners in the target route according to the positional order of the endpoints and corners in the target route to obtain a first position point sequence; the position point determination module 2004 is further configured to perform interpolation processing on the target route according to a preset interpolation interval to obtain multiple interpolation points, and combine the multiple interpolation points and the first position point sequence to obtain a target position point sequence.
[0270] In one embodiment, the location point determination module 2004 is further configured to determine a reference location point and subsequent location points in the first location point sequence; the length of the polyline formed by the target subsequences in the first location point sequence, starting from the reference location point and ending at the subsequent location points, is greater than or equal to a preset interpolation interval; at least one interpolation point is inserted into the polyline formed by the target subsequences according to the interpolation interval; interpolation points are added between the reference location point and the subsequent location point in the first location point sequence according to the positional order of each interpolation point in the polyline formed by the target subsequences to update the first location point sequence; the target interpolation point that meets the long distance condition is taken as the new reference location point, and the next round of interpolation process is entered, and the step of determining the subsequent location points after the reference location point is returned to continue execution until the subsequent location point is the last sequential location point in the first location point sequence, and the distance between the reference location point and the subsequent location point is less than or equal to the interpolation interval, and the finally updated first location sequence points are taken as the target location point sequence.
[0271] In one embodiment, the position point determination module 2004 is further configured to traverse the position points in the first position point sequence that are located after the reference position point according to the arrangement order of each position point in the first position point sequence; extract candidate subsequences from the first position point sequence that start from the reference position point and end at the currently traversed position point, and determine the length of the broken line formed by the candidate subsequences; when the length of the broken line formed by the candidate subsequences is less than the interpolation interval, continue traversing until the length of the broken line formed by the candidate subsequences extracted from the first position point sequence based on the currently traversed position point is greater than or equal to the interpolation interval, and take the currently traversed position point in the first position point sequence as the subsequent position point.
[0272] In one embodiment, the position point determination module 2004 is further configured to: determine the preceding position point in the first position point sequence that is adjacent to the subsequent position point and located before the subsequent position point when the number of position points included in the target subsequence is greater than the number threshold; obtain the length of the broken line formed by the intermediate subsequences in the first position point sequence that starts from the reference position point and ends at the preceding position point; determine the interpolation coordinates of the first interpolation point in the current round of interpolation process according to the length of the broken line formed by the intermediate subsequences and the interpolation interval, and obtain the first interpolation point; and insert subsequent interpolation points sequentially in the line segment formed by the first interpolation point and the subsequent position point according to the interpolation interval, and obtain each subsequent interpolation point.
[0273] In one embodiment, the position point determination module 2004 is further configured to determine the difference between the length of the broken line formed by the intermediate subsequence and the interpolation interval, obtain the difference length, and use the difference length as the distance between the first interpolation point in the current round of interpolation and the previous position point; based on the first position coordinate of the previous position point, the second position coordinate of the subsequent position point and the distance between the first interpolation point in the current round of interpolation and the previous position point, the interpolation coordinates of the first interpolation point in the current round of interpolation are obtained.
[0274] In one embodiment, the position point determination module 2004 is further configured to determine the ratio between the length of the line segment formed by the preceding position point and the subsequent position point and the difference length, thereby obtaining the length ratio; obtain the first position coordinates of the preceding position point and the second position coordinates of the subsequent position point; determine the coordinate difference between the first position coordinates and the second position coordinates; fuse the length ratio and the coordinate difference to obtain the fused coordinates; and superimpose the first position coordinates and the fused coordinates to obtain the interpolation coordinates of the first interpolation point in the current round of interpolation.
[0275] In one embodiment, the location point determination module 2004 is further configured to, when the number of location points included in the target subsequence is equal to the number threshold, sequentially insert interpolation points in the line segment formed by the reference location point and the subsequent location point according to the interpolation interval, to obtain at least one interpolation point.
[0276] In one embodiment, the location point determination module 2004 is further configured to, for each of the plurality of target location points, take a location point on the opposite road whose distance from the current target location point meets the first shortest distance condition as the opposite location point corresponding to the current target location point.
[0277] In one embodiment, the location point determination module 2004 is further configured to, when the current target location point is an interpolation point obtained by interpolating the first location point sequence, project the current target location point onto the opposite road to obtain a third projection point, and use the third projection point as the opposite location point corresponding to the current target location point; when the current target location point is the sequence endpoint of the first location point sequence, obtain the second location point sequence of the corresponding road matching segment in the opposite road, and filter out the opposite location point corresponding to the current target location point from the second location point sequence.
[0278] In one embodiment, the location point determination module 2004 is further configured to obtain a second location point sequence of the corresponding road matching segment in the opposing road; divide the opposing route in the opposing road into multiple route segments by using the location points in the second location point sequence; for each of the multiple route segments, a perpendicular line is drawn from the current target location point to the current route segment to obtain the intermediate perpendicular foot, and when the intermediate perpendicular foot falls into the current route segment, the intermediate perpendicular foot is used as a candidate perpendicular foot; the target perpendicular foot closest to the current target location point is selected from the multiple candidate perpendicular feet; and the third projection point corresponding to the current target location point is determined based on the target perpendicular foot.
[0279] In one embodiment, the location point determination module 2004 is further configured to determine the distances between the current target location point and each location point in the second location point sequence, thereby obtaining multiple candidate distances; filter out the target distance that satisfies the second shortest distance condition from the multiple candidate distances; and when the distance between the target perpendicular foot and the current target location point is less than or equal to the target distance, use the target perpendicular foot as the third projection point corresponding to the current target location point.
[0280] In one embodiment, the condition generation module 2006 is further configured to generate distribution feature conditions; the distribution feature conditions characterize the conditions that need to be met to determine the degree of dispersion of the virtual elevation of each target location point and the virtual elevation of each opposing location point; and adjust the first initial virtual elevation of each target location point and the second initial virtual elevation of each opposing location point according to the distribution feature conditions and the consistency constraints of each elevation, so as to obtain the first virtual elevation of each target location point and the second virtual elevation of each opposing location point.
[0281] In one embodiment, the condition generation module 2006 is further configured to obtain at least one pair of associated location points from the road network, determine the location association relationship between the location points included in each pair of associated location points, generate a set of virtual elevation constraints corresponding to at least one pair of associated location points based on the location association relationship, the set of virtual elevation constraints includes at least one of the following: cover area constraint, adjacent height continuity constraint, and slope constraint; and determine the first virtual elevation of each target location point, the second virtual elevation of each opposing location point, and the third virtual elevation corresponding to the location points included in each pair of associated location points based on the set of virtual elevation constraints and the elevation consistency constraint.
[0282] The modules in the aforementioned virtual elevation generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0283] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 21 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores virtual elevation generation data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a virtual elevation generation method.
[0284] Those skilled in the art will understand that Figure 21 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0285] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0286] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0287] In one embodiment, a computer program product or computer program is provided, the 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 in the above method embodiments.
[0288] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0289] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0290] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0291] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for generating virtual elevation, characterized in that, The method includes: Project the endpoint of the first road route in the uphill road onto the downhill road to obtain the first projection point; Project the endpoint of the second road route in the downhill road onto the uphill road to obtain the second projection point; Based on at least one of the endpoints of the first road route and the second projection point, determine a first matching road segment in the uphill road that matches the downhill road; Based on at least one of the endpoints of the second road route and the first projection point, determine a second matching road segment in the downhill road that matches the uphill road; Based on road matching segments between uphill and downhill roads in the road network, a target road and its opposite road are determined from the uphill and downhill roads; the road matching segments include a first matching segment and a second matching segment; The first location point sequence corresponding to the road segment in the target road is interpolated to obtain the target location point sequence of the target road. Multiple target location points are determined from the target location point sequence, and the corresponding opposite location point in the opposite road is determined for each target location point. Generate elevation consistency constraints for each pair of target and object locations; the elevation consistency constraints are used to indicate the conditions that must be met for the difference between the virtual elevation of the target location and the virtual elevation of the corresponding opposing location. Based on the elevation consistency constraints, the first virtual elevation of each target location point and the second virtual elevation of each opposing location point are determined.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the road network and identify the up-road and down-road roads in the road network; Determine the first road route and the endpoints of the first road route in the uphill road; Determine the second road route and the endpoints of the second road route in the downhill road.
3. The method according to claim 1, characterized in that, The endpoints of the first road route include a first starting point and a first ending point; the endpoints of the second road route include a second starting point and a second ending point. The step of determining a first matching road segment in the uphill road that matches the downhill road based on at least one of the endpoints of the first road route and the second projection point includes: If both the first starting point and the first ending point are successfully projected, a road segment with the first starting point and the first ending point as the position points on both sides of the road is extracted from the up-road to obtain the first matching road segment; If the projection at the first starting point or the first ending point is successful, the first target endpoint that was successfully projected is selected from the first starting point and the first ending point, and the road segment with the first target endpoint and the second projection point as the position points on both sides of the road is extracted from the up road to obtain the first matching road segment. If neither the first starting point nor the first ending point is successfully projected, but both the second starting point and the second ending point are successfully projected, a road segment is extracted from the up-road with the second projection point of the second starting point and the second projection point of the second ending point as the position points on both sides of the edge line to obtain the first matching road segment.
4. The method according to claim 1, characterized in that, The method of determining the target road and its opposite road from the uphill and downhill roads based on road matching segments in the road network includes: Determine the length of the first segment of the first matched road segment; Determine the length of the second segment of the second matching segment; Based on the lengths of the first and second road segments, one road is selected from the uphill and downhill roads as the target road, and the other is selected as the opposite road.
5. The method according to claim 1, characterized in that, Before performing interpolation processing on the first location point sequence corresponding to the road matching segment in the target road to obtain the target location point sequence of the target road, the method further includes: Determine the target route corresponding to the road matching segment in the target road, and determine the endpoints and corners in the target route; According to the positional order of the endpoints and corners in the target route, the endpoints and corners in the target route are sorted to obtain the first position point sequence; The step of interpolating the first location point sequence corresponding to the matching road segment in the target road to obtain the target location point sequence of the target road includes: The target route is interpolated according to a preset interpolation interval to obtain multiple interpolation points. The multiple interpolation points and the first position point sequence are then combined to obtain the target position point sequence.
6. The method according to claim 5, characterized in that, The step of interpolating the target route according to a preset interpolation interval to obtain multiple interpolation points, and combining the multiple interpolation points with the first position point sequence to obtain the target position point sequence, includes: Determine the reference position point and the subsequent position point located after the reference position point in the first position point sequence; the length of the broken line formed by the target subsequences in the first position point sequence that start from the reference position point and end at the subsequent position point is greater than or equal to the preset interpolation interval. According to the interpolation interval, at least one interpolation point is inserted in the polyline formed based on the target subsequence; According to the order of the positions of the interpolation points in the broken line formed by the target subsequence, each interpolation point is added between the reference position point and the subsequent position point in the first position point sequence to update the first position point sequence. The target interpolation point that meets the long distance condition among the interpolation points is taken as the new reference position point, and the next round of interpolation process is entered. The step of determining the subsequent position point after the reference position point is returned to continue execution until the subsequent position point is the last position point in the first position point sequence, and the distance between the reference position point and the subsequent position point is less than or equal to the interpolation interval. The first position sequence points finally updated are taken as the target position point sequence.
7. The method according to claim 6, characterized in that, The steps for determining the subsequent position point include: According to the order of each position point in the first position point sequence, the position points located after the reference position point in the first position point sequence are traversed. Extract candidate subsequences from the first position point sequence, starting from the reference position point and ending at the currently traversed position point, and determine the length of the polyline formed by the candidate subsequences; When the length of the broken line formed by the candidate subsequences is less than the interpolation interval, the traversal continues until the length of the broken line formed by the candidate subsequences extracted from the first position point sequence based on the current traversed position point is greater than or equal to the interpolation interval, and the current traversed position point in the first position point sequence is taken as the subsequent position point.
8. The method according to claim 6, characterized in that, The step of inserting at least one interpolation point in the polyline formed based on the target subsequence according to the interpolation interval includes: When the number of position points included in the target subsequence is greater than the number threshold, determine the preceding position point in the first position point sequence that is adjacent to the subsequent position point and is located before the subsequent position point; Obtain the length of the broken line formed by the intermediate subsequences in the first position point sequence that start from the reference position point and end at the preceding position point; Based on the length of the polyline formed by the intermediate subsequences and the interpolation interval, the interpolation coordinates of the first interpolation point in the current round of interpolation are determined, and the first interpolation point is obtained. According to the interpolation interval, subsequent interpolation points are sequentially inserted into the line segment formed by the first interpolation point and the subsequent position points to obtain each subsequent interpolation point.
9. The method according to claim 8, characterized in that, Determining the interpolation coordinates of the first interpolation point in the current round of interpolation based on the length of the polyline formed by the intermediate subsequences and the interpolation interval includes: The difference between the length of the broken line formed by the intermediate subsequences and the interpolation interval is determined to obtain the difference length, and the difference length is used as the distance between the first interpolation point in the current round of interpolation and the previous position point; The interpolation coordinates of the first interpolation point in the current interpolation process are obtained based on the first position coordinates of the preceding position point, the second position coordinates of the following position point, and the distance between the first interpolation point in the current interpolation process and the preceding position point.
10. The method according to claim 9, characterized in that, The step of obtaining the interpolation coordinates of the first interpolation point in the current interpolation process based on the first position coordinates of the preceding position point, the second position coordinates of the following position point, and the distance between the first interpolation point in the current interpolation process and the preceding position point includes: The length ratio is obtained by determining the ratio between the length of the line segment formed by the preceding position point and the following position point and the difference length. Obtain the first position coordinates of the preceding position point and the second position coordinates of the following position point; Determine the coordinate difference between the first position coordinates and the second position coordinates; The length ratio and the coordinate difference are fused to obtain the fused coordinates; By superimposing the first position coordinates and the fused coordinates, the interpolation coordinates of the first interpolation point in the current round of interpolation are obtained.
11. The method according to claim 1, characterized in that, Determining the corresponding opposite location point in the opposite road for each of the target location points includes: For each of the plurality of target location points, a location point on the opposite road whose distance from the current target location point meets the first shortest distance condition is taken as the opposite location point corresponding to the current target location point.
12. The method according to claim 11, characterized in that, The step of designating a location point on the opposite road whose distance from the current target location point satisfies the first shortest distance condition as the opposite location point corresponding to the current target location point includes: When the current target location is an interpolation point obtained by interpolating the first location sequence, the current target location is projected onto the opposite road to obtain a third projection point, and the third projection point is used as the opposite location point corresponding to the current target location. When the current target location is the endpoint of the first location point sequence, the second location point sequence corresponding to the road matching segment in the opposite road is obtained, and the opposite location point corresponding to the current target location is filtered out from the second location point sequence.
13. The method according to claim 12, characterized in that, The step of projecting the current target location point onto the opposite road to obtain a third projection point includes: Obtain the second location point sequence of the corresponding road segment in the opposing road; The opposing routes in the opposing roads are divided by the location points in the second location point sequence to obtain multiple route segments; For each of the multiple route segments, a perpendicular line is drawn from the current target location point to the current route segment to obtain the intermediate foot of the perpendicular. When the intermediate foot of the perpendicular falls into the current route segment, the intermediate foot of the perpendicular is taken as a candidate foot of the perpendicular. Select the target perpendicular foot that is closest to the current target position from multiple candidate perpendicular feet; Based on the target perpendicular foot, determine the third projection point corresponding to the current target position point.
14. The method according to claim 13, characterized in that, The step of determining the third projection point corresponding to the current target position point based on the target perpendicular foot includes: Determine the distances between the current target location and each location point in the second location sequence to obtain multiple candidate distances; Filter the target distance that satisfies the second shortest distance condition from the plurality of candidate distances; When the distance between the target perpendicular foot and the current target position point is less than or equal to the target distance, the target perpendicular foot is taken as the third projection point corresponding to the current target position point.
15. The method according to claim 1, characterized in that, The method further includes: Obtain at least one pair of associated location points for a road from the road network, and determine the location association relationship between the location points included in each pair of associated location points; Based on the location association, at least one set of virtual elevation constraints corresponding to the associated location point pair is generated; the set of virtual elevation constraints includes at least one of the following: cover zone constraint, adjacent height continuity constraint, and slope constraint. The step of determining the first virtual elevation of each target location point and the second virtual elevation of each opposing location point according to the elevation consistency constraints includes: Based on the set of virtual elevation constraints and the elevation consistency constraints, the first virtual elevation of each target location point, the second virtual elevation of each opposing location point, and the third virtual elevation corresponding to the location points included in each pair of associated location points are determined.
16. A virtual elevation generation device, characterized in that, The device includes: A road matching segment generation module is used to project the endpoints of a first road route in the uphill road onto the downhill road to obtain a first projection point; project the endpoints of a second road route in the downhill road onto the uphill road to obtain a second projection point; determine a first matching segment in the uphill road that matches the downhill road based on at least one of the endpoints of the first road route and the second projection point; and determine a second matching segment in the downhill road that matches the uphill road based on at least one of the endpoints of the second road route and the first projection point. A road determination module is used to determine a target road and its opposite road from the uphill and downhill roads based on road matching segments between uphill and downhill roads in the road network; the road matching segments include a first matching segment and a second matching segment; The location point determination module is used to perform interpolation processing on the first location point sequence corresponding to the road matching segment in the target road to obtain the target location point sequence of the target road; determine multiple target location points from the target location point sequence, and determine the opposite location point in the opposite road corresponding to each target location point; The condition generation module is used to generate elevation consistency constraints for each pair of target location points and object location points; the elevation consistency constraints are used to indicate the conditions that need to be met for the difference between the virtual elevation of the target location point and the virtual elevation of the corresponding opposing location point; and the first virtual elevation of each target location point and the second virtual elevation of each opposing location point are determined according to the elevation consistency constraints.
17. The virtual elevation generation device according to claim 16, characterized in that, The road matching segment generation module is also used to acquire the road network and identify the up-road and down-road roads in the road network; determine the first road route and the endpoint of the first road route in the up-road; and determine the second road route and the endpoint of the second road route in the down-road.
18. The virtual elevation generation device according to claim 16, characterized in that, The endpoints of the first road route include a first starting point and a first ending point; the endpoints of the second road route include a second starting point and a second ending point; the road matching segment generation module is further used to extract a road segment from the up-line with the first starting point and the first ending point as the position points on both sides, when the first starting point and the first ending point are successfully projected, to obtain a first matching segment. If the projection at the first starting point or the first ending point is successful, the first target endpoint that was successfully projected is selected from the first starting point and the first ending point, and the road segment with the first target endpoint and the second projection point as the position points on both sides of the road is extracted from the up road to obtain the first matching road segment. If neither the first starting point nor the first ending point is successfully projected, but both the second starting point and the second ending point are successfully projected, a road segment is extracted from the up-road with the second projection point of the second starting point and the second projection point of the second ending point as the position points on both sides of the edge line to obtain the first matching road segment.
19. The virtual elevation generation device according to claim 16, characterized in that, The road determination module is also used to determine the first segment length of the first matched road segment; Determine the second segment length of the second matching road segment; based on the first segment length and the second segment length, select one road from the uphill road and the downhill road as the target road, and the other as the opposite road.
20. The virtual elevation generation device according to claim 16, characterized in that, The device is further configured to determine a target route in the target road corresponding to the road matching segment, and determine the endpoints and corners in the target route; sort the endpoints and corners in the target route according to the positional order of the endpoints and corners in the target route to obtain a first position point sequence; the position point determination module is further configured to perform interpolation processing on the target route according to a preset interpolation interval to obtain multiple interpolation points, and combine the multiple interpolation points and the first position point sequence to obtain a target position point sequence.
21. The virtual elevation generation device according to claim 20, characterized in that, The position point determination module is further configured to determine a reference position point and subsequent position points in the first position point sequence; the length of the polyline formed by the target subsequences in the first position point sequence, starting from the reference position point and ending at the subsequent position point, is greater than or equal to a preset interpolation interval; at least one interpolation point is inserted into the polyline formed by the target subsequences according to the interpolation interval; according to the positional order of each interpolation point in the polyline formed by the target subsequences, each interpolation point is added between the reference position point and the subsequent position point in the first position point sequence to update the first position point sequence; the target interpolation point that meets the long distance condition is taken as the new reference position point, and the next round of interpolation process is entered, and the step of determining the subsequent position point after the reference position point is returned to continue execution until the subsequent position point is the last position point in the first position point sequence, and the distance between the reference position point and the subsequent position point is less than or equal to the interpolation interval, and the finally updated first position sequence points are taken as the target position point sequence.
22. The virtual elevation generation device according to claim 21, characterized in that, The position point determination module is further configured to traverse the position points in the first position point sequence that are located after the reference position point according to the arrangement order of each position point in the first position point sequence; extract candidate subsequences from the first position point sequence that start from the reference position point and end at the currently traversed position point, and determine the length of the broken line formed by the candidate subsequences; when the length of the broken line formed by the candidate subsequences is less than the interpolation interval, continue traversing until the length of the broken line formed by the candidate subsequences extracted from the first position point sequence based on the currently traversed position point is greater than or equal to the interpolation interval, and take the currently traversed position point in the first position point sequence as the subsequent position point.
23. The virtual elevation generation device according to claim 21, characterized in that, The position point determination module is further configured to: determine the preceding position point in the first position point sequence that is adjacent to the subsequent position point and located before the subsequent position point when the number of position points included in the target subsequence is greater than a number threshold; obtain the length of the broken line formed by the intermediate subsequences in the first position point sequence that starts from the reference position point and ends at the preceding position point; determine the interpolation coordinates of the first interpolation point in the current round of interpolation process according to the length of the broken line formed by the intermediate subsequences and the interpolation interval, and obtain the first interpolation point; and sequentially insert subsequent interpolation points in the line segment formed by the first interpolation point and the subsequent position point according to the interpolation interval, and obtain each subsequent interpolation point.
24. The virtual elevation generation device according to claim 23, characterized in that, The position point determination module is further configured to determine the difference between the length of the broken line formed by the intermediate subsequence and the interpolation interval, obtain the difference length, and use the difference length as the distance between the first interpolation point in the current round of interpolation and the preceding position point; based on the first position coordinate of the preceding position point, the second position coordinate of the following position point, and the distance between the first interpolation point in the current round of interpolation and the preceding position point, the interpolation coordinates of the first interpolation point in the current round of interpolation are obtained.
25. The virtual elevation generation device according to claim 24, characterized in that, The position point determination module is further configured to determine the ratio between the length of the line segment formed by the preceding position point and the following position point and the difference length, thereby obtaining a length ratio; acquire the first position coordinates of the preceding position point and the second position coordinates of the following position point; and determine the coordinate difference between the first position coordinates and the second position coordinates. The length ratio and the coordinate difference are fused to obtain fused coordinates; the first position coordinates and the fused coordinates are superimposed to obtain the interpolation coordinates of the first interpolation point in the current round of interpolation.
26. The virtual elevation generation device according to claim 16, characterized in that, The location point determination module is further configured to, for each of the plurality of target location points, take a location point on the opposite road whose distance from the current target location point satisfies the first shortest distance condition as the opposite location point corresponding to the current target location point.
27. The virtual elevation generation device according to claim 26, characterized in that, The location point determination module is further configured to, when the current target location point is an interpolation point obtained by interpolating the first location point sequence, project the current target location point onto the opposing road to obtain a third projection point, and use the third projection point as the opposing location point corresponding to the current target location point; when the current target location point is the sequence endpoint of the first location point sequence, obtain the second location point sequence corresponding to the road matching segment in the opposing road, and filter out the opposing location point corresponding to the current target location point from the second location point sequence.
28. The virtual elevation generation device according to claim 27, characterized in that, The location point determination module is also used to obtain a second location point sequence corresponding to the road matching segment in the opposite road; and to divide the opposite route in the opposite road by the location points in the second location point sequence to obtain multiple route segments; For each of the multiple route segments, a perpendicular line is drawn from the current target location point to the current route segment to obtain the intermediate foot of the perpendicular. When the intermediate foot of the perpendicular falls into the current route segment, the intermediate foot of the perpendicular is taken as a candidate foot of the perpendicular. From the multiple candidate feet of the perpendicular, the target foot of the perpendicular that is closest to the current target location point is selected. Based on the target perpendicular foot, determine the third projection point corresponding to the current target position point.
29. The virtual elevation generation device according to claim 28, characterized in that, The location point determination module is further configured to determine the distances between the current target location point and each location point in the second location point sequence, thereby obtaining multiple candidate distances; filter out the target distance that satisfies the second shortest distance condition from the multiple candidate distances; when the distance between the target perpendicular foot and the current target location point is less than or equal to the target distance, use the target perpendicular foot as the third projection point corresponding to the current target location point.
30. The virtual elevation generation device according to claim 16, characterized in that, The condition generation module is further configured to obtain at least one pair of associated location points of a road from the road network, determine the positional association between the location points included in each pair of associated location points, generate a set of virtual elevation constraints corresponding to at least one pair of associated location points based on the positional association, the set of virtual elevation constraints includes at least one of the following: cover zone constraint, adjacent height continuity constraint, and slope constraint; and determine the first virtual elevation of each target location point, the second virtual elevation of each opposing location point, and the third virtual elevation corresponding to the location points included in each pair of associated location points based on the set of virtual elevation constraints and the elevation consistency constraint.
31. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 15.
32. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 15.
33. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 15.