Method, device, medium and electronic device for comparing roads in a map
By calculating the direction angle and spacing of the public road segment groups of high-precision maps and standard maps, the regional morphological parameters are obtained, and the accuracy of the judgment of road morphological differences between high-precision maps and standard maps is solved, and more accurate road difference assessment and follow-up processing is achieved.
Patent Information
- Application Number
- CN202211485622.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-11-24
AI Technical Summary
Due to the different data acquisition cycles of high-precision maps and standard maps, the road patterns of the same road in the two are inconsistent, and it is difficult for the existing technology to accurately judge the differences in road patterns between the two.
By obtaining multiple segment groups of public road parts, calculating the direction angle and road spacing, obtaining regional morphological parameters, judging the differences in overall and local road morphology, and determining that the road difference is small when the preset conditions are met.
The accuracy of judging differences between roads is improved, ensuring that the difference is small only when the overall and local road morphological differences are within the allowable range, and subsequent road data processing such as improvement, fusion or update are supported.
Smart Images

Figure CN115830573B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of map data technology, and more particularly, to a method, device, medium, and electronic device for comparing roads in a map. Background Art
[0002] With the continuous advancement of mapping technology, maps are becoming increasingly necessary in everyday life. For example, maps are needed for navigation while driving, and they can also assist in autonomous driving. High-definition maps (HD) are high-resolution maps that can be used to assist in autonomous driving. In contrast to HD maps, standard definition maps (SD) are generally less accurate than HD maps.
[0003] Due to the higher data acquisition costs associated with HD production, HD data collection cycles are longer than SD. For example, SD data collection can be daily, while HD data collection is quarterly. This means that HD data has a certain lag. This lag can lead to inconsistent road shapes between HD and SD. For example, a road exists in both HD and SD. Suppose, for example, due to subway construction, the road was remodeled. For example, it was originally a straight road, but after the renovation, it turned a corner, creating a curved road. Since SD data collection cycles are shorter and can capture the latest road shape, the road in SD will have the latest curved shape. However, due to the longer data collection cycle in HD, the road has not been updated, so the original straight shape in HD will remain.
[0004] In the related art, there is a need to determine the difference in road shape between the two roads in HD and SD (actually the same road, but located in different maps). Summary of the Invention
[0005] In view of this, one or more embodiments of this specification provide a method, device, medium, and electronic device for comparing roads in a map.
[0006] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0007] According to a first aspect of one or more embodiments of this specification, a method for comparing roads in a map is provided. The method is used to compare a first road and a second road, wherein one of the first road and the second road is located on a high-precision map and the other is located on a standard map. The method includes:
[0008] Acquire a common road portion of the first road and the second road;
[0009] For the public road portion, a plurality of segment groups are obtained, each segment group including two road segments corresponding to regional locations, wherein one road segment is located on the first road, and the other road segment is located on the second road;
[0010] For each segment group, calculating the direction angle between two road segments in the segment group; and obtaining the proportion of the number of segment groups in which the direction angle is less than a preset angle threshold to all segment groups;
[0011] For each segment group, obtaining a road distance between two road segments in the segment group; and obtaining a regional morphological parameter between a first road and a second road based on the road distances of all segment groups, wherein the regional morphological parameter is used to characterize a difference between the first road and the second road;
[0012] In response to the ratio reaching a preset ratio threshold and the regional morphology parameter satisfying a preset parameter condition, it is determined that the first road and the second road belong to the target road group.
[0013] According to a second aspect of one or more embodiments of this specification, a device for comparing roads in a map is provided. The device is configured to compare a first road with a second road, wherein one of the first road and the second road is located on a high-precision map and the other is located on a standard map. The device comprises:
[0014] a data acquisition module configured to acquire a common road portion of the first road and the second road; and for the common road portion, acquire a plurality of segment groups, each segment group including two road segments corresponding to regional locations, wherein one road segment is located on the first road and the other road segment is located on the second road;
[0015] an overall comparison module, configured to calculate, for each segment group, a direction angle between two road segments in the segment group; and obtain a proportion of the number of segment groups having a direction angle less than a preset angle threshold to all segment groups;
[0016] a local comparison module, configured to obtain, for each segment group, a road distance between two road segments in the segment group; and obtain, based on the road distances in all segment groups, a regional morphological parameter between a first road and a second road, wherein the regional morphological parameter is used to characterize a difference between the first road and the second road;
[0017] The judgment processing module is configured to determine that the first road and the second road belong to the target road group in response to the ratio reaching a preset ratio threshold and the regional morphological parameters satisfying preset parameter conditions.
[0018] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, the device including:
[0019] processor;
[0020] a memory for storing processor-executable instructions;
[0021] The processor implements the method of any embodiment of this specification by running the executable instructions.
[0022] According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, a method of any embodiment of this specification is implemented.
[0023] The method, device, medium, and electronic device for comparing roads in a map in the embodiments of this specification determine the overall road morphology difference by obtaining the proportion of segment groups whose direction angles are less than a preset angle threshold in all segment groups, and obtain regional morphology parameters through the road spacing between two road segments. The local road morphology difference is obtained based on the regional morphology parameters. In this way, both overall and local road morphology differences are taken into account, and the comparison of differences between roads will be more accurate. Only when both overall and local road morphology differences meet the conditions can the difference between two roads be determined to be small, thereby improving the accuracy of judging the differences between roads. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in one or more embodiments of the present disclosure or related technologies, the following briefly introduces the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings described below are only some embodiments recorded in one or more embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0025] Figure 1 The present invention is a flowchart of a method for comparing roads in a map provided by an exemplary embodiment.
[0026] Figure 2 It is a schematic diagram of obtaining a public road portion provided by an exemplary embodiment.
[0027] Figure 3 It is a schematic diagram of obtaining a public road portion provided by an exemplary embodiment.
[0028] Figure 4 is a schematic diagram of a road segment in a road provided by an exemplary embodiment.
[0029] Figure 5a It is a schematic diagram of a segment group in a road provided by an exemplary embodiment.
[0030] Figure 5b is a schematic diagram of another segment group in a road provided by an exemplary embodiment.
[0031] Figure 6 It is a schematic diagram of obtaining regional morphological parameters of a road bulge area provided by an exemplary embodiment.
[0032] Figure 7 is a schematic diagram of a boundary curve provided by an exemplary embodiment.
[0033] Figure 8 It is a schematic diagram of maximum and minimum points provided by an exemplary embodiment.
[0034] Figure 9 An exemplary embodiment provides a device for comparing roads in a map. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.
[0036] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0037] The embodiments of this specification provide a method for comparing roads in a map, which can be used to compare the size of the difference between a road in a high-precision map HD and a road in a standard map SD. For example, it has been predetermined that Road A in HD and Road B in SD are the same road, both of which are a section of road from the intersection of Guanghua Street to the intersection of Huaxia Street. Although Road A and Road B are the same road, due to the different data update cycles of HD and SD, the road shapes of the two roads may be different. For example, Road A is a straight road, while Road B has a slight curve. The method of the embodiments of this specification will be used to determine the size of the difference in road shape between Road A and Road B, so as to determine whether to perform further map data processing on Road A and Road B based on the size of the difference.
[0038] After the difference between two roads in HD and SD is determined by the method of the embodiment of this specification, subsequent road processing can be performed based on the difference between the two roads.
[0039] For example, if the difference between two roads is small, subsequent road refinement or road fusion can be carried out.
[0040] For example, taking the first road in the HD map and the second road in the standard map as an example, during road refinement, the centerline of the road surface of the first road in the HD can be used to replace the second road in the SD (the second road is in the form of a "line" in the SD). This allows the second road in the SD to be updated, and is equivalent to replacing the second road in the SD with the first road in the HD. Since the accuracy of HD is higher than that of SD, the road accuracy in the SD is improved.
[0041] For another example, consider a situation where the first road is in an HD map and the second road is in a standard map. During road fusion, if it is determined that the difference between the first road in HD and the second road in SD is small, the remaining roads in SD, excluding the second road, can be fused and spliced with the first road in HD. Specifically, this situation may involve HD only capturing a portion of the road network with high precision, leaving some roads in the network uncovered in HD. However, the uncovered roads in HD exist in SD, which has more comprehensive road network data. Therefore, through the aforementioned road fusion, the first road in HD can be fused with the roads excluding the second road in SD. This is equivalent to replacing the second road in the SD road network data with the first road in HD, thus preserving the high-precision roads in HD while also including more comprehensive road network data.
[0042] If the two roads differ significantly, this may indicate that the roads have been rebuilt or expanded, and the road data in the HD is outdated. In this case, the aforementioned road refinement or fusion process is typically discontinued to avoid data regression. Instead, the data for the two roads with significant differences can be provided to the data production department, who can then re-collect high-precision data in the HD and update the road data.
[0043] The following is a detailed description of the process of the comparison method for roads in the map:
[0044] Figure 1 FIG. 1 is a flowchart of a method for comparing roads in a map provided by an exemplary embodiment, wherein the method is used to compare the difference between a road in HD and a road in SD. Figure 1 As shown, the method may include the following processing:
[0045] In step 100, a common road portion of a first road and a second road is obtained. For the common road portion, a plurality of segment groups are obtained, each segment group including two road segments corresponding to regional locations, wherein one road segment is located on the first road and the other road segment is located on the second road.
[0046] For example, in this embodiment, two roads to be compared can be named "first road" and "second road," where one of the two roads is located in HD and the other in SD. In this embodiment, the road located in HD can be referred to as "first road," while the road located in SD can be referred to as "second road." However, it should be understood that this is an example and is not intended to be limiting. For example, in other examples, a road in SD can be referred to as "first road," while a road in HD can be referred to as "second road."
[0047] Exemplarily, the common road portion of the first road and the second road may be obtained, and multiple segment groups may be obtained for the common road portion, in the following manner:
[0048] First, since the first and second roads may have different road shapes and lengths, capturing the common road portion of the two roads will help improve the accuracy of the road difference comparison. The common road portion refers to the portion of the two roads that can be perpendicularly projected onto each other.
[0049] Please refer to Figure 2 The hint, Figure 2 The first road 21 and the second road 22 are shown. Figure 2The principle of obtaining the above-mentioned public road portion is illustrated. In this embodiment, the first road 21 is a straight line and the second road 22 is a curve. However, it is understood that the actual implementation is not limited to this.
[0050] In one example, Figure 2 As shown, the first endpoint 211 and the second endpoint 212 of the first road 21 can be obtained. These two endpoints can be vertically projected onto the second road 22 to obtain a first perpendicular point 221 and a second perpendicular point 222, respectively. The first perpendicular point 221 is the perpendicular point corresponding to the first endpoint 211, and the second perpendicular point 222 is the perpendicular point corresponding to the second endpoint 212. Both perpendicular points are located on the second road 22. Therefore, the first road between the first endpoint 211 and the second endpoint 212 can be referred to as the common road portion of the first road, and the second road between the first perpendicular point 221 and the second perpendicular point 222 can be referred to as the common road portion of the second road. Furthermore, in the above process of determining the perpendicular points, the formula for calculating the foot coordinates of the perpendicular from a point to a line can be used, which will not be described in detail.
[0051] In another example, there is another possible situation: the vertical point cannot fall on the second path. Figure 3 As shown in the figure, second road 22 is actually shorter than first road 21. Therefore, when projecting from second vertical point 212 of the first road onto the second road, corresponding vertical point 301 does not fall on the second road. In this case, endpoint 302 on the second road, closest to vertical point 301, can be used as a new vertical point. Projecting from endpoint 302 back onto the first road yields corresponding vertical point 303 on the first road. In this case, the first road between first endpoint 211 and vertical point 303 can be referred to as the public road portion of the first road, and the second road between first vertical point 221 and endpoint 302 can be referred to as the public road portion of the second road. Endpoint 303 is also the vertical point where endpoint 302 is projected onto the first road.
[0052] In either case, the common road portion of the first and second roads is captured by perpendicularly projecting the endpoints of the first and second roads. In other words, the common road portion is the road between the two endpoints, which are either pre-selected endpoints or perpendicular points projected onto the first and second roads. In short, the common road portion is the portion of the road that can be overlapped by the projection of the two roads.
[0053] Next, based on obtaining the common road portion of the first road and the second road, a plurality of segment groups of the first road and the second road may be obtained.
[0054] For example, the public road portion of the first road 21 can be segmented first, specifically according to a preset segmentation distance. For example, the segmentation distance can be "10 meters", that is, multiple segments are segmented according to a segment length of 10 meters, and each segment is called a "road segment", and the road length of the road segment is 10 meters.
[0055] Please refer to Figure 4 As shown in FIG, a first road 21 is divided into multiple road segments, each of which is 10 meters long. Then, based on the road segments on the first road, for any road segment, projection is performed through the two end points of the road segment to the public road portion of the second road, and the corresponding segment on the second road is intercepted as the road segment on the second road. For example, Figure 4 As shown, taking road segment 41 as an example, the two endpoints of road segment 41, endpoint 411 and endpoint 412, are projected onto the public road portion of second road 22, resulting in two corresponding endpoints, endpoint 421 and endpoint 422, on the second road. The second road between endpoints 421 and 422 is called a road segment, which is a subsection corresponding to road segment 41.
[0056] Using the same method, each road segment on the public road portion of the second road can be obtained. A road segment on the first road can have a corresponding road segment on the second road. In this embodiment, a road segment on the first road and a road segment on the second road that is a segment corresponding to the road segment are combined into a segment group. Figure 5a As shown in the figure, the road segments on the first road 21 can be labeled as L1, L2, ..., L6, and the road segments on the second road 22 can be labeled as L1', L2', ..., L6'. L1 and L1' form a segment group, L2 and L2' form a segment group, and so on, for a total of six segment groups. At this point, multiple segment groups for the first road and the second road have been obtained.
[0057] In addition, it can be seen that the two road segments included in each segment group have a regional position correspondence relationship, which means that these two road segments correspond to the same road area in the actual road. For example, the two road segments L1 and L1' both refer to a certain road segment in front of the Fenglan Building in the actual road. In this way, the first road and the second road can be aligned. After the two roads are aligned and the corresponding road segments on the two roads are segmented, the road differences can be compared based on the above-mentioned segment groups. In order to achieve the alignment of the two roads, before the above-mentioned mutual projection to intercept the common road part of the two roads, the two roads can be aligned at a known position point and then projected. For example, the intersection A can be found on the first road first, and the intersection A can also be found on the second road. The position points of the intersection A on the two roads are aligned, and then mutual projection is performed to intercept the common road part.
[0058] In this embodiment, when comparing the differences between the first and second roads, the main differences are in road morphology. These differences can include differences in overall road morphology and differences in local road morphology. The overall road morphology differences can include, for example, the direction and shape of the roads. The local road morphology differences can include, for example, whether there is a bulge between the two roads, and whether the bulge is flat.
[0059] The following further describes how to determine the difference in overall road morphology and local road morphology between two roads based on the multiple segment groups obtained above.
[0060] In step 102 , for each segment group, the direction angle between two road segments in the segment group is calculated.
[0061] For example, you can combine Figure 5a As shown, taking the segment group "L2-L2'" as an example, Figure 5a The angle a2 in the figure is the direction angle between the two road segments in the segment group. The angle a3 is the direction angle between the two road segments in the segment group "L3-L3'", and the angle a4 is the direction angle between the two road segments in the segment group "L4-L4'".
[0062] The direction angle is the angular difference between the directions of two road segments in the segment group.
[0063] The following formula (1) illustrates a calculation formula for the direction angle:
[0064] α=|tan -1 (Δy0 / Δx0)-tan -1 (Δy1 / Δx1)|………(1)
[0065] Among them, α is the direction angle, tan -1 is the inverse tangent function, where Δy0 is the absolute difference in y coordinates between the endpoints of one road segment in the segment group, and Δx0 is the absolute difference in x coordinates between the endpoints of that road segment. Similarly, Δy1 is the absolute difference in y coordinates between the endpoints of another road segment in the segment group, and Δx1 is the absolute difference in x coordinates between the endpoints of that other road segment. For example, when calculating the angle between L2 and L2', Δy0 and Δx0 are the absolute differences in y and x coordinates of road segment L2', respectively, while Δy1 and Δx1 are the absolute differences in y and x coordinates of road segment L2.
[0066] In addition, in actual implementation, the first road and the second road may not necessarily be the same. Figure 5a As shown, one of the roads is a parallel road, but it is also possible that both the first road and the second road are inclined roads. Figure 5b is a schematic diagram of another segment group in a road provided by an exemplary embodiment, such as Figure 5b As shown, in each segment group of the first road and the second road, both road segments are inclined roads, and the direction angle between the two road segments can also be calculated using the above formula (1).
[0067] In step 104, the ratio of the number of segment groups whose direction angle is smaller than a preset angle threshold to all segment groups is obtained.
[0068] In this step, a preset angle threshold may be set, for example, 25 degrees.
[0069] If the angle between two road segments in a segment group is less than or equal to 25 degrees, the segment group can be called a target segment group. The target segment group's proportion among all segment groups is obtained to determine the proportion of segment groups with angles less than a preset angle threshold. For example, if there are 10 segment groups, of which 9 are target segment groups, then the proportion is 90%.
[0070] In this embodiment, if the proportion of the number of segment groups whose direction angle is less than a preset angle threshold among all segment groups reaches a preset ratio threshold, then the difference between the overall road shapes of the first and second roads is determined to be within the allowable difference range. For example, the ratio threshold can be set to 80%. If the ratio of 90% reaches this ratio threshold, then the difference between the overall road shapes of the two roads is within the allowable difference range.
[0071] It is understood that if the angle between two road segments in a segment group is relatively small, such as only 10 degrees, this indicates that the road morphology of the two road segments is relatively similar. Furthermore, if the proportion of segment groups with small angles in the first and second roads reaches a preset threshold (e.g., 80%), this indicates that most areas of the two roads are morphologically similar, that is, overall, the difference in the overall road morphology of the two roads is within the allowable difference range.
[0072] In addition, it should be noted that the difference between the overall road shapes of the two roads described in this embodiment is within the allowable difference range, including the fact that there is no difference between the two roads.
[0073] In step 106 , for each segment group, a road distance between two road segments in the segment group is obtained.
[0074] In this step, the road spacing refers to the shortest distance between two road segments in the segment group. If the shortest distance is a decimal, it can be rounded down.
[0075] For example, referring to Figure 5 , the road spacing of the segment group "L1-L1'" is d1, where d1 is the shortest distance between two road segments in the segment group. Similarly, the road spacing of the segment group "L2-L2'" is d2, the road spacing of the segment group "L3-L3'" is d3, the road spacing of the segment group "L4-L4'" is d4, and so on.
[0076] In addition, assuming that the road spacing value is 5.62, in order to save data memory space, the value can be rounded down. For example, it can be rounded down to "5".
[0077] In step 108 , based on the road spacings of all segment groups, regional morphological parameters of the road bulge region formed between the first road and the second road are obtained.
[0078] In this embodiment, the regional morphological parameters between the two roads can be obtained based on the road spacing of all segment groups. The regional morphological parameters are used to characterize the difference between the first road and the second road. For example, the difference between the local road morphology of the first road and the second road can be determined based on the regional morphological parameters. The road bulge area refers to the area where the road spacing changes, for example, Figure 2In the example, the second road 22 forms a road bulge compared to the first road 21. That is, if the first road and the second road are both straight and parallel lines, then there is no road bulge between the two roads. Otherwise, if the distance between the two roads changes, then a road bulge will form between the two roads, but the bulge can be a gentle bulge or a larger abrupt bulge.
[0079] Figure 6 This example illustrates the process of obtaining the regional morphological parameters of the road bulge area based on the road spacing of all segment groups. Figure 6 As shown, the process may include the following processing:
[0080] In step 600, based on the road spacing of all segment groups, a boundary curve of the road bulge area formed between the first road and the second road is obtained, where the boundary curve includes multiple discrete points, each of which corresponds to a coordinate point of the road spacing of a segment group.
[0081] In this embodiment, the road spacing of all segment groups can be converted into coordinates (x, y). For example, these coordinates can be (1, d1), (2, d2), (3, d3) ... (N, dn).
[0082] Among them, the value of x includes: 1 / 2 / 3...N, which represents the label sequence number of each segment group. For example, 1 represents the first segment group, 2 represents the second segment group, and so on. There are N segment groups in total.
[0083] The value of y can include: d1, d2, ..., dn, which represents the road spacing of each segment group. For example, d1 represents the road spacing of the first segment group, d2 represents the road spacing of the second segment group, and so on.
[0084] The above coordinates (x, y) are expressed in a coordinate system, where x is the coordinate on the x-axis and y is the coordinate on the y-axis.
[0085] See Figure 7 As shown in FIG, based on the coordinates (x, y) above, multiple discrete points can be obtained in the coordinate system. For example, the coordinates of discrete point 71 are (1, d1), the coordinates of discrete point 72 are (2, d2), and so on. Connecting these discrete points yields a curve, which can serve as the boundary curve of the road bulge region formed between the first road and the second road.
[0086] In step 602, the boundary curve is thinned to obtain a plurality of maximum points and minimum points from the plurality of discrete points.
[0087] In this step, multiple maximum and minimum points can be obtained from the multiple discrete points through thinning. For example, the Douglas algorithm can be used to thin the discrete points of the boundary curve obtained in step 600 to find some maximum and minimum points. These extreme points can be used to preserve the overall skeleton of the boundary curve, while reducing the subsequent computational effort and improving computational efficiency.
[0088] Figure 8 An example of a part of the maximum and minimum points obtained by Douglas thinning is shown, for example, minimum point 83, maximum point 81, minimum point 82, etc. Figure 8 These are just a few examples of maximum and minimum points. The maximum and minimum points obtained in practice are not limited to these. Furthermore, between any two adjacent maximum and minimum points, there may be other discrete points. That is, the line connecting two adjacent maximum and minimum points is not necessarily a straight line. For example, there may be other discrete points between minimum point 83 and maximum point 81.
[0089] In step 604, the regional morphological parameters of the road bulge area enclosed between any two adjacent maximum and minimum points are calculated. The regional morphological parameters include the slope of the line segment connecting the maximum and minimum points and the enclosed area of the road bulge area. The slope represents the rate of change of the road spacing in the road bulge area.
[0090] In this step, the regional morphological parameters of the road bulge area can be calculated based on the maximum and minimum points obtained above. Figure 8 As shown, Figure 8 The maximum and minimum points in are obtained from the discrete points in step 600, so the coordinates of these extreme points are actually the road spacing of the segment group. For example, the y coordinates of the maximum point 81 and the minimum point 82 are used to represent the shortest distance between two road segments of the segment group. Therefore, the maximum point 81, the minimum point 82, and Figure 8 The area S enclosed by points c1 and c2 in corresponds to a road bulge area between the first road and the second road. This bulge area can be called the road bulge area enclosed by the adjacent maximum point 81 and minimum point 82.
[0091] The regional morphological parameters of the road bulge area can include two parameters:
[0092] One parameter is the slope of the line segment connecting the maximum and minimum points.
[0093] The slope can be used to represent the rate of change in the road spacing within the road bulge. Specifically, the rate of change in the road spacing between two roads within this area. A larger slope indicates a significant change in the road spacing, while a smaller slope indicates a small change in the road spacing, indicating that the two roads are parallel or the bulge is relatively flat.
[0094] For example, Figure 8 For example, the slope of the connecting line segment between the maximum point 81 and the minimum point 82 can be calculated.
[0095] The following formula (2) describes the calculation formula of the slope:
[0096] k=|y 极大值 -y 极小值 | / |x 极大值 -x 极小值 |………(2)
[0097] Among them, k represents the slope, (y 极大值 ,x 极大值 ) is the coordinate of the maximum point 81, (y 极小值 , x 极小值 ) are the coordinates of the minimum point 82.
[0098] Another parameter is: the enclosed area of the road bulge area.
[0099] For example, it can be calculated Figure 8 The enclosed area of the road bulge area S in .
[0100] The following formula (3) describes the calculation formula for the enclosed area, which is a formula for calculating the area S of a trapezoid:
[0101] S=(y 极大值 +y 极小值 ) / (2×|x 极大值 -x 极小值 |)………(3)
[0102] It should be noted that even if the connecting line between adjacent maximum and minimum points is not a straight line, the enclosed area of the road bulge area can still be approximately calculated using formula (3).
[0103] Furthermore, based on the regional morphological parameters obtained for the aforementioned road bulge area, it is possible to determine whether the difference between the local road morphologies of the first and second roads is within an allowable difference range based on these regional morphological parameters. If the rate of change in the road spacing of the road bulge area reaches a corresponding threshold, and the enclosed area reaches a corresponding area threshold, it can be determined that the difference between the local road morphologies of the two roads is small and within the allowable difference range.
[0104] For example, the rate of change of the road spacing in a road bulge area can be represented by the aforementioned slope. Therefore, a slope threshold and an area threshold can be set. If the slope of the road bulge area reaches the slope threshold and the enclosed area reaches the area threshold, i.e., the area of the road bulge area is relatively large and the rate of change of the road spacing is also high, then it can be determined that the local road morphology difference between the first road and the second road exceeds the allowable difference range.
[0105] On the contrary, if the slope of the enclosed road bulge area does not reach the slope threshold, or the enclosed area does not reach the area threshold, it is determined that the difference in local road morphology between the first road and the second road is within the allowable difference range.
[0106] For example, the slope threshold can be set to 0.5, and the area threshold can be set to 100. If the slope of the road bulge area is greater than 0.5 and the enclosed area is greater than 100, it can be determined that the local road morphology difference between the two roads is significant, exceeding the allowable difference range. The significant difference in local road morphology refers to the presence of a relatively large and obvious road bulge area. Furthermore, the greater the slope and the larger the enclosed area, the greater the difference in local road morphology between the two roads.
[0107] As mentioned above, there can be multiple maximum points and minimum points, and any two adjacent maximum points and minimum points can form an enclosed road bulge area. Among the multiple road bulge areas, as long as there is at least one road bulge area whose slope and area reach the above-mentioned slope threshold and area threshold, it can be determined that the difference in local road morphology between the first road and the second road exceeds the allowable difference range.
[0108] In step 110 , in response to the ratio reaching a preset ratio threshold and the regional morphology parameters satisfying preset parameter conditions, it is determined that the first road and the second road belong to the target road group.
[0109] In this step, the difference between the two roads is determined by considering both the overall and local road morphology. Only when the differences in both of these aspects are within the permitted range can the difference between the first and second roads be determined to be within the permitted range. For example, if 80% of all segment groups have a directional angle less than 25 degrees, and the slope and enclosed area of the bulge between the first and second roads are small, resulting in a relatively gentle bulge, then the difference between the first and second roads is within the permitted range.
[0110] The preset parameter conditions may be used to control the difference between the first road and the second road within an allowable range of difference. For example, the parameter conditions may be used to control the difference in local road morphology of the two roads within an allowable range of difference. For example, as mentioned above, the parameter conditions may include setting the slope to be less than a slope threshold and the enclosed area to be less than a corresponding area threshold. If these conditions are met, it can be indicated that the road bulge area is relatively small and flat, and the difference in local road morphology is small.
[0111] If the difference between the overall road shape and the local road shape exceeds the allowable difference range, it can be determined that the difference between the first road and the second road exceeds the allowable difference range, that is, the two roads are relatively different.
[0112] At this point, the judgment result of the difference between the two roads can be obtained.
[0113] In this embodiment, the first and second roads that meet the conditions of "the ratio reaches a preset ratio threshold and the regional morphological parameters meet preset parameter conditions" can be referred to as a target road group. This target road group is the group of roads to be processed. The road processing includes, but is not limited to: if the first road is located in HD and the second road is located in SD, replacing the second road with the centerline of the road surface of the first road.
[0114] In another example, in the method for comparing roads in a map according to an embodiment of the present disclosure, before obtaining the plurality of segment groups, the shortest offset distance between the first road and the second road may be obtained. The shortest offset distance here may be understood as the shortest road distance between the two roads.
[0115] If the shortest offset distance exceeds a preset distance threshold, it can be directly determined that the first and second roads do not belong to the target road group. In other words, if the shortest offset distance exceeds the preset distance threshold, it indicates that the two roads are far apart and have a significant difference. In this case, it can be directly concluded that the difference between the two roads is significant, and the method of this embodiment is no longer necessary to determine the difference.
[0116] The method for comparing roads in a map of this embodiment determines the overall road morphology difference by obtaining the proportion of segment groups whose direction angles are less than a preset angle threshold in all segment groups, and obtains the regional morphology parameters of the road bulge area through the road spacing between two road segments to obtain the local road morphology difference. By considering both the overall and local road morphology differences, the comparison of differences between roads will be more accurate. Only when both the overall and local road morphology differences are relatively small can the difference between two roads be determined to be small, thereby improving the accuracy of judging the differences between roads.
[0117] Figure 9 An example of a device for comparing roads in a map is provided. The device can be used to compare a first road with a second road. The structure of the device is briefly described below. The specific processing of each module can be combined with the method embodiment. Figure 9 As shown, the device may include: a data acquisition module 91 , an overall comparison module 92 , a local comparison module 93 and a judgment processing module 94 .
[0118] The data acquisition module 91 is used to obtain the public road portion of the first road and the second road; for the public road portion, multiple segment groups are obtained, each segment group includes two road segments corresponding to regional locations, one road segment is located on the first road, and the other road segment is located on the second road.
[0119] The overall comparison module 92 is configured to calculate, for each segment group, the direction angle between two road segments in the segment group; and obtain the proportion of the number of segment groups having the direction angle less than a preset angle threshold to all segment groups.
[0120] The local comparison module 93 is configured to obtain, for each segment group, the road spacing between two road segments in the segment group; and obtain, based on the road spacing of all segment groups, a regional morphological parameter between the first road and the second road, wherein the regional morphological parameter is used to characterize the difference between the first road and the second road.
[0121] The judgment processing module 94 is configured to determine that the first road and the second road belong to the target road group in response to the ratio reaching a preset ratio threshold and the regional morphological parameters satisfying preset parameter conditions.
[0122] The embodiments of this specification also provide an electronic device. At the hardware level, the device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor reading the corresponding executable instructions from the non-volatile memory into the memory and then running them to implement the method for comparing roads in the map of any embodiment of this specification. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0123] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0124] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0125] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0126] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0127] An embodiment of the present disclosure further provides a computer program product, which is used to implement the method for comparing roads in a map as described in any embodiment of the present disclosure.
[0128] An embodiment of the present disclosure further provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implements the method for comparing roads in a map as described in any embodiment of the present disclosure.
[0129] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0130] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0131] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "an," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0132] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when..." or "when..." or "in response to determining."
[0133] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.
Claims
1. A method for comparing roads in a map, characterized in that: The method is used to compare a first road and a second road, wherein one of the first road and the second road is located on a high-precision map and the other is located on a standard map; the method comprises: Acquire a common road portion of the first road and the second road; For the public road portion, a plurality of segment groups are obtained, each segment group including two road segments corresponding to regional locations, wherein one road segment is located on the first road, and the other road segment is located on the second road; For each segment group, calculating the direction angle between two road segments in the segment group; and obtaining the proportion of the number of segment groups in which the direction angle is less than a preset angle threshold to all segment groups; For each segment group, obtaining a road distance between two road segments in the segment group; and obtaining a regional morphological parameter between a first road and a second road based on the road distances of all segment groups, wherein the regional morphological parameter is used to characterize a difference between the first road and the second road; In response to the ratio reaching a preset ratio threshold and the regional morphology parameter satisfying a preset parameter condition, it is determined that the first road and the second road belong to the target road group.
2. The method according to claim 1, characterized in that The obtaining of the public road portion of the first road and the second road includes: By mutually perpendicularly projecting the first road and the second road, a public road portion of the first road and the second road is intercepted, where the public road portion is used to represent the portion covered by the mutually perpendicular projections of the first road and the second road; the public road portion includes: a public road portion located on the first road, and a public road portion located on the second road.
3. The method according to claim 1, characterized in that The public road portion includes: a public road portion located on the first road, and a public road portion located on the second road; For the public road portion, a plurality of segment groups are obtained, including: According to a preset segmentation distance, the public road portion of the first road is segmented to obtain a plurality of road segments, wherein the road length of each road segment is the segmentation distance; For any road segment on the first road, project the road segment onto the public road portion of the second road through the two end points of the road segment, and intercept the corresponding segment on the second road as the road segment on the second road; A road segment on the first road and a road segment on the second road serving as a segment corresponding to the road segment are combined into a segment group.
4. The method according to claim 2, characterized in that The public road portion between the first road and the second road is intercepted by mutually perpendicular projection between the first road and the second road, and the public road portion is used to represent the portion covered by the mutually perpendicular projection between the first road and the second road; the public road portion includes: the public road portion located on the first road, and the public road portion located on the second road, including: On the first path, obtaining a first endpoint and a second endpoint; Projecting the first endpoint and the second endpoint onto the second road to obtain a first vertical point on the second road corresponding to the first endpoint and a second vertical point on the second road corresponding to the second endpoint; The road between the first end point and the second end point is regarded as the public road portion of the first road, and the road between the first vertical point and the second vertical point is regarded as the public road portion of the second road.
5. The method according to claim 1, wherein The regional morphological parameters include: a rate of change of the road spacing of a road bulge area formed between the first road and the second road, and an enclosed area of the road bulge area; the road bulge area is an area where the road spacing changes; In response to the ratio reaching a preset ratio threshold and the regional morphology parameter satisfying a preset parameter condition, determining that the first road and the second road belong to the target road group includes: In response to the ratio reaching a preset ratio threshold, the rate of change of the road spacing in the road bulge area reaching a corresponding threshold, and the enclosed area reaching an area threshold, it is determined that the first road and the second road belong to the target road group.
6. The method according to claim 5, characterized in that The obtaining of the regional morphological parameters between the first road and the second road based on the road spacing of all segment groups includes: Based on the road spacings of all segment groups, a boundary curve of a road bulge area formed between the first road and the second road is obtained, wherein the boundary curve includes a plurality of discrete points, each of which corresponds to a coordinate point of the road spacing of a segment group; Thinning the boundary curve to obtain a plurality of maximum points and minimum points from the plurality of discrete points; Calculate the regional morphological parameters of the road bulge area enclosed between any two adjacent maximum and minimum points, the regional morphological parameters including: the slope of the connecting line segment between the maximum and minimum points, and the enclosed area of the road bulge area; the slope is used to represent the rate of change of the road spacing in the road bulge area; The rate of change of the road spacing in the road bulge area reaches a corresponding threshold, including: the slope of the road bulge area reaches a corresponding slope threshold.
7. The method according to claim 1, characterized in that The method further comprises: Before obtaining the plurality of segment groups, obtaining the shortest offset distance between the first road and the second road; If the shortest offset distance exceeds a preset distance threshold, it is determined that the first road and the second road do not belong to the target road group.
8. The method according to claim 1, characterized in that The method further includes: after determining that the first road and the second road belong to the target road group, performing road processing on the first road and the second road; The road processing includes: replacing the second road by the road surface centerline of the first road, the first road is located on the high-precision map, and the second road is located on the standard map.
9. A device for comparing roads in a map, characterized in that: The device is used to compare a first road and a second road, wherein one of the first road and the second road is located on a high-precision map and the other road is located on a standard map; the device includes: a data acquisition module configured to acquire a common road portion of the first road and the second road; and for the common road portion, acquire a plurality of segment groups, each segment group including two road segments corresponding to regional locations, wherein one road segment is located on the first road and the other road segment is located on the second road; an overall comparison module, configured to calculate, for each segment group, a direction angle between two road segments in the segment group; and obtain a proportion of the number of segment groups having a direction angle less than a preset angle threshold to all segment groups; a local comparison module, configured to obtain, for each segment group, a road distance between two road segments in the segment group; and obtain, based on the road distances in all segment groups, a regional morphological parameter between a first road and a second road, wherein the regional morphological parameter is used to characterize a difference between the first road and the second road; The judgment processing module is configured to determine that the first road and the second road belong to the target road group in response to the ratio reaching a preset ratio threshold and the regional morphological parameters satisfying preset parameter conditions.
10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 8 by running the executable instructions.
11. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Road grouping method and device in high-precision map, electronic equipment, storage medium and computer program product
CN118392157A