Universal road matching method and device based on road shape, computer equipment and storage medium

Through the method of segmenting road data and angular similarity calculation, the problem of high complexity of road matching of different sources is solved, and efficient and general road matching is achieved, which is suitable for all scenarios.

CN119445169APending Publication Date: 2025-02-14SHENZHEN YISHIHUOLALA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411579271.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, the matching of roads of different sources is relatively complex, and common methods such as image segmentation methods and matching methods based on special road properties have model training and preliminary preparation requirements, and the scope of application is limited.

Method used

By acquiring road data for the first map and the second map, if the road length is greater than the preset length threshold, the road is divided into segments. Then, the angle and similarity between each segment and the path segment to be matched are calculated and filtered to obtain the final matched path segment.

Benefits of technology

It realizes efficient matching of road data from different sources, reduces dependence on model training and preliminary preparation, is suitable for all road matching scenarios, and improves the accuracy and universality of matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445169A_ABST
    Figure CN119445169A_ABST
Patent Text Reader

Abstract

The invention discloses a universal road matching method, device and equipment based on a road shape and a medium, and the method comprises the steps: obtaining first map road data and second map road data, the first map road data comprising the road length of a first target road; if the road length is larger than the preset length threshold value, a first target road is segmented into at least one first target road segment, and the first target road segment is smaller than or equal to the preset length threshold value; determining to-be-matched second map road data corresponding to each first target road segment, wherein the to-be-matched road map data comprises a second target road segment; and calculating an angle and a similarity between the first target road segment and the second target road segment, and filtering the second target road segment based on the angle and the similarity to obtain a final second target road segment as a second target road segment matched with the first target road segment. The accuracy is considered, and the universality is realized at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of map technology, and in particular to a general road matching method, device, computer equipment and storage medium based on road shape. Background Art

[0002] At present, there are two main types of road matching solutions: one is the same-source road matching, which can generally match different versions of road data based on inherited information such as road IDs; the other is the different-source road matching. Since there is no directly usable empirical information between different-source data, the complexity of different-source data matching is much higher than that of the same-source data.

[0003] Currently, the commonly used road matching methods from different sources include image segmentation methods and matching methods based on special road attributes. However, the image segmentation method requires the use of knowledge in fields such as image recognition and machine learning, and requires a lot of model training and preliminary preparation when used; matching based on special road attributes is only applicable to scenes with such special attributes. Summary of the invention

[0004] Based on this, it is necessary to provide a general road matching method based on road shape, a method, an apparatus, a computer device and a storage medium to address the above technical problems, so as to solve at least one problem existing in the above-mentioned prior art.

[0005] In a first aspect, a general road matching method based on road shape is provided, comprising:

[0006] Acquire first map road data and second map road data, wherein the first map road data includes a road length of a first target road;

[0007] If the road length is greater than the preset length threshold, dividing the first target road into at least one first target road segment, where the first target road segment is less than / equal to the preset length threshold;

[0008] Determining second map road data to be matched corresponding to each of the first target road segments, wherein the road map data to be matched includes the second target road segment;

[0009] An angle and a similarity between the first target road segment and the second target road segment are calculated, and the second target road segment is filtered based on the angle and the similarity to obtain a final second target road segment as the second target road segment matching the first target road segment.

[0010] In one embodiment, the calculating the angle and the similarity between the first target road segment and the second target road segment, and filtering the second target road segment based on the angle and the similarity to obtain a final second target road segment, includes:

[0011] calculating an angle between the first target road segment and the second target road segment;

[0012] When the angle is greater than a preset angle threshold, filtering the second target road segment to obtain remaining second target road segments;

[0013] Calculating the similarity between the first target road segment and the second target road segment;

[0014] When the similarity is less than a preset similarity threshold, the remaining second target road segments are filtered to obtain a final second target road segment.

[0015] In one embodiment, the calculating the angle between the first target road segment and the second target road segment includes:

[0016] Determine first starting point coordinates and first end point coordinates of the first target road segment;

[0017] Calculating a first direction vector of the first target road segment based on the first starting point coordinates and the second end point coordinates;

[0018] Determining second starting point coordinates and second ending point coordinates of the second target road segment;

[0019] Calculating a second direction vector of the second target road segment based on the second starting point coordinates and the second end point coordinates;

[0020] An angle between the first target road segment and the second target road segment is calculated based on the first direction vector and the second direction vector.

[0021] In one embodiment, the similarity is calculated in the following manner:

[0022] Determine the coordinates of each point of the first target road segment and the coordinates of each point of the second target road segment to obtain a first geometric point set and a second geometric point set;

[0023] Calculate the spatial distance between the coordinates of each point in the first geometric point set and the coordinates of each point in the second geometric point set to obtain a spatial distance set

[0024] Based on the angle and the spatial distance set, a similarity between the second target road segment and the first target road segment is calculated.

[0025] In one embodiment, after determining whether the road length is greater than a preset length threshold, the method further comprises:

[0026] If the road length is less than or equal to the preset length threshold, determining second road data in the second map road data that is within a preset range of the first road, the second road data including at least one second road to be matched;

[0027] calculating an angle between the first road and the second road, and calculating a similarity based on the angle;

[0028] When the similarity is greater than or equal to the preset similarity threshold, the second road is used as a matching road.

[0029] In one embodiment, determining the second map road data to be matched corresponding to each of the first target road segments includes:

[0030] Taking each of the first target road segments as the center, expanding the area around to construct a to-be-matched area;

[0031] Second map road data within the to-be-matched area is determined as the to-be-matched second map road data.

[0032] In one embodiment, the first map road data includes first coordinate information, and the second map road data includes second coordinate information. After acquiring the first map road data and the second map road data, the method includes:

[0033] Acquire a first coordinate system corresponding to the first coordinate information, and acquire a second coordinate system corresponding to the second coordinate information;

[0034] When the first coordinate system is different from the second coordinate system, the first coordinate system and the second coordinate system are converted to the same coordinate system, and based on the same coordinate system, the first coordinate information and the second coordinate information are converted to the same coordinate system to obtain converted coordinate information.

[0035] In a second aspect, a general road matching device based on road shape is provided, comprising:

[0036] A road data acquisition unit, configured to acquire first map road data and second map road data, wherein the first map road data includes a road length of a first target road;

[0037] a segmentation unit, configured to segment the first target road into at least one first target road segment if the road length is greater than the preset length threshold, wherein the first target road segment is less than / equal to the preset length threshold;

[0038] A second target road segment determining unit, configured to determine second map road data to be matched corresponding to each of the first target road segments, wherein the road map data to be matched includes the second target road segment;

[0039] The road matching unit is used to calculate the angle and similarity between the matched first target road segment and the second target road segment, and filter the second target road segment based on the angle and the similarity to obtain a final second target road segment as a matched road segment.

[0040] In a third aspect, a computer device is provided, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein when the processor executes the computer-readable instructions, the steps of the general road matching method based on road shape as described above are implemented.

[0041] In a fourth aspect, a readable storage medium is provided, wherein the readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the general road matching method based on road shape as described above are implemented.

[0042] The above-mentioned general road matching method, device, computer equipment and storage medium based on road shape, the method implementation includes: obtaining first map road data and second map road data, the first map road data includes the road length of the first target road; if the road length is greater than the preset length threshold, the first target road is divided into at least one first target road segment, the first target road segment is less than / equal to the preset length threshold; determining the second map road data to be matched corresponding to each first target road segment, the road map data to be matched includes the second target road segment; calculating the angle and similarity between the first target road segment and the second target road segment, filtering the second target road segment based on the angle and similarity, and obtaining the final second target road segment as the second target road segment matching the first target road segment. In the embodiment of the present application, there is no dependence on the data source, and the same source data is not required. Any two / more map data can be implemented. And it does not rely on model training, can be used at any time, and does not rely on pre-preparation. In the processing process, it only relies on the geographic spatial information of the road data, does not rely on other attributes, and is applicable to all road matching scenarios. In the matching process, the similarity algorithm of the spatial distance set is used, and the angle factor is added at the same time, which can ensure the accuracy of matching. Therefore, it takes into account both accuracy and versatility. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 is a schematic diagram of a process of a general road matching method based on road shape in an embodiment of the present application;

[0045] Figure 2 is a structural schematic diagram of a universal road matching device based on road shape in one embodiment of the present application;

[0046] Figure 3 It is a schematic diagram of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] In one embodiment, if Figure 1 As shown, a general road matching method based on road shape is provided, comprising the following steps:

[0049] In step S110, first map road data and second map road data are acquired, wherein the first map road data includes a road length of a first target road;

[0050] In an embodiment of the present application, the first map road data may be source map data, and the second map data may be target map data, i.e., map data used for matching. The first map and the second map may be maps of the same source or maps of different sources. The first map road data and the second map road data are extracted by connecting with the first map and the second map. Specifically, the first map road data and the second map road data may include geometry data, i.e., geographic space data, coordinate information, longitude and latitude information, coordinate system information, road name, direction information, etc.

[0051] It should be noted that after obtaining the first map road data and the second map road data, standardization processing can be performed, that is, the coordinates in the first map road data and the coordinates in the second map road data are unified into the same coordinate system, and the data can be filtered to remove null values, outliers, etc. to reduce noise.

[0052] In step S120, if the road length is greater than the preset length threshold, the first target road is divided into at least one first target road segment, and the first target road segment is less than / equal to the preset length threshold;

[0053] In an embodiment of the present application, the preset length threshold may be configured in advance according to the road type, requirements, etc., for example, it may be set to 100 meters, 1000 meters, etc. If the length of the first target road is 1000 meters, and the preset length threshold is 100 meters, the first target road may be divided into 10 first target road segments of 100 meters. It should be noted that each target road segment after segmentation is less than or equal to the preset length threshold. If the road length is 105 meters, it may be divided into two first target road segments of 100 meters and 5 meters. At this time, the first target road segment of 5 meters may be filtered out. Alternatively, it may be divided into two first target road segments of equal length of 75 meters, both of which may be retained.

[0054] It can be understood that if the road length of the first target road is less than the preset length threshold, no segmentation is required.

[0055] It should be noted that when segmenting the first target road, first target road segments with clear data and complete road data may be preferentially retained.

[0056] In step S130, determining second map road data to be matched corresponding to each of the first target road segments, wherein the road map data to be matched includes the second target road segment;

[0057] For example, the first target road segment A is used as an example for explanation. The first target road segment A can be used as the central reference line and diffused to the surrounding by a certain distance to obtain a region to be matched, such as an elliptical region. Then, the second map road data in the elliptical region is obtained as the second map road data to be matched. Each second map road data to be matched includes at least one second target road segment. The second target road data can be obtained for each first target road segment in the above manner. By selecting the region to be matched in the above manner, the complexity of calculation can be reduced, the matching result can be obtained quickly, and the matching efficiency can be improved.

[0058] It should be noted that, after all the second map road data in the to-be-matched area are acquired, at least one second target road segment may be searched in the second map road data to be used as the second target road segment to be matched with the first target road segment.

[0059] In step S140 , the angle and similarity between the matched first target road segment and the second target road segment are calculated, and the second target road segment is filtered based on the angle and the similarity to obtain a final second target road segment as a matched road segment.

[0060] In the embodiment of the present application, since only two roads with similar angles are likely to be similar roads, the angles between the first target road segment and all the second target roads in the second map road data to be matched can be calculated, and the second target road segments with angles of a preset angle threshold can be firstly screened. Then, based on the spatial distance set, the similarity between the first target road segment and the remaining second target road segments is calculated, and if the similarity is greater than the preset similarity threshold, it is considered to be matched.

[0061] It should be noted that after calculating the angles and similarities of all first target road segments of the first road, after obtaining the matching road segments, they can be spliced ​​in the order of segmentation of the first road to obtain the second road, which is used as the road matching the first road.

[0062] In an embodiment of the present application, a general road matching method based on road shape is provided, and the method is implemented, including: obtaining first map road data and second map road data, wherein the first map road data includes the road length of the first target road; if the road length is greater than the preset length threshold, dividing the first target road into at least one first target road segment, wherein the first target road segment is less than / equal to the preset length threshold; determining the second map road data to be matched corresponding to each first target road segment, wherein the road map data to be matched includes the second target road segment; calculating the angle and similarity between the first target road segment and the second target road segment, and filtering the second target road segment based on the angle and similarity to obtain the final second target road segment as the second target road segment matching the first target road segment. In the embodiment of the present application, there is no dependence on the data source, and the same source data is not required, and any two / more map data can be implemented. It is not dependent on model training and can be used at any time without prior preparation dependence. In the processing process, it only relies on the geographic spatial information of the road data, and does not rely on other attributes, and is applicable to all road matching scenarios. In the matching process, the similarity algorithm of the spatial distance set is used, and the angle factor is added at the same time, which can ensure the accuracy of matching. Therefore, it takes into account both accuracy and versatility.

[0063] In the embodiment of the present application, the calculating the angle and the similarity between the first target road segment and the second target road segment, and filtering the second target road segment based on the angle and the similarity to obtain the final second target road segment, includes:

[0064] calculating an angle between the first target road segment and the second target road segment;

[0065] When the angle is greater than a preset angle threshold, filtering the second target road segment to obtain remaining second target road segments;

[0066] Calculating the similarity between the first target road segment and the second target road segment;

[0067] When the similarity is less than a preset similarity threshold, the remaining second target road segments are filtered to obtain a final second target road segment.

[0068] Optionally, the first target road segment and the second target road segment may both include a start point and an end point. Based on the first map road data and the second map road data, the coordinates of the start point and the end point may be obtained. Based on the coordinates, the slopes of the first target road segment and the second target road segment may be obtained, and then the angle may be obtained based on the slope. If the angle is greater than a threshold angle threshold, it indicates that the first target road segment and the second target road segment are not similar, and therefore may be filtered. Then, a spatial distance set of the first target road segment and the second target road segment may be established, and then based on the angle and the spatial distance set, the similarity of the first target road segment and the second target road segment may be determined.

[0069] It should be noted that the similarity can also be calculated by obtaining information such as road name, road direction, etc. together with the angle and spatial distance set, for example, assigning corresponding weights respectively and summing them to obtain the final similarity value. The second target road segment with the highest similarity can be used as the matching road.

[0070] In an embodiment of the present application, calculating the angle between the first target road segment and the second target road segment includes:

[0071] Determine first starting point coordinates and first end point coordinates of the first target road segment;

[0072] Calculating a first direction vector of the first target road segment based on the first starting point coordinates and the second end point coordinates;

[0073] Determining second starting point coordinates and second ending point coordinates of the second target road segment;

[0074] Calculating a second direction vector of the second target road segment based on the second starting point coordinates and the second end point coordinates;

[0075] An angle between the first target road segment and the second target road segment is calculated based on the first direction vector and the second direction vector.

[0076] Optionally, the first map road data may include coordinate information of each point, and the second map road data may include coordinate information of each point, and the coordinate information of the first map road data and the second map road data are converted into the same coordinate system. Then, the first starting point coordinates and the first end point coordinates of the first target road segment are determined, and the first direction vector of the first target road segment is calculated based on the first starting point coordinates and the second end point coordinates. At the same time, the second starting point coordinates and the second end point coordinates of the second target road segment are determined, and the second direction vector of the second target road segment is calculated based on the second starting point coordinates and the second end point coordinates. Based on the first direction vector and the second direction vector, the cosine value of the angle between the first target road segment and the second target road segment can be calculated by a vector dot product formula, and the angle is calculated using an inverse cosine function.

[0077] For example, for the first direction vector and the second direction vector Their angle can be solved by the following formula

[0078]

[0079] in:

[0080] They are Model.

[0081] In an embodiment of the present application, the similarity is calculated in the following way:

[0082] Determine the coordinates of each point of the first target road segment and the coordinates of each point of the second target road segment to obtain a first geometric point set and a second geometric point set;

[0083] Calculating the spatial distance between the coordinates of each point in the first geometric point set and the coordinates of each point in the second geometric point set to obtain a spatial distance set;

[0084] Based on the angle and the spatial distance set, a similarity between the second target road segment and the first target road segment is calculated.

[0085] Optionally, the coordinate information of each point on the first target road segment can be obtained according to the first map road data, and a first geometric point set can be generated. Similarly, the coordinate information of each point on the second target road segment can be obtained according to the second map road data, and a second geometric point set can be generated. Then, the distance between the coordinates of each point in the first geometric point set and the coordinates of the corresponding point in the second geometric point set can be calculated to form a spatial distance set. Then, the similarity value can be calculated based on the spatial distance set and the angle, etc.

[0086] It should be noted that the spatial distance set can be calculated in the following way: create matrices g[m], g[n]; initialize matrices g[m], g[n]; place each coordinate of the first geometric point set G0 in the corresponding position in g[m]; place each coordinate of the second geometric point set G1 in the corresponding position in g[n]; calculate the distance from each coordinate s in g[m] to each coordinate p in g[n], and obtain d[i,j]0; after completion, compare the size of all values ​​in d[i,j], obtain the minimum distance and put it in d[i]; determine whether the traversal is completed; after the traversal is completed, compare the size of all values ​​in d[i], and take the maximum value as the spatial distance value d[m,n]; obtain the spatial distance set d[m,n]. Calculate the similarity based on the spatial distance set, angle and other information.

[0087] Optionally, the road name, direction information, etc. may be obtained, and the similarity may be calculated by weighted summation together with the spatial distance set and angle. If the similarity is greater than a preset similarity threshold, it may be used as a matching road.

[0088] In an embodiment of the present application, the determining whether the road length is greater than a preset length threshold, then includes:

[0089] If the road length is less than or equal to the preset length threshold, determining second road data in the second map road data that is within a preset range of the first road, the second road data including at least one second road to be matched;

[0090] calculating an angle between the first road and the second road, and calculating a similarity based on the angle;

[0091] When the similarity is greater than or equal to the preset similarity threshold, the second road is used as a matching road.

[0092] Optionally, if the road length of the first target road is less than a preset length threshold, there is no need to split it. The first target road can be directly used as the center and expanded to the surrounding area to form an area to be matched, and the road data of the second road map in the area to be matched is obtained. The road data may include the second target road, and then the angle between the first target road and the second target road is calculated, and the similarity is calculated based on the angle. When the similarity is greater than or equal to the preset similarity threshold, the second target road is used as the matching road.

[0093] In an embodiment of the present application, determining the second map road data to be matched corresponding to each of the first target road segments includes:

[0094] Taking each of the first target road segments as the center, expanding the area around to construct a to-be-matched area;

[0095] Second map road data within the to-be-matched area is determined as the to-be-matched second map road data.

[0096] For example, the first target road segment A is used as an example for explanation. The first target road segment A can be used as the central reference line and diffused to the surrounding by a certain distance to obtain a region to be matched, such as an elliptical region. Then, the second map road data in the elliptical region is obtained as the second map road data to be matched. Each second map road data to be matched includes at least one second target road segment. The second target road data can be obtained for each first target road segment in the above manner. By selecting the region to be matched in the above manner, the complexity of calculation can be reduced, the matching result can be obtained quickly, and the matching efficiency can be improved.

[0097] In an embodiment of the present application, the first map road data includes first coordinate information, and the second map road data includes second coordinate information. After acquiring the first map road data and the second map road data, the method includes:

[0098] Acquire a first coordinate system corresponding to the first coordinate information, and acquire a second coordinate system corresponding to the second coordinate information;

[0099] When the first coordinate system is different from the second coordinate system, the first coordinate system and the second coordinate system are converted to the same coordinate system, and based on the same coordinate system, the first coordinate information and the second coordinate information are converted to the same coordinate system to obtain converted coordinate information.

[0100] Optionally, obtain the coordinate system of the first map road data S, obtain the coordinate system of the second map road data D; determine whether the coordinate systems of S and D are the same; if the coordinate systems of S and D are different, convert the coordinate systems to the same coordinate system; obtain the geometric information (coordinate information) of S and D; if there is name and direction information, also obtain it together, so as to be used in the subsequent angle and similarity calculation.

[0101] In the embodiment of the present application, there is no reliance on the data source, and the same source data is not required. Any two / multiple map data can be implemented. It does not rely on model training and can be used at any time without relying on previous preparation. In the processing process, it only relies on the geographic spatial information of the road data, and does not rely on other attributes. It is applicable to all road matching scenarios. In the matching process, the similarity algorithm of the spatial distance set is used, and the angle factor is added to ensure the accuracy of the matching. Therefore, it has universality while taking into account the accuracy.

[0102] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0103] In one embodiment, a general road matching device based on road shape is provided, and the general road matching device based on road shape corresponds to the general road matching method based on road shape in the above embodiment. Figure 2 As shown, the universal road matching device based on road shape includes a road data acquisition unit 10, a segmentation unit 20, a second target road segment determination unit 30 and a road matching unit 40. The functional modules are described in detail as follows:

[0104] A road data acquisition unit 10 is used to acquire first map road data and second map road data, wherein the first map road data includes a road length of a first target road;

[0105] A segmentation unit 20, configured to segment the first target road into at least one first target road segment if the road length is greater than the preset length threshold, wherein the first target road segment is less than / equal to the preset length threshold;

[0106] A second target road segment determination unit 30, configured to determine second map road data to be matched corresponding to each of the first target road segments, wherein the road map data to be matched includes the second target road segment;

[0107] The road matching unit 40 is used to calculate the angle and similarity between the matched first target road segment and the second target road segment, and filter the second target road segment based on the angle and similarity to obtain a final second target road segment as a matched road segment.

[0108] In one embodiment of the present application, the road matching unit 40 is further configured to:

[0109] calculating an angle between the first target road segment and the second target road segment;

[0110] When the angle is greater than a preset angle threshold, filtering the second target road segment to obtain remaining second target road segments;

[0111] Calculating the similarity between the first target road segment and the second target road segment;

[0112] When the similarity is less than a preset similarity threshold, the remaining second target road segments are filtered to obtain a final second target road segment.

[0113] In one embodiment of the present application, the road matching unit 40 is further configured to:

[0114] Determine first starting point coordinates and first end point coordinates of the first target road segment;

[0115] Calculating a first direction vector of the first target road segment based on the first starting point coordinates and the second end point coordinates;

[0116] Determining second starting point coordinates and second ending point coordinates of the second target road segment;

[0117] Calculating a second direction vector of the second target road segment based on the second starting point coordinates and the second end point coordinates;

[0118] An angle between the first target road segment and the second target road segment is calculated based on the first direction vector and the second direction vector.

[0119] In one embodiment of the present application, the road matching unit 40 is further configured to:

[0120] Determine the coordinates of each point of the first target road segment and the coordinates of each point of the second target road segment to obtain a first geometric point set and a second geometric point set;

[0121] Calculate the spatial distance between the coordinates of each point in the first geometric point set and the coordinates of each point in the second geometric point set to obtain a spatial distance set

[0122] Based on the angle and the spatial distance set, a similarity between the second target road segment and the first target road segment is calculated.

[0123] In one embodiment of the present application, the device further includes: a matching unit, configured to:

[0124] After that, include:

[0125] If the road length is less than or equal to the preset length threshold, determining second road data in the second map road data that is within a preset range of the first road, the second road data including at least one second road to be matched;

[0126] calculating an angle between the first road and the second road, and calculating a similarity based on the angle;

[0127] When the similarity is greater than or equal to the preset similarity threshold, the second road is used as a matching road.

[0128] In an embodiment of the present application, the second target road segment determining unit 30 is further configured to:

[0129] Taking each of the first target road segments as the center, expanding the area around to construct a to-be-matched area;

[0130] Second map road data within the to-be-matched area is determined as the to-be-matched second map road data.

[0131] In an embodiment of the present application, the first map road data includes first coordinate information, the second map road data includes second coordinate information, and the device further includes a data standardization processing unit for:

[0132] Acquire a first coordinate system corresponding to the first coordinate information, and acquire a second coordinate system corresponding to the second coordinate information;

[0133] When the first coordinate system is different from the second coordinate system, the first coordinate system and the second coordinate system are converted to the same coordinate system, and based on the same coordinate system, the first coordinate information and the second coordinate information are converted to the same coordinate system to obtain converted coordinate information.

[0134] In the embodiment of the present application, there is no reliance on the data source, and the same source data is not required. Any two / multiple map data can be implemented. It does not rely on model training and can be used at any time without relying on previous preparation. In the processing process, it only relies on the geographic spatial information of the road data, and does not rely on other attributes. It is applicable to all road matching scenarios. In the matching process, the similarity algorithm of the spatial distance set is used, and the angle factor is added to ensure the accuracy of the matching. Therefore, it has universality while taking into account the accuracy.

[0135] For the specific definition of the universal road matching device based on road shape, please refer to the definition of the universal road matching method based on road shape above, which will not be repeated here. Each module in the above-mentioned universal road matching device based on road shape can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0136] In one embodiment, a computer device is provided. The computer device may be a terminal device, and its internal structure diagram may be as follows: Figure 3As shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a universal road matching method based on road shape is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0137] In an embodiment of the present application, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of the general road matching method based on road shape as described above are implemented.

[0138] In an embodiment of the application, a readable storage medium is provided, wherein the readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the general road matching method based on road shape as described above are implemented.

[0139] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0140] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0141] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A general road matching method based on road shape, characterized in that: The method comprises: Acquire first map road data and second map road data, wherein the first map road data includes a road length of a first target road; If the road length is greater than the preset length threshold, dividing the first target road into at least one first target road segment, where the first target road segment is less than / equal to the preset length threshold; Determining second map road data to be matched corresponding to each of the first target road segments, wherein the road map data to be matched includes the second target road segment; An angle and a similarity between the first target road segment and the second target road segment are calculated, and the second target road segment is filtered based on the angle and the similarity to obtain a final second target road segment as the second target road segment matching the first target road segment.

2. The universal road matching method of road shape according to claim 1, characterized in that: The calculating the angle and the similarity between the first target road segment and the second target road segment, and filtering the second target road segment based on the angle and the similarity to obtain a final second target road segment, includes: calculating an angle between the first target road segment and the second target road segment; When the angle is greater than a preset angle threshold, filtering the second target road segment to obtain remaining second target road segments; Calculating the similarity between the first target road segment and the second target road segment; When the similarity is less than a preset similarity threshold, the remaining second target road segments are filtered to obtain a final second target road segment.

3. The universal road matching method of road shape according to claim 1, characterized in that: The calculating the angle between the first target road segment and the second target road segment comprises: Determine first starting point coordinates and first end point coordinates of the first target road segment; Calculating a first direction vector of the first target road segment based on the first starting point coordinates and the second end point coordinates; Determining second starting point coordinates and second ending point coordinates of the second target road segment; Calculating a second direction vector of the second target road segment based on the second starting point coordinates and the second end point coordinates; An angle between the first target road segment and the second target road segment is calculated based on the first direction vector and the second direction vector.

4. The universal road matching method of road shape according to claim 1 or 3, characterized in that: The similarity is calculated in the following way: Determine the coordinates of each point of the first target road segment and the coordinates of each point of the second target road segment to obtain a first geometric point set and a second geometric point set; Calculate the spatial distance between the coordinates of each point in the first geometric point set and the coordinates of each point in the second geometric point set to obtain a spatial distance set Based on the angle and the spatial distance set, a similarity between the second target road segment and the first target road segment is calculated.

5. The universal road matching method based on road shape according to claim 1, characterized in that: After determining whether the road length is greater than a preset length threshold, the method further comprises: If the road length is less than or equal to the preset length threshold, determining second road data in the second map road data that is within a preset range of the first road, the second road data including at least one second road to be matched; calculating an angle between the first road and the second road, and calculating a similarity based on the angle; When the similarity is greater than or equal to the preset similarity threshold, the second road is used as a matching road.

6. The universal road matching method based on road shape according to claim 1, characterized in that: The determining the second map road data to be matched corresponding to each of the first target road segments includes: Taking each of the first target road segments as the center, expanding the area around to construct a to-be-matched area; Second map road data within the to-be-matched area is determined as the to-be-matched second map road data.

7. The universal road matching method based on road shape according to any one of claims 1 to 6, characterized in that: The first map road data includes first coordinate information, and the second map road data includes second coordinate information. After acquiring the first map road data and the second map road data, the method includes: Acquire a first coordinate system corresponding to the first coordinate information, and acquire a second coordinate system corresponding to the second coordinate information; When the first coordinate system is different from the second coordinate system, the first coordinate system and the second coordinate system are converted to the same coordinate system, and based on the same coordinate system, the first coordinate information and the second coordinate information are converted to the same coordinate system to obtain converted coordinate information.

8. A general road matching device based on road shape, characterized in that: The device comprises: A road data acquisition unit, configured to acquire first map road data and second map road data, wherein the first map road data includes a road length of a first target road; a segmentation unit, configured to segment the first target road into at least one first target road segment if the road length is greater than the preset length threshold, wherein the first target road segment is less than / equal to the preset length threshold; A second target road segment determining unit, configured to determine second map road data to be matched corresponding to each of the first target road segments, wherein the road map data to be matched includes the second target road segment; The road matching unit is used to calculate the angle and similarity between the matched first target road segment and the second target road segment, and filter the second target road segment based on the angle and the similarity to obtain a final second target road segment as a matched road segment.

9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer-readable instructions, the processor implements the steps of the general road matching method based on road shape as described in any one of claims 1 to 7.

10. A readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps of the general road matching method based on road shape as described in any one of claims 1 to 7 are implemented.