Road network matching method, device, equipment and readable storage medium
By calculating the first distance between the trajectory to be matched and the road sequence and the trajectory deviation distance, and combining the breadth-first search algorithm, the road network matching process is optimized, which solves the problem of insufficient road network matching accuracy in electronic maps and achieves higher matching accuracy.
Patent Information
- Application Number
- CN202411113608.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-14
AI Technical Summary
In existing technologies, the road network matching accuracy of electronic maps is insufficient, resulting in inaccurate matching between the trajectory to be matched and the target road.
By determining the endpoints of the trajectory to be matched, the first distance between each road segment in the road sequence to be matched and the trajectory is calculated. The target road sequence is selected using a breadth-first search algorithm. The road network matching process is optimized by combining the trajectory deviation distance and weight.
This improves the accuracy of road network matching and ensures the matching precision between the selected target road sequence and the trajectory to be matched.
Smart Images

Figure CN118640912B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of maps, and in particular to a road network matching method, device, equipment and readable storage medium. Background Art
[0002] With the rapid development of electronic map technology, electronic maps are used in more and more scenarios. In order to improve the accuracy of electronic maps, it is necessary to update the data of electronic maps regularly. In the process of updating electronic maps, road network matching is very important.
[0003] Generally, in the process of road network matching of the trajectory to be matched, the positional relationship between the trajectory to be matched and each candidate road segment is considered, and the road consisting of each candidate distance whose positional relationship meets the requirements is used as the target road to match the trajectory to be matched. However, the matching accuracy between the target road determined by the above method and the trajectory to be matched needs to be improved. Summary of the invention
[0004] Based on this, it is necessary to provide a road network matching method, device, equipment and readable storage medium that can improve the accuracy of road network matching in response to the above technical problems.
[0005] In a first aspect, the present application provides a road network matching method, comprising:
[0006] Determine at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched;
[0007] Determine the trajectory deviation distance corresponding to the road sequence to be matched according to the first distance between each to-be-matched road segment in the road sequence to be matched and the to-be-matched trajectory; wherein the to-be-matched road segment in the road sequence to be matched includes any target termination road segment and each preceding road segment of any target termination road segment; the first preceding road segment is any target starting road segment;
[0008] According to the trajectory deviation distance corresponding to at least one road sequence to be matched, a target road sequence corresponding to the trajectory to be matched is selected from the at least one road sequence to be matched.
[0009] In one of the embodiments, the first distance between the to-be-matched section and the to-be-matched trajectory is determined in the following manner: the first distance between the to-be-matched section and the to-be-matched trajectory is determined according to the area of the target area, the road length of the to-be-matched section, and the trajectory length of the common trajectory segment corresponding to the to-be-matched section on the to-be-matched trajectory; wherein the area of the target area is the area of the area enclosed between the common trajectory segment corresponding to the to-be-matched section on the to-be-matched trajectory and the to-be-matched section.
[0010] In one of the embodiments, according to the first distance between each to-be-matched road segment in the to-be-matched road sequence and the to-be-matched trajectory, determining the trajectory deviation distance corresponding to the to-be-matched road sequence includes: for any to-be-matched road segment in the to-be-matched road sequence, determining the distance weight of the to-be-matched road segment according to the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory and the proportion of the total trajectory length of the common trajectory segment corresponding to each to-be-matched road segment in the to-be-matched road sequence on the to-be-matched trajectory; determining the trajectory deviation distance corresponding to the to-be-matched road sequence according to the distance weight of each to-be-matched road segment in the to-be-matched road sequence and the first distance between each to-be-matched road segment and the to-be-matched trajectory.
[0011] In one of the embodiments, the sequence of roads to be matched is determined in the following manner: for any search process, based on the breadth-first search algorithm, the section to be matched in this search process is determined according to the matching situation between the escaped road of the section to be matched in the previous search process and the trajectory to be matched; wherein, the section to be matched corresponding to the first search process is the first target starting section; according to the search path, the preceding section sequence corresponding to the section to be matched in this search process is determined; wherein, the preceding section sequence includes the target starting section corresponding to the section to be matched, and the searched section between the target starting section corresponding to the section to be matched and the section to be matched; if the section to be matched in this search process is any target terminating section, the preceding section sequence corresponding to the section to be matched is used as the sequence of roads to be matched.
[0012] In one of the embodiments, for any search process, the method also includes: if the trajectory deviation distance of the preceding road segment sequence is less than the trajectory deviation distance of the associated road segment sequence, deleting the associated road segment sequence; if the trajectory deviation distance of the preceding road segment sequence is greater than the trajectory deviation distance of the associated road segment sequence, terminating the current search process; wherein the associated road segment sequence is a generated preceding road segment sequence, and the tail element in the preceding road segment sequence is the road segment to be matched under the current search process; wherein the trajectory deviation distance of the preceding road segment sequence is determined according to the first distance between each searched road segment in the preceding road segment sequence and the trajectory to be matched.
[0013] In one of the embodiments, when there is a key-value pair whose key domain is the road segment to be matched, if the trajectory deviation distance of the preceding road segment sequence is smaller than the trajectory deviation distance of the associated road segment sequence, the associated road segment sequence is deleted, including: if the trajectory deviation distance of the preceding road segment sequence is smaller than the trajectory deviation distance of the associated road segment sequence, the value domain whose key domain is the road segment to be matched is updated to the preceding road segment sequence and the corresponding trajectory offset distance under this search process.
[0014] In one of the embodiments, the section to be matched in this search process is determined based on the matching situation between the escape road of the section to be matched in the previous search process and the trajectory to be matched, including: for each escape road of the section to be matched in the previous search process, if the second distance between the escape road and the corresponding common trajectory segment of the escape road on the trajectory to be matched is less than a preset distance threshold, and the angle between the escape road and the corresponding common trajectory segment of the escape road on the trajectory to be matched is less than a preset angle threshold, then the escape road is determined to be the section to be matched in this search process.
[0015] In a second aspect, the present application also provides a road network matching device, including:
[0016] A first determination module, used to determine at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched;
[0017] The second determination module is used to determine the trajectory deviation distance corresponding to the to-be-matched road sequence according to the first distance between each to-be-matched road segment in the to-be-matched road sequence and the to-be-matched trajectory; wherein the to-be-matched road segment in the to-be-matched road sequence includes any target terminating road segment and each preceding road segment of any target terminating road segment; the first preceding road segment is any target starting road segment;
[0018] The selection module is used to select a target road sequence corresponding to the to-be-matched trajectory from at least one to-be-matched road sequence according to a trajectory deviation distance corresponding to at least one to-be-matched road sequence.
[0019] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0020] Determine at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched;
[0021] Determine the trajectory deviation distance corresponding to the road sequence to be matched according to the first distance between each to-be-matched road segment in the road sequence to be matched and the to-be-matched trajectory; wherein the to-be-matched road segment in the road sequence to be matched includes any target termination road segment and each preceding road segment of any target termination road segment; the first preceding road segment is any target starting road segment;
[0022] According to the trajectory deviation distance corresponding to at least one road sequence to be matched, a target road sequence corresponding to the trajectory to be matched is selected from the at least one road sequence to be matched.
[0023] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0024] Determine at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched;
[0025] Determine the trajectory deviation distance corresponding to the road sequence to be matched according to the first distance between each to-be-matched road segment in the road sequence to be matched and the to-be-matched trajectory; wherein the to-be-matched road segment in the road sequence to be matched includes any target termination road segment and each preceding road segment of any target termination road segment; the first preceding road segment is any target starting road segment;
[0026] According to the trajectory deviation distance corresponding to at least one road sequence to be matched, a target road sequence corresponding to the trajectory to be matched is selected from the at least one road sequence to be matched.
[0027] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0028] Determine at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched;
[0029] Determine the trajectory deviation distance corresponding to the road sequence to be matched according to the first distance between each to-be-matched road segment in the road sequence to be matched and the to-be-matched trajectory; wherein the to-be-matched road segment in the road sequence to be matched includes any target termination road segment and each preceding road segment of any target termination road segment; the first preceding road segment is any target starting road segment;
[0030] According to the trajectory deviation distance corresponding to at least one road sequence to be matched, a target road sequence corresponding to the trajectory to be matched is selected from the at least one road sequence to be matched.
[0031] The above-mentioned road network matching method, device, equipment and readable storage medium determine the trajectory deviation distance corresponding to the road sequence to be matched by introducing the first distance between each to-be-matched road segment and the to-be-matched trajectory in the road sequence to be matched, and the road sequence to be matched is a sequence composed of any target starting road segment as the starting point, any target ending road segment as the end point, and each preceding road segment of any target starting road segment. Therefore, the trajectory deviation distance of the road sequence to be matched can reflect the matching situation between the road sequence to be matched and the to-be-matched trajectory to a certain extent. Accordingly, according to the trajectory deviation distance corresponding to at least one road sequence to be matched, the target road sequence corresponding to the to-be-matched trajectory is selected from at least one road sequence to be matched, so that the selected target road sequence is more accurate, thereby improving the matching accuracy between the target road sequence and the to-be-matched trajectory. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions 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 related drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1A A schematic diagram of a process flow of a road network matching method in an embodiment;
[0034] Figure 1B A schematic diagram of a common trajectory segment of a candidate starting segment on a trajectory to be matched in one embodiment;
[0035] Figure 1C A schematic diagram of a common trajectory segment of a candidate terminating segment on a trajectory to be matched in one embodiment;
[0036] Figure 2A is a schematic flow chart of a method for determining a first distance between a to-be-matched road segment and a to-be-matched trajectory in one embodiment;
[0037] Figure 2B is a schematic diagram of a target area in one embodiment;
[0038] Figure 3 A schematic diagram of a process of determining a trajectory deviation distance in one embodiment;
[0039] Figure 4 is a flow chart of a method for determining a road sequence to be matched in one embodiment;
[0040] Figure 5 A schematic diagram of a flow chart of a method for determining a preceding road segment sequence in one embodiment;
[0041] Figure 6 Schematic diagram of a flow chart of a method for determining a trajectory to be matched in one embodiment;
[0042] Figure 7 A schematic diagram of a flow chart of a road network matching method in another embodiment;
[0043] Figure 8 is a structural block diagram of a road network matching device in an embodiment;
[0044] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] In one embodiment, Figure 1A As shown, a road network matching method is provided. This embodiment takes the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0047] S110 , determining at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched.
[0048] The trajectory to be matched may be a trajectory that needs to be matched with a road network, and illustratively, may be a driving trajectory. The trajectory to be matched may be a trajectory segment composed of multiple continuous trajectory points, for example, high-frequency trajectory points. The acquisition frequency of the trajectory points is within a preset time range, and illustratively, the acquisition frequency of the high-frequency trajectory points may be greater than the preset acquisition frequency, for example, the acquisition frequency of the high-frequency trajectory points may be 0.1 seconds. The preset acquisition frequency may be determined based on manual experience or through a large number of experiments, and the present application does not impose any limitation on this. The trajectory endpoints of the trajectory to be matched may be the first trajectory point and the last trajectory point, i.e., the starting point and the ending point, among the multiple trajectory points constituting the trajectory to be matched.
[0049] The target starting section can be used as the starting section of the target road sequence matched with the trajectory to be matched, and the target ending section can be used as the ending section of the target road sequence matched with the trajectory to be matched. In this embodiment, the number of the target starting section or the target ending section can be one or more, and this application does not impose any limitation on this.
[0050] In an optional implementation, at least one target starting segment can be determined based on the distance between the starting point of the trajectory to be matched and each candidate starting segment, such as the projected distance; at least one target ending segment can be determined based on the distance between the ending point of the trajectory to be matched and each candidate ending segment, such as the projected distance. The candidate starting segments can be all segments within a certain area where the starting point is located; and the candidate ending segments can be all segments within a certain area where the ending point is located.
[0051] Exemplarily, the distance between each candidate starting section and the starting point of the trajectory can be compared with a first preset distance threshold, and the candidate starting section corresponding to the distance not greater than the first preset distance threshold can be used as the target starting section. Similarly, the distance between each candidate terminating section and the terminating point of the trajectory can be compared with a second preset distance threshold, and the candidate terminating section corresponding to the distance not greater than the second preset distance threshold can be used as the target terminating section. Among them, the first preset distance threshold and the second preset distance threshold can both be determined based on manual experience or through a large number of experiments, and the present application does not impose any limitation on this. For example, it can be 12 meters. The values of the first preset distance threshold and the second preset distance threshold can be the same or different, and the present application does not impose any limitation on this.
[0052] In another optional implementation, each road section within a first preset range where the starting point of the trajectory to be matched is located can be used as at least one candidate starting section of the trajectory to be matched; if the vector angle between the candidate starting section and the common trajectory section on the trajectory to be matched and the candidate starting section is less than a first preset angle threshold, the candidate starting section is used as the target starting section; and, each road section within a second preset range where the ending point of the trajectory to be matched is located can be used as at least one candidate terminating section of the trajectory to be matched; if the vector angle between the candidate terminating section and the common trajectory section on the trajectory to be matched and the candidate terminating section is less than the first preset angle threshold, the candidate terminating section is used as the target terminating section.
[0053] Among them, the first preset angle threshold can be determined based on manual experience or through a large number of experiments. The present application does not impose any limitation on this. Exemplarily, the first preset angle threshold can be 70 degrees.
[0054] The common trajectory segment of the candidate starting segment on the trajectory to be matched may be a projection portion of the candidate starting segment on the trajectory to be matched.
[0055] See Figure 1B The common trajectory segment diagram of the candidate starting segment on the trajectory to be matched is shown in Fig. 1 is the candidate starting section; 2 is the trajectory to be matched; point A is the starting point of the trajectory to be matched; l 3 is the candidate starting segment l 1 The corresponding common trajectory segment on the trajectory to be matched. 3 The extension cord and l 1 The acute angle between the extension lines of the candidate starting section l is used as the vector angle, which is compared with the first preset angle threshold, and when the vector angle is less than the first preset angle threshold, the candidate starting section l is selected. 1 as the target starting segment.
[0056] See Figure 1C The common trajectory segment diagram of the candidate terminal segment on the trajectory to be matched is shown in Fig. 4 is the candidate terminating section; 2 is the trajectory to be matched; point B is the end point of the trajectory to be matched; l 5 is the candidate end segment l 4 The corresponding common trajectory segment on the trajectory to be matched. 5 The extension cord and l 4 The angle between the extension lines of the candidate end section l is taken as the vector angle, which is compared with the first preset angle threshold, and when the vector angle is less than the first preset angle threshold, the candidate end section l is selected. 4 End the segment as the target.
[0057] For example, the first preset range may be a circle with the starting point of the track to be matched as the center, R 1 The second preset range can be a circular range with the end point of the track to be matched as the center, R 2 A circular range with a radius of 1 With R 2 The value of can be determined based on manual experience or through a large number of experiments, and this application does not impose any limitation on this. 1 With R 2 The values of can be the same or different. For example, R 1 With R 2 The value can be 12 meters.
[0058] S120: Determine a trajectory deviation distance corresponding to the road sequence to be matched according to a first distance between each road segment to be matched in the road sequence to be matched and the trajectory to be matched.
[0059] The road segments to be matched in the road sequence to be matched include any target end section and each preceding road segment of any target end section; the first preceding road segment is any target start section. In other words, the road sequence to be matched is a road consisting of each connected road segment between the start and end sections, starting from any target start section and ending at any target end section. The first distance is used to characterize the spatial distance between each road segment to be matched and the trajectory to be matched. The trajectory deviation distance is used to characterize the degree of deviation between the road sequence to be matched and the trajectory to be matched.
[0060] In an optional implementation, the first distance between each to-be-matched road segment and the to-be-matched trajectory is determined, and the weighted sum of each first distance is used as the trajectory deviation distance corresponding to the to-be-matched road sequence. The weight coefficients corresponding to each first distance may be the same or at least partially different, and their specific values may be determined based on manual experience or through a large number of experiments, and this application does not impose any limitation on this.
[0061] Exemplarily, for any road section to be matched, the common trajectory section of the road section to be matched on the trajectory to be matched can be determined, and the first distance between the road section to be matched and the trajectory to be matched is determined according to the projection distance between each trajectory point on the common trajectory section and the road section to be matched. For example, the weighted sum of the vertical distances between each trajectory point on the common trajectory section and the road section to be matched is used as the first distance between the road section to be matched and the trajectory to be matched. Among them, the weight coefficients corresponding to each vertical distance can be the same or at least partially different, and their specific values can be determined based on artificial experience or determined through a large number of experiments, and the present application does not impose any restrictions on this. Optionally, the maximum value, minimum value, intermediate value or average value of each projection distance can be used as the first distance.
[0062] S130: Selecting a target road sequence corresponding to the to-be-matched trajectory from at least one to-be-matched road sequence according to a trajectory deviation distance corresponding to at least one to-be-matched road sequence.
[0063] The target road sequence may be understood as a road sequence selected with a higher (eg, highest) matching degree with the trajectory to be matched.
[0064] Exemplarily, when there is only one road sequence to be matched, the road sequence to be matched can be directly used as the target road sequence corresponding to the trajectory to be matched; when there are at least two road sequences to be matched, the road sequence to be matched with a smaller (e.g., the smallest) trajectory deviation distance can be used as the target road sequence corresponding to the trajectory to be matched.
[0065] It should be noted that, when there are at least two to-be-matched road sequences corresponding to the trajectory deviation distance with the smallest value, one of them can be selected as the target road sequence according to a random selection strategy or other selection strategies.
[0066] In the above-mentioned road network matching method, by introducing the first distance between each to-be-matched road segment and the to-be-matched trajectory in the to-be-matched road sequence, the trajectory deviation distance corresponding to the to-be-matched road sequence is determined, and the to-be-matched road sequence is a sequence consisting of any target starting road segment as the starting point, any target ending road segment as the end point, and each preceding road segment of any target starting road segment. Therefore, the trajectory deviation distance of the to-be-matched road sequence can reflect the matching situation between the to-be-matched road sequence and the to-be-matched trajectory to a certain extent. Accordingly, according to the trajectory deviation distance corresponding to at least one to-be-matched road sequence, the target road sequence corresponding to the to-be-matched trajectory is selected from at least one to-be-matched road sequence, so that the selected target road sequence is more accurate, thereby improving the matching accuracy between the target road sequence and the to-be-matched trajectory.
[0067] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this embodiment, the method for determining the first distance between the to-be-matched road segment and the to-be-matched trajectory is described in detail.
[0068] See also Figure 2A The step of determining the first distance between the to-be-matched road segment and the to-be-matched trajectory shown includes:
[0069] S210 , determining a first distance between the road section to be matched and the trajectory to be matched according to the area of the target region, the road length of the road section to be matched, and the trajectory length of the common trajectory segment corresponding to the road section to be matched on the trajectory to be matched.
[0070] The target area is the area of the region enclosed between the common trajectory segment corresponding to the to-be-matched segment on the to-be-matched trajectory and the to-be-matched segment.
[0071] In an optional implementation, the area of the target region, the road length of the to-be-matched section, and the trajectory length of the common trajectory segment corresponding to the to-be-matched section on the to-be-matched trajectory can be input into a pre-trained first distance determination model to obtain the first distance between the to-be-matched section and the to-be-matched trajectory.
[0072] It should be noted that the first distance determination model can be constructed based on a common neural network, which will not be described in detail here. Furthermore, in the process of training the first distance determination model, the road length of the sample section, the trajectory length of the common trajectory section corresponding to the sample section on the sample trajectory, and the area converted between the common trajectory section and the sample matching section can be input into the first distance determination model to obtain the first distance prediction result between the sample matching section and the sample matching trajectory. According to the difference between the first distance prediction result and the first distance label, the model parameters of the first distance determination model are adjusted to improve the model accuracy of the first distance determination model.
[0073] In another alternative embodiment, see Figure 2B Schematic diagram of the target area shown. Figure 2B In, l 6 is the road segment to be matched; l 7 is the trajectory to be matched; l 8 is the road segment l to be matched 6 In the trajectory to be matched l 7 The common trajectory segment corresponding to the above; the area where the gray dotted line is located in the figure is the target area. Exemplarily, the formula for determining the first target distance can be as follows:
[0074] ;
[0075] Where d is the first distance between the road segment to be matched and the trajectory to be matched; S is the area of the target area; l r is the road length of the road section to be matched; l t It is the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory.
[0076] In the above embodiment, the method for determining the first distance between the road segment to be matched and the trajectory to be matched is described in detail. This determination method is convenient and fast, and the amount of calculation is small. In addition, the target area, the length of the common trajectory segment, and the length of the road segment to be matched are used as references for determining the first distance, so that the first distance finally determined is more accurate, that is, the accuracy of the first distance determination result is improved, which lays a foundation for determining the trajectory deviation distance corresponding to the road sequence to be matched, and helps to improve the accuracy of the trajectory deviation distance determination result.
[0077] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this embodiment, the process of determining the trajectory deviation distance corresponding to the road sequence to be matched is described in detail.
[0078] See Figure 3 The steps for determining the trajectory deviation distance shown include:
[0079] S310, for any to-be-matched road segment in the to-be-matched road sequence, determine the distance weight of the to-be-matched road segment according to the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory and the proportion of each to-be-matched road segment in the to-be-matched road sequence in the total trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory.
[0080] In this embodiment, the distance weight corresponding to each distance to be matched is determined according to the trajectory length of the common trajectory corresponding to each distance to be matched on the trajectory to be matched.
[0081] Specifically, the sum of the common trajectory segments corresponding to each to-be-matched road segment in the to-be-matched road sequence on the to-be-matched trajectory is taken as the total trajectory length. For any to-be-matched road segment, the ratio of the trajectory length of the common trajectory corresponding to the to-be-matched road segment on the to-be-matched trajectory to the total trajectory length is taken as the distance weight of the to-be-matched road segment.
[0082] It should be noted that the process of determining the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory has been introduced in the above embodiment and will not be repeated here.
[0083] It should be noted that the above-mentioned method for determining the distance weight is only an example of the present application. In another optional implementation, the distance weight of the corresponding road section to be matched can also be determined based on the proportion of the section length of each road section to be matched in the road sequence to be matched in the total section length of all road sections to be matched in the road sequence to be matched.
[0084] S320: Determine a trajectory deviation distance corresponding to the to-be-matched road sequence according to the distance weight of each to-be-matched road segment in the to-be-matched road sequence and the first distance between each to-be-matched road segment and the to-be-matched trajectory.
[0085] In this embodiment, the first distances between the trajectories to be matched in the road sequence to be matched may be weighted based on the distance weights of the road sections to be matched, and the weighted sum may be used as the trajectory deviation distance corresponding to the road sequence to be matched.
[0086] For example, the formula for determining the trajectory deviation distance may be as follows:
[0087] ;
[0088] Where D is the trajectory deviation distance corresponding to the road sequence to be matched; l ti is the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment i on the to-be-matched trajectory in the to-be-matched road sequence. i is the first distance between the to-be-matched road segment i and the to-be-matched trajectory in the to-be-matched road sequence.
[0089] In the above embodiment, the process of determining the trajectory deviation distance corresponding to the road sequence to be matched is described in detail. In this process, the proportion of each road to be matched in the road sequence to be matched in the total trajectory length of the corresponding common trajectory segment on the trajectory to be matched is introduced, so that the distance weight can truly reflect the trajectory situation of the trajectory to be matched, thereby improving the accuracy of the trajectory deviation distance corresponding to the road sequence to be matched.
[0090] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this embodiment, the method for determining the road sequence to be matched is described in detail, thereby laying a foundation for the subsequent process of determining the target road sequence from at least one road sequence to be matched.
[0091] See also Figure 4 The steps of determining the road sequence to be matched shown include:
[0092] S410, for any search process, based on a breadth-first search algorithm, according to the matching between the escaped roads of the to-be-matched road segment in the previous search process and the to-be-matched trajectory, determine the to-be-matched road segment in the current search process.
[0093] The to-be-matched road section corresponding to the first search process is the first target starting road section, and the first target starting road section may be a randomly selected target starting road section.
[0094] The matching condition between the escape road of the to-be-matched road section and the to-be-matched trajectory may be a qualitative indicator, such as a match or a mismatch; or may be a quantitative indicator, such as a specific matching degree value.
[0095] In an optional embodiment, based on a preset matching situation determination method, the matching situation between at least one escape road of the to-be-matched section in the previous search process and the to-be-matched trajectory is determined, and the escape road whose matching situation meets the preset requirements is used as the to-be-matched section in this search process.
[0096] Exemplarily, for each escape road of the to-be-matched section in the previous search process, if the second distance between the escape road and the corresponding common trajectory segment of the escape road on the to-be-matched trajectory is less than the third preset distance threshold, and the angle between the escape road and the corresponding common trajectory segment of the escape road on the to-be-matched trajectory is less than the second preset angle threshold, then the escape road is determined to be the to-be-matched section in this search process.
[0097] The second distance may be implemented by using a conventional distance determination method, which is not limited in the present application. For example, the second distance may be the Hausdorff distance.
[0098] It should be noted that the third preset distance threshold and the second preset angle threshold can be determined based on manual experience or through a large number of experiments, and the present application does not impose any restrictions on this. In addition, the present application does not impose any restrictions on the size relationship between the third preset distance threshold and the aforementioned first preset distance threshold and the second preset distance threshold, and the size relationship between the second preset angle threshold and the aforementioned first preset angle threshold. Exemplarily, the third preset distance threshold can be 12 meters, and the second preset angle threshold can be 70 degrees.
[0099] Optionally, if the matching condition is a qualitative indicator, the escape road can be determined as the section to be matched in this search process when the distance between the two does not exceed a third preset distance threshold and the angle between the two does not exceed a second preset angle threshold.
[0100] Alternatively, if the matching situation is a quantitative indicator, an objective function may be pre-constructed with the distance and / or angle between the escape road and the common trajectory segment corresponding to the escape road on the trajectory to be matched as an independent variable and the degree of matching between the escape road and the common trajectory segment corresponding to the escape road on the trajectory to be matched as a dependent variable. If the objective function is an increasing function, then when the degree of matching is less than a preset matching threshold, the escape road is determined to be the section to be matched in this search process; if the objective function is a decreasing function, then when the degree of matching is greater than the preset matching threshold, the escape road is determined to be the section to be matched in this search process.
[0101] The preset matching degree threshold may be determined based on manual experience or through a large number of experiments, and there is no limitation on this.
[0102] S420: Determine, according to the search path, a sequence of preceding road segments corresponding to the road segment to be matched in this search process.
[0103] The preceding road segment sequence includes the target starting road segment corresponding to the road segment to be matched, the searched road segment between the target starting road segment corresponding to the road segment to be matched and the road segment to be matched, and the road segment to be matched in this search process.
[0104] It should be noted that, in the sequence of preceding road segments corresponding to the road segments to be matched in this search process, the arrangement order of the road segments to be matched is the same as the search order under the search path.
[0105] S430: If the road segment to be matched in this search process is any target terminating road segment, the preceding road segment sequence corresponding to the road segment to be matched is used as the road sequence to be matched.
[0106] For example, if the road segment to be matched in the first search process (i.e., the first target starting road segment) is a 1 , then a 1 The corresponding preceding segment sequence is [a 1 ]. 1 is the road segment to be matched in the previous search process. Continue searching. If the road segment to be matched in this search process is b 1 , then b 1 The corresponding preceding segment sequence is [a 1 , b 1 ]; if the road segment to be matched in this search process is b 2 , then b 2 The corresponding preceding segment sequence is [a 1 , b 2 ]. 1 is the road segment to be matched in the first search process, b 1is the road segment to be matched in the previous search process. Continue searching. If the road segment to be matched in this search process is c 1 , then c 1 The corresponding preceding segment sequence is [a 1 , b 1 , c 1 ]; if the road segment to be matched in this search process is c 2 , then c 2 The corresponding preceding segment sequence is [a 1 , b 1 , c 2 ].
[0107] In the above embodiment, the method for determining the road sequence to be matched is described in detail, so that the process of determining the road sequence to be matched is more specific and complete, and the breadth-first search algorithm is used to search for roads, thereby avoiding the occurrence of search omissions. In addition, in this process, the matching situation between the escaped roads of the road segment to be matched in the previous search process and the trajectory to be matched is introduced to determine the road segment to be matched, thereby ensuring the matching degree between the road sequence to be matched and the trajectory to be matched, while also reducing the computational overhead caused by unnecessary searches, thereby further improving the search efficiency.
[0108] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment, in which the process of determining the preceding road segment sequence corresponding to the road segment to be matched in the current search process in any search process described in S410 above is further introduced.
[0109] See also Figure 5 The steps of determining the sequence of preceding sections shown include:
[0110] S510, determining a magnitude relationship between a trajectory deviation distance of a preceding road segment sequence and a trajectory deviation distance of an associated road segment sequence.
[0111] Among them, the associated road segment sequence is the generated previous road segment sequence, and the tail element in the previous road segment sequence is the road segment to be matched in this search process; among them, the trajectory deviation distance of the previous road segment sequence is determined according to the first distance between each searched road segment in the previous road segment sequence and the trajectory to be matched.
[0112] For ease of understanding, the road segment to be matched in the previous search process is a1, and the road segment to be matched in this search process is b1, that is, the preceding road segment sequence corresponding to b1 is [a 1 , b 1 ] is used as an example. 2is another target starting segment, and the segment to be matched in any historical search process starting from a2 is b1, that is, the preceding segment sequence corresponding to b1 in this search process is [a 2 , b 1 ], if [a 2 , b 1 ] has been stored previously, then [a 2 , b 1 ] is the preceding segment sequence [a 1 , b 1 ] corresponds to the associated road segment sequence.
[0113] It should be noted that the process of determining the trajectory deviation distance of the preceding road segment sequence can be referred to the relevant description of the aforementioned embodiment, which will not be described in detail here.
[0114] S520: If the trajectory deviation distance of the preceding road segment sequence is smaller than the trajectory deviation distance of the associated road segment sequence, the associated road segment sequence is deleted.
[0115] In an optional implementation, each to-be-matched road segment and the corresponding preceding road segment sequence can be associated and stored in the form of a key-value pair, wherein the key domain corresponds to the to-be-matched road segment in the last search process, and the value domain corresponds to the preceding road segment sequence corresponding to the to-be-matched road segment in the current search process and the trajectory deviation distance corresponding to the preceding road segment sequence. For example, if the latest searched to-be-matched road segment is b 1 , its preceding segment sequence is [a 1 , b 1 ], and the trajectory deviation distance of the previous road segment sequence is D 1 , then the key domain key=b 1 ,value range value={[a 1 , b 1 ], D 1}.
[0116] Correspondingly, when there is a key-value pair whose key domain is the to-be-matched road segment, if the trajectory deviation distance of the preceding road segment sequence is less than the trajectory deviation distance of the associated road segment sequence, the value domain whose key domain is the to-be-matched road segment is updated to the preceding road segment sequence and the corresponding trajectory offset distance under this search process.
[0117] For example, the road section to be matched in the previous search process is a 1 , and the road segment to be matched in this search process is b 1 , that is, b 1 The corresponding preceding segment sequence is [a 1 , b 1 ], the trajectory deviation distance of the previous road segment sequence is D 1 For example, in this case, if there is a key field with key=b1 Key-value pairs, for example, key=b 1 ;value={[a 2 , b 1 ], D 2}, then determine D 1 With D 2 The size relationship, and in D 1 Less than D 2 In the case of 1 The value range of the key-value pair is adjusted to {[a 1 , b 1 ],D 1}.
[0118] S530: If the trajectory deviation distance of the preceding road segment sequence is greater than the trajectory deviation distance of the associated road segment sequence, the current search process is terminated.
[0119] In the above embodiment, in the process of determining the road sequence to be matched, the trajectory deviation distance of the preceding road segment sequence and the relationship between the trajectory deviation distance of the associated road segment sequence are considered to determine whether to terminate the current search process, thereby ensuring that the trajectory deviation distance of the retained preceding road segment sequence is minimized when the search continues, that is, the distance from a certain target starting road segment to the tail element of the retained preceding road segment sequence is minimized, thereby achieving a local optimal effect, reducing the additional overhead caused by unnecessary search processes, and avoiding waste of computing resources.
[0120] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment. In this embodiment, the process of determining the trajectory to be matched is described in detail.
[0121] See also Figure 6 The steps of determining the trajectory to be matched shown include:
[0122] S610: Acquire an original driving trajectory collected by any vehicle.
[0123] Among them, the original driving trajectory consists of multiple adjacent trajectory points.
[0124] S620: If the acquisition time difference between adjacent trajectory points in the original driving trajectory is greater than the first time length threshold, or the distance between adjacent trajectory points is greater than the fourth preset distance threshold, the original driving trajectory is segmented according to the adjacent trajectory points to obtain at least two trajectories to be matched.
[0125] Exemplarily, in this embodiment, the acquisition time difference between each adjacent trajectory point in the original driving trajectory is determined, and when the time difference is greater than the first duration threshold, the adjacent trajectory points are segmented; the distance between each adjacent trajectory point in the original trajectory can also be determined, and when the distance is greater than a fourth preset distance threshold, the adjacent trajectory points are segmented; a trajectory segment with the previous trajectory point in the adjacent trajectory points as the end point and a trajectory segment with the next trajectory point in the adjacent trajectory points as the starting point are obtained, and each trajectory segment is used as a trajectory to be matched.
[0126] It should be noted that the first duration threshold and the fourth preset distance threshold can be determined based on manual experience or through a large number of experiments, and this application does not impose any limitation on this. For example, the first duration threshold can be 0.5 seconds, and the fourth preset distance threshold can be 3 meters.
[0127] Furthermore, in order to improve the referenceability of the track to be matched, in this embodiment, if the length of the track segment obtained by segmentation is less than a preset length threshold, the track segment is eliminated. The preset length threshold can be determined based on manual experience or through a large number of experiments, and this application does not impose any limitation on this. For example, the preset length threshold can be 5 meters.
[0128] In the above embodiment, the process of determining the trajectory to be matched is described in detail, making the road network matching method of the present application more complete. Furthermore, in the process of determining the trajectory to be matched, the acquisition time and distance between adjacent trajectory points are considered, making the trajectory to be matched more referenceable.
[0129] In order to facilitate those skilled in the art to understand the present solution, the road network matching provided in this application should be introduced in detail.
[0130] See also Figure 7 The road network matching method shown includes:
[0131] S701, obtaining an original driving trajectory collected by any vehicle.
[0132] S702, sorting the track points of the original driving track in ascending time order to obtain a track point list.
[0133] S703, traverse the trajectory point list to determine the time difference and distance between two adjacent trajectory points. If the time difference is greater than T or the distance is greater than D, split it to obtain at least two candidate trajectories to be matched.
[0134] For example, T may be 0.5 seconds and D may be 3 meters.
[0135] S704: Determine a trajectory to be matched according to the trajectory lengths of at least two candidate trajectories to be matched.
[0136] The trajectory length of the trajectory to be matched is greater than a preset length threshold. For example, the preset length threshold may be 5 meters.
[0137] S705 : Determine at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched.
[0138] Specifically, a circular surface is constructed with the starting point of the trajectory to be matched as the center and R as the radius, and all sections that intersect with the circular surface are used as candidate starting sections; the projection position of each candidate starting section on the trajectory to be matched is used as the common trajectory section corresponding to the corresponding candidate starting section on the trajectory to be matched. If the vector angle between the common trajectory section corresponding to the candidate starting section on the trajectory to be matched and the candidate starting section is less than the preset angle threshold, the candidate starting section is used as the target starting section.
[0139] A circular surface is constructed with the end point of the trajectory to be matched as the center and R as the radius, and all sections that intersect with the circular surface are regarded as candidate end sections; the projection position of each candidate end section on the trajectory to be matched is regarded as the common trajectory section corresponding to the corresponding candidate end section on the trajectory to be matched. If the vector angle between the common trajectory section corresponding to the candidate end section on the trajectory to be matched and the candidate end section is less than the preset angle threshold, the candidate end section is regarded as the target end section. Among them, R can be 12 meters, and the preset angle threshold can be 70 degrees.
[0140] S706, adding each target starting road segment to a queue to be matched.
[0141] S707, based on the breadth-first search algorithm, taking out a queue element from the queue to be matched as the road section to be matched.
[0142] S708 , determining a first distance between the road section to be matched and the trajectory to be matched according to the area of the target region, the road length of the road section to be matched, and the trajectory length of the common trajectory segment corresponding to the road section to be matched on the trajectory to be matched.
[0143] The formula for determining the first distance may be as follows:
[0144] ;
[0145] Where, d is the first distance between the to-be-matched segment and the to-be-matched trajectory; S is the area of the region enclosed between the common trajectory segment corresponding to the to-be-matched segment on the to-be-matched trajectory and the to-be-matched segment; l r is the road length of the road section to be matched; l t It is the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory.
[0146] S709: Determine, based on the search path, a sequence of preceding road segments corresponding to the road segment to be matched in this search process.
[0147] S710, determining the distance weight of the to-be-matched road segment according to the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory and the proportion of each to-be-matched road segment in the previous road segment sequence in the total trajectory length of the common trajectory segment corresponding to the to-be-matched trajectory on the to-be-matched trajectory.
[0148] S711, determining a trajectory deviation distance corresponding to the preceding road segment sequence according to the distance weight of each to-be-matched road segment in the preceding road segment sequence and the first distance between each to-be-matched road segment and the to-be-matched trajectory.
[0149] Among them, the formula for determining the trajectory deviation distance can be as follows:
[0150] ;
[0151] Where D is the trajectory deviation distance corresponding to the previous road segment sequence; l ti is the trajectory length of the common trajectory segment corresponding to the to-be-matched segment i on the to-be-matched trajectory in the previous segment sequence. i is the first distance between the to-be-matched segment i and the to-be-matched trajectory in the preceding segment sequence.
[0152] S712, determine whether the state dictionary library has stored a preceding road segment sequence corresponding to the road segment to be matched; if so, execute S713A; otherwise, execute S713B.
[0153] S713A, determine whether the trajectory deviation distance of the current preceding road segment sequence is smaller than the trajectory deviation distance of the stored preceding road segment sequence for comparison; if so, execute S714A; otherwise, execute S714B.
[0154] S713B, using the to-be-matched road segment as the key domain, the current preceding road segment sequence and the corresponding trajectory deviation distance as the value domain, and storing them in the state dictionary library; and continuing to execute S715.
[0155] S714A, replace the value range corresponding to the to-be-matched road segment with the current preceding road segment sequence and the corresponding trajectory deviation distance.
[0156] S714B, end this search process; continue to execute S718.
[0157] S715, determine whether the road segment to be matched this time is the target end road segment; if so, execute S714B; otherwise, execute S716.
[0158] S716, determine whether there is an escape road that meets the matching conditions in the to-be-matched road segment; if so, execute S717; otherwise, execute S718.
[0159] S717, adding the escape road to the queue to be matched; returning to execute S707.
[0160] S718, determine whether the queue to be matched is empty; if so, execute S719; otherwise, return to execute S707.
[0161] S719, selecting a preceding road segment sequence with the smallest trajectory deviation distance from each preceding road segment sequence whose tail element is a target termination road segment as a target road sequence.
[0162] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0163] Based on the same inventive concept, the embodiment of the present application also provides a road network matching device for implementing the road network matching method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more road network matching device embodiments provided below can refer to the limitations on the road network matching method above, and will not be repeated here.
[0164] In an exemplary embodiment, Figure 8 As shown, a road network matching device is provided, including: a first determination module 810, a second determination module 820 and a selection module 830, wherein:
[0165] The first determination module 810 is used to determine at least one target starting segment and at least one target ending segment of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched.
[0166] The second determination module 820 is used to determine the trajectory deviation distance corresponding to the to-be-matched road sequence according to the first distance between each to-be-matched road segment in the to-be-matched road sequence and the to-be-matched trajectory.
[0167] The to-be-matched road segments in the to-be-matched road sequence include any target terminating road segment and each preceding road segment of any target terminating road segment; the first preceding road segment is any target starting road segment.
[0168] The selection module 830 is used to select a target road sequence corresponding to the to-be-matched trajectory from at least one to-be-matched road sequence according to the trajectory deviation distance corresponding to at least one to-be-matched road sequence.
[0169] In one embodiment, the road network matching device includes a first distance determination module, which is used to determine the first distance between the section to be matched and the trajectory to be matched based on the area of the target area, the road length of the section to be matched, and the trajectory length of the common trajectory segment corresponding to the section to be matched on the trajectory to be matched; wherein the area of the target area is the area of the area enclosed between the common trajectory segment corresponding to the section to be matched on the trajectory to be matched and the section to be matched.
[0170] In one embodiment, the second determination module 820 includes a distance weight determination unit, which is used to determine the distance weight of any to-be-matched road segment in the to-be-matched road sequence according to the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory, and the proportion of each to-be-matched road segment in the to-be-matched road sequence in the total trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory; and a trajectory deviation distance determination unit, which is used to determine the trajectory deviation distance corresponding to the to-be-matched road sequence according to the distance weight of each to-be-matched road segment in the to-be-matched road sequence and the first distance between each to-be-matched road segment and the to-be-matched trajectory.
[0171] In one embodiment, the road network matching device includes a road sequence determination module, including a to-be-matched section determination unit, which is used for determining the to-be-matched section in the current search process based on a breadth-first search algorithm according to the matching between the escaped road of the to-be-matched section in the previous search process and the to-be-matched trajectory; wherein the to-be-matched section corresponding to the first search process is the first target starting section; a preceding section sequence determination unit, which is used for determining, according to the search path, a preceding section sequence corresponding to the to-be-matched section in the current search process; wherein the preceding section sequence includes the target starting section corresponding to the to-be-matched section, and the searched section between the target starting section corresponding to the to-be-matched section and the to-be-matched section; and a road sequence determination unit, which is used for, if the to-be-matched section in the current search process is any target terminating section, to use the preceding section sequence corresponding to the to-be-matched section as the to-be-matched road sequence.
[0172] In one embodiment, the road sequence determination module also includes a sequence deletion unit, which is used to delete the associated road segment sequence if the trajectory deviation distance of the preceding road segment sequence is less than the trajectory deviation distance of the associated road segment sequence; a search termination unit, which is used to terminate the current search process if the trajectory deviation distance of the preceding road segment sequence is greater than the trajectory deviation distance of the associated road segment sequence; wherein the associated road segment sequence is a generated preceding road segment sequence, and the tail element in the preceding road segment sequence is the road segment to be matched under this search process; wherein the trajectory deviation distance of the preceding road segment sequence is determined according to the first distance between each searched road segment in the preceding road segment sequence and the trajectory to be matched.
[0173] In one embodiment, when there is a key-value pair whose key domain is a to-be-matched road segment, the sequence deletion unit is specifically used to update the value domain whose key domain is a to-be-matched road segment to the preceding road segment sequence and the corresponding trajectory offset distance under this search process if the trajectory deviation distance of the preceding road segment sequence is less than the trajectory deviation distance of the associated road segment sequence.
[0174] In one embodiment, the unit for determining the road section to be matched is specifically used to determine, for each escape road of the road section to be matched in the previous search process, that the escape road is the road section to be matched in this search process if the second distance between the escape road and the corresponding common trajectory segment of the escape road on the trajectory to be matched is less than a preset distance threshold, and the angle between the escape road and the corresponding common trajectory segment of the escape road on the trajectory to be matched is less than a preset angle threshold.
[0175] Each module in the above-mentioned road network matching device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0176] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, a near field communication (NFC) or other technologies. When the computer program is executed by the processor, a road network matching method is implemented.
[0177] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0178] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0179] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0180] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0181] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0182] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0183] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A road network matching method, characterized in that: include: Determine at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched; For any to-be-matched road segment in the to-be-matched road sequence, determine the distance weight of the to-be-matched road segment according to the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory and the proportion of the total trajectory length of the common trajectory segment corresponding to each to-be-matched road segment in the to-be-matched road sequence on the to-be-matched trajectory; Determining a trajectory deviation distance corresponding to the to-be-matched road sequence according to a distance weight of each to-be-matched road segment in the to-be-matched road sequence and a first distance between each to-be-matched road segment and the to-be-matched trajectory; The to-be-matched road segments in the to-be-matched road sequence include any target termination road segment and each preceding road segment of any target termination road segment; the first preceding road segment is any target starting road segment; the first distance between the to-be-matched road segment and the to-be-matched trajectory is determined in the following manner: according to the target area, the road length of the to-be-matched road segment, and the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory, the first distance between the to-be-matched road segment and the to-be-matched trajectory is determined; wherein the target area is the area of the area enclosed between the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory and the to-be-matched road segment; According to the trajectory deviation distance corresponding to at least one road sequence to be matched, a target road sequence corresponding to the trajectory to be matched is selected from the at least one road sequence to be matched.
2. The method according to claim 1, characterized in that The road sequence to be matched is determined in the following manner: For any search process, based on the breadth-first search algorithm, the road section to be matched in this search process is determined according to the matching between the escape road of the road section to be matched in the previous search process and the trajectory to be matched; wherein the road section to be matched corresponding to the first search process is the first target starting road section; According to the search path, determine the preceding road segment sequence corresponding to the road segment to be matched in this search process; wherein the preceding road segment sequence includes the target starting road segment corresponding to the road segment to be matched, and the searched road segment between the target starting road segment corresponding to the road segment to be matched and the road segment to be matched; If the road segment to be matched in this search process is any target terminating road segment, the preceding road segment sequence corresponding to the road segment to be matched is used as the road sequence to be matched.
3. The method according to claim 2, characterized in that For any search process, the method further includes: If the trajectory deviation distance of the preceding road segment sequence is less than the trajectory deviation distance of the associated road segment sequence, deleting the associated road segment sequence; If the trajectory deviation distance of the preceding road segment sequence is greater than the trajectory deviation distance of the associated road segment sequence, the current search process is terminated; Among them, the associated road segment sequence is a generated preceding road segment sequence, and the tail element in the preceding road segment sequence is the road segment to be matched in this search process; wherein the trajectory deviation distance of the preceding road segment sequence is determined according to the first distance between each searched road segment in the preceding road segment sequence and the trajectory to be matched.
4. The method according to claim 3, characterized in that In the case that there is a key-value pair whose key field is the to-be-matched road segment, if the trajectory deviation distance of the preceding road segment sequence is less than the trajectory deviation distance of the associated road segment sequence, deleting the associated road segment sequence includes: If the trajectory deviation distance of the preceding road segment sequence is less than the trajectory deviation distance of the associated road segment sequence, the value range whose key domain is the road segment to be matched is updated to the preceding road segment sequence and the corresponding trajectory offset distance in this search process.
5. The method according to claim 4, characterized in that The determining of the road section to be matched in the current search process according to the matching between the escaped road of the road section to be matched in the previous search process and the trajectory to be matched comprises: For each escape road of the to-be-matched road segment in the previous search process, if the second distance between the escape road and the corresponding common trajectory segment of the escape road on the to-be-matched trajectory is less than a preset distance threshold, and the angle between the escape road and the corresponding common trajectory segment of the escape road on the to-be-matched trajectory is less than a preset angle threshold, then the escape road is determined to be the to-be-matched road segment in the current search process.
6. The method according to any one of claims 1 to 5, characterized in that The step of determining at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched comprises: Taking each road segment within a first preset range where the starting point of the to-be-matched trajectory is located as at least one candidate starting road segment of the to-be-matched trajectory; If the vector angle between the common trajectory segment of the candidate starting segment on the trajectory to be matched and the candidate starting segment is less than a preset angle threshold, the candidate starting segment is used as the target starting segment; as well as, Taking each road segment within a second preset range where the end point of the to-be-matched trajectory is located as at least one candidate end road segment of the to-be-matched trajectory; If the vector angle between the common trajectory segment of the candidate terminating segment on the trajectory to be matched and the candidate terminating segment is less than a preset angle threshold, the candidate terminating segment is used as the target terminating segment.
7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Obtain the original driving trajectory collected by any vehicle; If the acquisition time difference between adjacent trajectory points in the original driving trajectory is greater than a first time length threshold, or the distance between adjacent trajectory points is greater than a second distance threshold, the original driving trajectory is segmented according to the adjacent trajectory points to obtain at least two trajectories to be matched.
8. A road network matching device, characterized in that: include: A first determination module, configured to determine at least one target starting section and at least one target ending section of the trajectory to be matched according to the trajectory endpoints of the trajectory to be matched; The second determination module is used to determine, for any to-be-matched road segment in the to-be-matched road sequence, the distance weight of the to-be-matched road segment according to the trajectory length of the common trajectory segment corresponding to the to-be-matched road segment on the to-be-matched trajectory, and the proportion of the total trajectory length of the common trajectory segment corresponding to each to-be-matched road segment in the to-be-matched road sequence in the to-be-matched road sequence; determine the trajectory deviation distance corresponding to the to-be-matched road sequence according to the distance weight of each to-be-matched road segment in the to-be-matched road sequence and the first distance between each to-be-matched road segment and the to-be-matched trajectory; wherein, the to-be-matched road segment in the to-be-matched road sequence The segment includes any target terminating segment and each preceding segment of the any target terminating segment; the first preceding segment is any target starting segment; the first distance between the segment to be matched and the trajectory to be matched is determined in the following manner: according to the target area, the road length of the segment to be matched, and the trajectory length of the common trajectory segment corresponding to the segment to be matched on the trajectory to be matched, the first distance between the segment to be matched and the trajectory to be matched is determined; wherein the target area is the area of the area enclosed between the common trajectory segment corresponding to the segment to be matched on the trajectory to be matched and the segment to be matched; The selection module is used to select a target road sequence corresponding to the to-be-matched trajectory from the at least one to-be-matched road sequence according to a trajectory deviation distance corresponding to the at least one to-be-matched road sequence.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
