Trajectory matching method and device

By preprocessing and matching operations on vehicle trajectories, the accuracy and complexity of trajectory matching in high-precision maps are solved, and efficient road segment and trajectory matching is achieved.

CN112857378BActive Publication Date: 2024-10-29MOMENTA (SUZHOU) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201911171631.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-26
Publication Date
2024-10-29
Estimated Expiration
2039-11-26

AI Technical Summary

Technical Problem

In the process of building high-precision maps, when vehicle trajectories are determined to construct lane lines and lane centerlines, existing technology is difficult to effectively match road segments and trajectories, resulting in high matching accuracy and complexity.

Method used

By obtaining the trajectory to be processed, trajectory point processing is performed to generate alternative trajectory points, and based on matching these points with the target map, observation sub-sections and observation sequences that meet the preset conditions are determined to match road segments. This method includes thinning and encryption operations to optimize the number of trajectory points and improve matching accuracy.

Benefits of technology

It simplifies the trajectory matching process, improves the accuracy and efficiency of matching, reduces computational complexity, and ensures accurate matching of road segments and trajectories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112857378B_ABST
    Figure CN112857378B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a trajectory matching method and device, which includes: obtaining a trajectory to be processed; determining a plurality of spare trajectory points corresponding to the trajectory to be processed based on the position information, arrangement order and preset trajectory point processing operation of a plurality of trajectory points to be processed; determining a map area corresponding to the trajectory to be processed as a map area to be matched based on the position information of the plurality of spare trajectory points and a target map, wherein the map area to be matched includes: at least one observation sub-segment corresponding to the trajectory to be processed; determining an observation sequence corresponding to each spare trajectory point, which includes observation sub-segments that meet preset observation conditions, based on the observation sub-segments in the map area to be matched and the position information of the plurality of spare trajectory points; determining a matching section corresponding to the trajectory to be processed based on each observation sub-segment in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point, so as to achieve matching between the section and the trajectory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a trajectory matching method and device. Background Art

[0002] In the process of constructing a high-precision map of a target scene, in addition to constructing the topological relationship and corresponding location information between the road sections in the target scene, it is also necessary to construct the lane lines of each road section in the target scene and / or the lane center lines of the lane lines of each road section. In the process of constructing a high-precision map of the target scene, it is necessary to use the vehicle trajectory passing through the road section to construct the lane lines of each road section in the target scene and / or the lane center lines of the lane lines of each road section.

[0003] In view of this, in order to construct the lane lines of each road section and / or the lane center lines of each road section in the target scene, it is necessary to determine which vehicles have passed through each road section of the target scene, that is, which vehicle trajectories correspond to each road section; then, for each road section, the vehicle trajectories passing through the road section are used to construct the lane lines in the road section and / or the lane center lines of each road section. Therefore, how to provide a method for determining the vehicle trajectories passing through each road section in the scene is crucial. Summary of the invention

[0004] The present invention provides a trajectory matching method and device to achieve the matching between road segments and trajectories. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a trajectory matching method, comprising:

[0006] Obtaining a trajectory to be processed, wherein the trajectory to be processed includes: a plurality of trajectory points to be processed arranged in chronological order according to corresponding generation time;

[0007] Determine a plurality of spare trajectory points of the trajectory to be processed based on the position information and arrangement order of the plurality of trajectory points to be processed and a preset trajectory point processing operation, wherein the preset trajectory point processing operation is: an operation for increasing or decreasing a trajectory point in the trajectory;

[0008] Based on the location information of the plurality of spare trajectory points and the target map, a map area corresponding to the trajectory to be processed is determined as the map area to be matched, wherein the map area to be matched includes: at least one observation section corresponding to the trajectory to be processed, each observation section including at least one observation sub-section;

[0009] Based on the observation sub-segments in the map area to be matched and the position information of the plurality of spare trajectory points, determining an observation sequence corresponding to each spare trajectory point and including observation sub-segments meeting a preset observation condition from the map area to be matched;

[0010] Based on each observed sub-section in the observed sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point, the matching section corresponding to the to-be-processed trajectory is determined.

[0011] Optionally, the step of determining a plurality of spare trajectory points of the trajectory to be processed based on the position information and arrangement order of the plurality of trajectory points to be processed and a preset trajectory point processing operation includes:

[0012] Based on the arrangement order of the plurality of to-be-processed trajectory points, each to-be-processed trajectory point that has not been traversed currently is traversed in turn, and the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points is accumulated and calculated as the current thinning distance, wherein the current accumulated trajectory points include: the to-be-processed trajectory point that is currently traversed, the current reference trajectory point, and the to-be-processed trajectory point between the two, and the current reference trajectory point is: the first to-be-processed trajectory point of the to-be-processed trajectory, or the to-be-processed trajectory point that meets the preset thinning condition with the previous reference trajectory point;

[0013] Determine whether the current thinning distance is less than a preset thinning distance threshold, and whether the current number of accumulated trajectory points is not less than a preset thinning number threshold;

[0014] If it is determined that the current thinning distance is less than the preset thinning distance threshold, and the number of the current accumulated trajectory points is not less than the preset thinning number threshold; or, if it is determined that the current thinning distance is not less than the preset thinning distance threshold, and the number of the current accumulated trajectory points is less than the preset thinning number threshold, then the pending trajectory points between the currently traversed pending trajectory points and the current reference trajectory points are deleted, and the currently traversed pending trajectory points are retained as new current reference trajectory points;

[0015] Return to executing the arrangement order of the multiple trajectory points to be processed, traverse each trajectory point to be processed that has not been traversed in turn, and accumulate and calculate the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points as the current thinning distance step, until the last trajectory point to be processed of the trajectory to be processed is traversed, and the last trajectory point to be processed is retained to obtain multiple spare trajectory points of the trajectory to be processed.

[0016] Optionally, before the step of traversing each of the currently untraversed trajectory points in turn based on the arrangement order of the plurality of trajectory points to be processed, and accumulating the sum of the distances between each two adjacent trajectory points in the currently accumulated trajectory points as the current thinning distance, the method further includes:

[0017] Determine whether the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is greater than a preset frequency threshold;

[0018] If it is determined that the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is greater than the preset frequency threshold, the arrangement order of the multiple trajectory points to be processed is executed, each trajectory point to be processed that has not been traversed currently is traversed in turn, and the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points is accumulated as the current thinning distance step.

[0019] Optionally, the method further includes:

[0020] If it is determined that the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is not greater than the preset frequency threshold, based on the position information and arrangement order of the multiple trajectory points to be processed and the preset point encryption algorithm, at least one trajectory point is added between every two adjacent trajectory points to be processed to determine the multiple backup trajectory points corresponding to the trajectory to be processed.

[0021] Optionally, the map area to be matched is: a map area mapped to a preset plane; the position information of the plurality of spare track points is: position information mapped to the preset plane;

[0022] The step of determining, from the map area to be matched, an observation sequence corresponding to each spare trajectory point and including an observation sub-segment meeting a preset observation condition, comprises:

[0023] For each spare trajectory point, based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point, determine the observation direction corresponding to the spare trajectory point, wherein the observation direction points to: the trajectory point generated later in the spare trajectory point and its corresponding reference trajectory point; if the spare trajectory point is the first spare trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the spare trajectory point is the next spare trajectory point of the spare trajectory point; if the spare trajectory point is not the first spare trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the spare trajectory point is the previous spare trajectory point of the spare trajectory point;

[0024] For each spare trajectory point, based on the directions corresponding to the observation sub-segments in the to-be-matched map area and the observation direction corresponding to the spare trajectory point, determine the angular deviation between the spare trajectory point and the observation sub-segments in the to-be-matched map area;

[0025] For each spare trajectory point, based on the position information of each observed sub-segment in the map area to be matched and the position information of the spare trajectory point, determine the distance from the spare trajectory point to each observed sub-segment in the map area to be matched;

[0026] For each backup trajectory point, based on the angular deviation between the backup trajectory point and each observation sub-segment in the map area to be matched, the distance from the backup trajectory point to each observation sub-segment in the map area to be matched, the observation angle threshold and the observation distance threshold, determine the observation sequence corresponding to the backup trajectory point that includes the observation sub-segments that meet the preset observation conditions.

[0027] Optionally, the step of determining the observation direction corresponding to the spare trajectory point based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point includes:

[0028] For each spare track point, determining whether the spare track point is the first spare track point of the track to be used;

[0029] If it is determined that the backup trajectory point is the first backup trajectory point of the to-be-used trajectory, the backup trajectory point after the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point; based on the position information of the backup trajectory point and the position information of the reference trajectory point corresponding to the backup trajectory point, the observation direction corresponding to the backup trajectory point is determined;

[0030] If it is determined that the backup trajectory point is a non-first backup trajectory point of the to-be-used trajectory, based on the backup trajectory point and its previous backup trajectory point, the road section direction corresponding to the backup trajectory point is determined, wherein the road section direction points to the previous backup trajectory point of the backup trajectory point;

[0031] Determine whether the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the bend angle threshold;

[0032] If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point does not exceed the curve angle threshold, the previous backup trajectory point of the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point;

[0033] Determine the observation direction corresponding to the spare trajectory point based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point;

[0034] If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the curve angle threshold, the previous backup trajectory point of the backup trajectory point and the next backup trajectory point of the backup trajectory point are determined as reference trajectory points corresponding to the backup trajectory point;

[0035] Based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point, the observation direction corresponding to the spare trajectory point is determined.

[0036] Optionally, the step of determining the matching section corresponding to the to-be-processed trajectory based on each observed sub-section in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point includes:

[0037] Based on a preset Viterbi algorithm, each observation sub-section in the observation sequence corresponding to each spare trajectory point, and the arrangement order between each spare trajectory point, the matching section corresponding to the to-be-processed trajectory is determined.

[0038] Optionally, after the step of determining the matching section corresponding to the to-be-processed trajectory based on each observed sub-section in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point, the method further includes:

[0039] Determining a first spare track point and a last spare track point of the track to be processed from the plurality of spare track points;

[0040] From each observation sub-section in the observation sequence corresponding to the endpoint spare trajectory point, determine the observation sub-section where the perpendicular foot corresponding to the endpoint spare trajectory point exists as the second observation sub-section, wherein the endpoint spare trajectory point is the first spare trajectory point or the last spare trajectory point;

[0041] Determine whether there is a current observation sub-segment in the second observation sub-segment that is connected to the matching sub-segment corresponding to the endpoint backup trajectory point, wherein the matching sub-segment corresponding to the endpoint backup trajectory point belongs to the matching segment corresponding to the trajectory to be processed;

[0042] If it is determined to exist, the current observed sub-section is added to the matching section corresponding to the trajectory to be processed;

[0043] Continue to determine whether there is a new current observation sub-section in the second observation sub-section that is connected to the current observation sub-section;

[0044] If it is determined that there is a new current observation sub-segment in the second observation sub-segment that is connected to the current observation sub-segment, the process returns to the step of adding the current observation sub-segment to the matching segment corresponding to the trajectory to be processed.

[0045] Optionally, before the step of determining a map area corresponding to the to-be-processed trajectory based on the location information of the plurality of spare trajectory points and the target map as the map area to be matched, the method further includes:

[0046] The process of obtaining a target map includes:

[0047] Obtaining an initial map, wherein the initial map includes a plurality of road segments;

[0048] Traversing the initial map, and determining the forks contained in the initial map;

[0049] For each determined fork in the road, the road sections connected by the fork in the road are identified as different road sections to obtain the target map.

[0050] In a second aspect, an embodiment of the present invention provides a trajectory matching device, the device comprising:

[0051] A first obtaining module is configured to obtain a trajectory to be processed, wherein the trajectory to be processed includes: a plurality of trajectory points to be processed arranged in chronological order according to corresponding generation time;

[0052] A first determination module is configured to determine a plurality of spare trajectory points corresponding to the trajectory to be processed based on the position information and arrangement order of the plurality of trajectory points to be processed and a preset trajectory point processing operation, wherein the preset trajectory point processing operation is an operation for increasing or decreasing a trajectory point in the trajectory;

[0053] A second determination module is configured to determine, based on the location information of the plurality of backup trajectory points and the target map, a map area corresponding to the trajectory to be processed as a map area to be matched, wherein the map area to be matched includes: at least one observation section corresponding to the trajectory to be processed, each observation section including at least one observation sub-section;

[0054] A third determination module is configured to determine, from the map area to be matched, an observation sequence corresponding to each spare trajectory point and including an observation sub-segment meeting a preset observation condition based on the observation sub-segment in the map area to be matched and the position information of the plurality of spare trajectory points;

[0055] The fourth determination module is configured to determine the matching section corresponding to the to-be-processed trajectory based on each observed sub-section in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point.

[0056] Optionally, the first determining module includes:

[0057] The cumulative calculation unit is configured to traverse each of the currently untraversed trajectory points in turn based on the arrangement order of the multiple trajectory points to be processed, and cumulatively calculate the sum of the distances between each two adjacent trajectory points in the current cumulative trajectory points as the current thinning distance, wherein the current cumulative trajectory points include: the currently traversed trajectory points to be processed, the current reference trajectory points, and the trajectory points to be processed between the two, and the current reference trajectory point is: the first trajectory point to be processed of the trajectory to be processed, or the trajectory point to be processed that meets the preset thinning condition with the previous reference trajectory point;

[0058] A first judgment calculation unit is configured to judge whether the current thinning distance is less than a preset thinning distance threshold, and whether the current number of accumulated trajectory points is not less than a preset thinning number threshold;

[0059] A deletion and retention unit is configured to delete the pending trajectory point between the currently traversed pending trajectory point and the current reference trajectory point if it is determined that the current thinning distance is less than the preset thinning distance threshold and the number of the currently accumulated trajectory points is not less than the preset thinning number threshold; or if it is determined that the current thinning distance is not less than the preset thinning distance threshold and the number of the currently accumulated trajectory points is less than the preset thinning number threshold, and retain the currently traversed pending trajectory point as a new current reference trajectory point;

[0060] The accumulating calculation unit is triggered back until the last trajectory point to be processed of the trajectory to be processed is traversed, and the last trajectory point to be processed is retained to obtain a plurality of spare trajectory points of the trajectory to be processed.

[0061] Optionally, the first determining module further includes:

[0062] The second judgment unit is configured to, based on the arrangement order of the plurality of trajectory points to be processed, sequentially traverse each trajectory point to be processed that has not been traversed currently, and before accumulating and calculating the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points as the current thinning distance, determine whether the acquisition frequency of the trajectory point corresponding to the trajectory to be processed is greater than a preset frequency threshold;

[0063] If it is determined that the acquisition frequency of the trajectory points corresponding to the to-be-processed trajectory is greater than the preset frequency threshold, the accumulation calculation unit is triggered.

[0064] Optionally, the first determining module further includes:

[0065] The first determination unit is configured to add at least one trajectory point between each two adjacent trajectory points to be processed, if it is determined that the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is not greater than the preset frequency threshold, based on the position information and arrangement order of the multiple trajectory points to be processed and the preset point encryption algorithm, to determine the multiple backup trajectory points corresponding to the trajectory to be processed.

[0066] Optionally, the map area to be matched is: a map area mapped to a preset plane; the position information of the plurality of spare track points is: position information mapped to the preset plane;

[0067] The third determining module comprises:

[0068] The second determining unit is configured to determine, for each spare trajectory point, an observation direction corresponding to the spare trajectory point based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point, wherein the observation direction points to: a trajectory point generated later in time between the spare trajectory point and its corresponding reference trajectory point; if the spare trajectory point is the first spare trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the spare trajectory point is the next spare trajectory point of the spare trajectory point; if the spare trajectory point is a non-first spare trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the spare trajectory point is the previous spare trajectory point of the spare trajectory point;

[0069] A third determining unit is configured to determine, for each spare trajectory point, an angular deviation between the spare trajectory point and each observed sub-segment in the map area to be matched based on the directions corresponding to the observed sub-segments in the map area to be matched and the observed direction corresponding to the spare trajectory point;

[0070] a fourth determining unit configured to determine, for each spare trajectory point, a distance from the spare trajectory point to each observed sub-segment in the map area to be matched based on the position information of each observed sub-segment in the map area to be matched and the position information of the spare trajectory point;

[0071] The fifth determination unit is configured to determine, for each backup trajectory point, an observation sequence corresponding to the backup trajectory point that includes observation sub-segments that meet preset observation conditions based on the angular deviation between the backup trajectory point and each observation sub-segment in the map area to be matched, the distance from the backup trajectory point to each observation sub-segment in the map area to be matched, the observation angle threshold and the observation distance threshold.

[0072] Optionally, the second determining unit is specifically configured to determine, for each spare trajectory point, whether the spare trajectory point is the first spare trajectory point of the trajectory to be used;

[0073] If it is determined that the backup trajectory point is the first backup trajectory point of the to-be-used trajectory, the backup trajectory point after the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point; based on the position information of the backup trajectory point and the position information of the reference trajectory point corresponding to the backup trajectory point, the observation direction corresponding to the backup trajectory point is determined;

[0074] If it is determined that the backup trajectory point is a non-first backup trajectory point of the to-be-used trajectory, based on the backup trajectory point and its previous backup trajectory point, the road section direction corresponding to the backup trajectory point is determined, wherein the road section direction points to the previous backup trajectory point of the backup trajectory point;

[0075] Determine whether the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the bend angle threshold;

[0076] If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point does not exceed the curve angle threshold, the previous backup trajectory point of the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point;

[0077] Determine the observation direction corresponding to the spare trajectory point based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point;

[0078] If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the curve angle threshold, the previous backup trajectory point of the backup trajectory point and the next backup trajectory point of the backup trajectory point are determined as reference trajectory points corresponding to the backup trajectory point;

[0079] Based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point, the observation direction corresponding to the spare trajectory point is determined.

[0080] Optionally, the fourth determination module is specifically configured to determine the matching section corresponding to the to-be-processed trajectory based on a preset Viterbi algorithm, each observation sub-section in the observation sequence corresponding to each spare trajectory point, and the arrangement order between each spare trajectory point.

[0081] Optionally, the device further comprises:

[0082] a fifth determination module, configured to determine the first spare trajectory point and the last spare trajectory point of the to-be-processed trajectory from the plurality of spare trajectory points after determining the matching segment corresponding to the to-be-processed trajectory based on each observation sub-segment in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point;

[0083] a sixth determination module, configured to determine, from each observation sub-section in the observation sequence corresponding to the endpoint spare trajectory point, an observation sub-section having a perpendicular foot corresponding to the endpoint spare trajectory point as a second observation sub-section, wherein the endpoint spare trajectory point is a first spare trajectory point or a last spare trajectory point;

[0084] A first judgment module is configured to judge whether there is a current observation sub-segment in the second observation sub-segment that is connected to the matching sub-segment corresponding to the endpoint backup trajectory point, wherein the matching sub-segment corresponding to the endpoint backup trajectory point belongs to the matching segment corresponding to the trajectory to be processed;

[0085] An adding module is configured to add the currently observed sub-segment to the matching segment corresponding to the trajectory to be processed if it is determined to exist;

[0086] A second judgment module is configured to continue to judge whether there is a new current observation sub-section in the second observation sub-section that is connected to the current observation sub-section;

[0087] If it is determined that there is a new current observation sub-segment in the second observation sub-segment that is connected to the current observation sub-segment, the adding module is returned and triggered.

[0088] Optionally, the device further comprises:

[0089] A second obtaining module is configured to obtain a target map before the step of determining the map area corresponding to the to-be-processed trajectory as the to-be-matched map area based on the location information of the plurality of spare trajectory points and the target map, wherein the second obtaining module is specifically configured to obtain an initial map, wherein the initial map includes a plurality of road segments;

[0090] Traversing the initial map, and determining the forks contained in the initial map;

[0091] For each determined fork in the road, the road sections connected by the fork in the road are identified as different road sections to obtain the target map.

[0092] As can be seen from the above content, a trajectory matching method and device provided by an embodiment of the present invention can obtain a trajectory to be processed, wherein the trajectory to be processed includes: a plurality of trajectory points to be processed arranged in chronological order according to the corresponding generation time; based on the position information of the plurality of trajectory points to be processed and their arrangement order and a preset trajectory point processing operation, a plurality of spare trajectory points corresponding to the trajectory to be processed are determined, wherein the preset trajectory point processing operation is: an operation for increasing or decreasing trajectory points in the trajectory; based on the position information of the plurality of spare trajectory points and the target map, a map area corresponding to the trajectory to be processed is determined as a map area to be matched, wherein the map area to be matched includes: at least one observation section corresponding to the trajectory to be processed, each observation section including at least one observation sub-section; based on the observation sub-sections in the map area to be matched and the position information of the plurality of spare trajectory points, an observation sequence corresponding to each spare trajectory point and containing observation sub-sections meeting preset observation conditions is determined from the map area to be matched; based on each observation sub-section in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point, a matching section corresponding to the trajectory to be processed is determined.

[0093] By applying the embodiment of the present invention, the preset trajectory point processing operation can be first performed on the trajectory points to be processed in the trajectory to be processed, that is, the trajectory points to be processed in the trajectory to be processed can be increased or decreased to obtain multiple spare trajectory points that are convenient for the subsequent trajectory matching process; and the determined map area to be matched includes an observation section containing at least one observation sub-section, so as to simplify the difficulty of determining the observation sequence including the observation sub-section corresponding to each spare trajectory point in the subsequent determination, and to improve the accuracy of the observation sub-section corresponding to each spare trajectory point to a certain extent, and then based on the observation sub-section corresponding to each spare trajectory point with higher accuracy and the arrangement order between each spare trajectory point, the matching section corresponding to the trajectory to be processed with higher accuracy is determined, so as to achieve the matching of the section and the trajectory and improve the matching accuracy to a certain extent. Of course, any product or method implementing the present invention does not necessarily need to achieve all the advantages described above at the same time.

[0094] The innovative features of the embodiments of the present invention include:

[0095] 1. First, a preset trajectory point processing operation can be performed on the trajectory points to be processed in the trajectory to be processed, that is, the trajectory points to be processed in the trajectory to be processed can be increased or decreased to obtain a plurality of spare trajectory points that are convenient for the subsequent trajectory matching process; and the determined map area to be matched includes an observation section containing at least one observation sub-section, so as to simplify the difficulty of determining the observation sequence including the observation sub-section corresponding to each spare trajectory point in the subsequent determination, and to improve the accuracy of the observation sub-section corresponding to each spare trajectory point to a certain extent, and then based on the observation sub-section corresponding to each spare trajectory point with higher accuracy and the arrangement order between each spare trajectory point, the matching section corresponding to the trajectory to be processed with higher accuracy is determined, so as to achieve the matching of the section and the trajectory and to improve the matching accuracy to a certain extent.

[0096] 2. Thinning out multiple pending track points in the pending track to be processed can reduce the complexity and computational complexity of the subsequent track matching process to a certain extent. In addition, referring to the characteristics that the vehicle travels slowly on a curve and relatively quickly on a straight road, corresponding thinning conditions are set. When it is judged that the current thinning distance is less than the preset thinning distance threshold, and the number of currently accumulated track points is not less than the preset thinning number threshold, it can be considered that the track segment of the pending track is generated when the vehicle is traveling on a curve. At this time, the currently traversed pending track points corresponding to the current thinning distance can be retained, and the subsequent thinning process can be performed. When it is judged that the current thinning distance is not less than the preset thinning distance threshold, and the number of currently accumulated track points is less than the preset thinning number threshold, it can be considered that the track segment of the pending track is generated when the vehicle is traveling on a straight road. Considering that in order to ensure the subsequent matching results, the number of track points used for matching should not be too small, at this time, the currently traversed pending track points corresponding to the current thinning distance can be retained, and the subsequent thinning process can be performed.

[0097] 3. When it is determined that the frequency of obtaining the trajectory points corresponding to the to-be-processed trajectory is greater than the preset frequency threshold, the to-be-processed trajectory points in the to-be-processed trajectory are thinned, that is, the trajectory points in the to-be-processed trajectory are reduced to simplify the complexity and calculation amount of the subsequent trajectory matching process, and when it is determined that the frequency of obtaining the trajectory points corresponding to the to-be-processed trajectory is not greater than the preset frequency threshold, the trajectory points in the to-be-processed trajectory are increased to ensure that there are enough trajectory points for road section matching and improve the matching accuracy.

[0098] 4. When determining the observation sub-section corresponding to each backup trajectory point, for the first backup trajectory point in the first position, use the position information of the next backup trajectory point to determine its corresponding observation direction, so as to determine the observation sub-section corresponding to the first backup trajectory point, so as to improve the accuracy of the matching results of the determined trajectory and section to a certain extent.

[0099] 5. When it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the bend angle threshold, that is, the backup trajectory point is generated when the vehicle is turning, in order to avoid missing the observed road section, the previous backup trajectory point and the next backup trajectory point of the backup trajectory point are used to jointly determine the observation direction corresponding to the backup trajectory point to ensure the integrity of the determined observation sub-section, thereby ensuring the accuracy of the subsequent trajectory and road section matching results.

[0100] 6. In view of the fact that in many cases, the trajectory of the vehicle may not completely cover the first section and / or the last section that the vehicle actually traveled, that is, the first section and / or the last section that the vehicle actually traveled may be lost in the matching section corresponding to the pending trajectory. In order to avoid the above situation, after determining the matching section corresponding to the pending trajectory, from each observation sub-section in the observation sequence corresponding to the endpoint spare trajectory point, determine the second observation sub-section with the perpendicular foot corresponding to the endpoint spare trajectory point, and determine whether there is a current observation sub-section in the second observation sub-section that has a connection relationship with the matching sub-section corresponding to the endpoint spare trajectory point. If so, add the current observation sub-section to the matching section corresponding to the pending trajectory. Similarly, from the second observation sub-section with the perpendicular foot corresponding to the endpoint spare trajectory point, determine the current observation sub-section that has a connection relationship with the first matching sub-section or the last matching sub-section in the matching section corresponding to the pending trajectory, and add it to the matching section corresponding to the pending trajectory, so as to optimize the matching section and improve the accuracy of the matching result.

[0101] 7. The latest initial map can be obtained in real time, and then the sections connected by the forks in the initial map can be interrupted and marked as different sections, so as to improve the accuracy of the subsequent matching results of the trajectory and the section to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0102] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.

[0103] Figure 1 A schematic diagram of a flow chart of a trajectory matching method provided by an embodiment of the present invention;

[0104] Figure 2 Another flow chart of the trajectory matching method provided by the embodiment of the present invention

[0105] Figure 3 A schematic diagram of the structure of a trajectory matching device provided in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0107] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0108] The present invention provides a trajectory matching method and device to achieve the matching between a road segment and a trajectory. The embodiments of the present invention are described in detail below.

[0109] Figure 1 A schematic flow chart of a trajectory matching method provided by an embodiment of the present invention. The method may include the following steps:

[0110] S101: Obtain a trajectory to be processed.

[0111] The trajectory to be processed includes: a plurality of trajectory points to be processed arranged in chronological order according to the corresponding generation time.

[0112] In the embodiment of the present invention, the method can be applied to any type of electronic device with computing capability, and the electronic device can be a server or a terminal device. The electronic device can be arranged in a vehicle, i.e., an on-board device, or it can be not arranged in a vehicle, i.e., an off-board device.

[0113] The electronic device can obtain the driving trajectory generated during the driving of the vehicle as a trajectory to be processed. The trajectory to be processed includes a plurality of trajectory points to be processed arranged in chronological order according to the corresponding generation time, and each trajectory point to be processed corresponds to position information. In one case, the position information of each trajectory point to be processed includes latitude and longitude information and elevation information.

[0114] S102: Based on the position information of the plurality of trajectory points to be processed and their arrangement order and the preset trajectory point processing operation, determine a plurality of spare trajectory points of the trajectory to be processed.

[0115] The preset trajectory point processing operation is an operation for increasing or decreasing trajectory points in the trajectory.

[0116] In this step, considering that the time for collecting and transmitting the trajectory to be processed is short, after obtaining the trajectory to be processed, directly using the unprocessed trajectory points for the subsequent trajectory matching process is prone to trajectory jitter, resulting in excessive deviation in the observation direction corresponding to the subsequent determined spare trajectory points. After the electronic device obtains the trajectory to be processed, it can first perform a preset trajectory point processing operation on the trajectory points to be processed included in the trajectory to be processed, that is, perform a thinning operation or an encryption operation on multiple trajectory points to be processed to determine multiple spare trajectory points for the trajectory points to be processed.

[0117] In one case, the electronic device can determine the specific operation to be performed on the track points to be processed in the track to be processed based on the acquisition frequency of the track points corresponding to the track to be processed. When it is determined that the acquisition frequency of the track points corresponding to the track to be processed is high, that is, the track points to be processed are dense, it can be determined to perform a thinning operation on the track points to be processed. The thinning operation can reduce the number of track points in the track to be processed and simplify the complexity of subsequent track and road segment matching; when it is determined that the acquisition frequency of the track points corresponding to the track to be processed is low, that is, the track points to be processed are sparse, it can be determined to perform an encryption operation on the track points to be processed. The encryption operation can increase the number of track points in the track to be processed to ensure the accuracy of the subsequent track and road segment matching results and avoid missing matching sections.

[0118] In one implementation, there are various types of thinning operations for the pending trajectory points, as long as the number of trajectory points in the pending trajectory can be reduced. For example, the pending trajectory points can be thinned uniformly, that is, starting from the first pending trajectory point in the pending trajectory, traversing the pending trajectory points, determining a reserved trajectory point every preset number of pending trajectory points, determining the first pending trajectory point, the last pending trajectory point and the reserved trajectory point as multiple spare trajectory points of the pending trajectory; deleting the first pending trajectory point, the last pending trajectory point and other pending trajectory points except the reserved trajectory point from the pending trajectory.

[0119] In one case, there are inevitably trajectory segments representing the vehicle driving on a curved road in the trajectory to be processed. Considering the characteristics that the vehicle drives slowly on a curved road and relatively quickly on a straight road, in order to ensure the accuracy of subsequent matching results, it is necessary to avoid the situation where the number of trajectory points representing the vehicle driving on a curved road in the trajectory to be processed is too small or does not exist, which affects the subsequent matching results.

[0120] In an implementation of the present invention, the S102 may include the following steps 011-013:

[0121] Step 011: Based on the arrangement order of multiple trajectory points to be processed, traverse each trajectory point to be processed that has not been traversed in turn, and accumulate and calculate the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points as the current thinning distance.

[0122] Among them, the current accumulated trajectory points include: the currently traversed pending trajectory points, the current reference trajectory points and the pending trajectory points between them. The current reference trajectory point is: the first pending trajectory point of the pending trajectory, or the pending trajectory point that meets the preset thinning conditions between the previous reference trajectory point.

[0123] Step 012: Determine whether the current thinning distance is less than a preset thinning distance threshold, and whether the current accumulated number of trajectory points is not less than a preset thinning number threshold.

[0124] Step 013: If it is determined that the current thinning distance is less than the preset thinning distance threshold, and the current number of accumulated trajectory points is not less than the preset thinning number threshold; or, if it is determined that the current thinning distance is not less than the preset thinning distance threshold, and the current number of accumulated trajectory points is less than the preset thinning number threshold, then delete the pending trajectory points between the currently traversed pending trajectory points and the current reference trajectory points, and retain the currently traversed pending trajectory points as the new current reference trajectory points.

[0125] Return to step 011 until the last trajectory point to be processed of the trajectory to be processed is traversed, and the last trajectory point to be processed is retained to obtain multiple spare trajectory points of the trajectory to be processed.

[0126] In this implementation, a preset thinning condition may be pre-set, wherein the preset thinning condition may include: the current thinning distance corresponding to the currently traversed pending track point is less than the preset thinning distance threshold, and the number of currently accumulated track points corresponding to the currently traversed pending track point is not less than the preset thinning number threshold; or the current thinning distance corresponding to the currently traversed pending track point is not less than the preset thinning distance threshold, and the number of currently accumulated track points corresponding to the currently traversed pending track point is less than the preset thinning number threshold. Based on the preset thinning condition, the pending track points that need to be retained are determined from the pending track points between the first pending track point and the last pending track point of the pending track; and then the multiple spare track points corresponding to the pending track are determined using the determined pending track points that need to be retained, the first pending track point and the last pending track point.

[0127] The first pending trajectory point is the first pending trajectory point in the pending trajectory, and the last pending trajectory point is the last pending trajectory point in the pending trajectory.

[0128] The preset thinning distance threshold and the preset thinning distance threshold can be set according to actual conditions. In one case, they can be set according to the trajectory return interval, which is the time interval for the vehicle to upload its collected trajectory to the electronic device when the trajectory collected by the vehicle is obtained in real time.

[0129] In the process of determining the pending trajectory points that need to be retained, the electronic device, based on the arrangement order of the plurality of pending trajectory points, starts from the first pending trajectory point as the current reference trajectory point, and sequentially traverses each pending trajectory point. Each time a pending trajectory point is traversed, the distance between the currently traversed pending trajectory point and the current reference trajectory point is cumulatively calculated, that is, the current reference trajectory point, the currently traversed pending trajectory point and the trajectory point between the two, that is, the sum of the distances between each two adjacent trajectory points in the currently accumulated trajectory points is cumulatively calculated as the current thinning distance; and the number of currently accumulated trajectory points is counted; and whether the currently traversed pending trajectory point and the current reference trajectory point meet the preset thinning condition, that is, whether the current Whether the thinning distance is less than the preset thinning distance threshold, and whether the current number of accumulated trajectory points is not less than the preset thinning number threshold; if it is judged that the current thinning distance is less than the preset thinning distance threshold, and the current number of accumulated trajectory points is not less than the preset thinning number threshold; or, if it is judged that the current thinning distance is not less than the preset thinning distance threshold, and the current number of accumulated trajectory points is less than the preset thinning number threshold, it is determined that the currently traversed pending trajectory points and the current reference trajectory points meet the preset thinning conditions, and subsequently, the pending trajectory points between the currently traversed pending trajectory points and the current reference trajectory points are deleted, the currently traversed pending trajectory points are retained, and the currently traversed pending trajectory points are used as the new current reference trajectory points.

[0130] Continue to traverse each pending trajectory point that has not been traversed at present based on the arrangement order of multiple pending trajectory points, and each time a pending trajectory point is traversed, the current reference trajectory point, the currently traversed pending trajectory point, and the trajectory point between the two are cumulatively calculated, that is, the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points, as the current thinning distance, and count the number of the current accumulated trajectory points; determine whether the currently traversed pending trajectory point and the current reference trajectory point meet the preset thinning condition, if so, delete the pending trajectory point between the currently traversed pending trajectory point and the current reference trajectory point, and retain the currently traversed pending trajectory point as the new current reference trajectory point; return to execute the step of traversing each pending trajectory point that has not been traversed at present in turn based on the arrangement order of multiple pending trajectory points, and cumulatively calculate the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points as the current thinning distance, until the last pending trajectory point of the pending trajectory is traversed, and the last pending trajectory point is retained to obtain multiple spare trajectory points corresponding to the pending trajectory.

[0131] In another implementation of the present invention, before step 011, the method may further include step 014:

[0132] Step 014: Determine whether the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is greater than a preset frequency threshold;

[0133] If it is determined that the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is greater than the preset frequency threshold, step 01 is executed.

[0134] In this implementation, in order to ensure that the trajectory matching process can be applied to trajectories collected by vehicles with various different trajectory point collection frequencies and to ensure the accuracy of the trajectory matching results, in an embodiment of the present invention, after the electronic device obtains the trajectory to be processed, it can first determine the trajectory point acquisition frequency corresponding to the trajectory to be processed, that is, whether the trajectory point acquisition frequency of the vehicle that obtains the trajectory to be processed is greater than a preset frequency threshold; if it is determined that the trajectory point acquisition frequency corresponding to the trajectory to be processed is greater than the preset frequency threshold, it is determined that the trajectory points in the trajectory to be processed are relatively dense. In order to reduce the complexity and calculation amount of the subsequent trajectory matching process to a certain extent, step 01 is executed to reduce the number of trajectory points in the trajectory to be processed.

[0135] In another case, when the electronic device determines that the acquisition frequency of the trajectory points corresponding to the to-be-processed trajectory is not greater than the preset frequency threshold, it can be determined that the trajectory points in the to-be-processed trajectory are relatively sparse. Accordingly, in another implementation of the present invention, the method may further include step 015:

[0136] Step 015: If it is determined that the acquisition frequency of the trajectory points corresponding to the trajectory to be processed is not greater than the preset frequency threshold, based on the position information and arrangement order of the multiple trajectory points to be processed and the preset point encryption algorithm, at least one trajectory point is added between every two adjacent trajectory points to be processed to determine the multiple backup trajectory points corresponding to the trajectory to be processed.

[0137] In this embodiment, the electronic device can determine the position information of at least one trajectory point before each two adjacent trajectory points to be processed based on the position information of multiple trajectory points to be processed and their arrangement order, using the position information of each two adjacent trajectory points to be processed and a preset point encryption algorithm, and based on the determined position information of at least one trajectory point before each two adjacent trajectory points to be processed, add corresponding trajectory points to the trajectory to be processed to obtain multiple backup trajectory points corresponding to the trajectory to be processed.

[0138] In one case, when it is determined that the acquisition frequency of the trajectory points corresponding to the trajectory to be processed is not greater than the preset frequency threshold, it can be determined whether to add a trajectory point between two adjacent trajectory points to be processed based on the distance between each two adjacent trajectory points to be processed. If the distance between two adjacent trajectory points to be processed exceeds the preset encryption distance threshold, the number of trajectory points added between the two adjacent trajectory points to be processed is determined based on the preset point encryption formula, the distance between the two adjacent trajectory points to be processed, and the preset encryption distance threshold. Based on the determined number of added trajectory points and the position information of the two adjacent trajectory points to be processed, a trajectory point is added between the two adjacent trajectory points to be processed. Among them, the preset point encryption formula is:

[0139] n=floor((dis+d–eps) / d)–1,

[0140] Wherein, n represents the number of trajectory points added between two adjacent trajectory points to be processed; floor(x) represents rounding down, dis represents the distance between two adjacent trajectory points to be processed, d represents the preset encryption distance threshold, eps is a preset minimum value greater than 0, such as 1e-7, wherein the distance interval between the added trajectory points is dis / (n+1).

[0141] S103: Based on the location information of the plurality of spare trajectory points and the target map, a map area corresponding to the trajectory to be processed is determined as the map area to be matched.

[0142] The map area to be matched includes: at least one observation section corresponding to the trajectory to be processed, and each observation section includes at least one observation sub-section.

[0143] In this embodiment, the electronic device can determine an initial map area that can surround the multiple backup trajectory points from the target map based on the location information of the multiple backup trajectory points, and then determine the map area corresponding to the trajectory to be processed based on the initial map area as the map area to be matched.

[0144] In one case, the location information of each road section in the initial map area includes longitude and latitude information and elevation information. Accordingly, the process of determining the map area corresponding to the trajectory to be processed based on the initial map area as the map area to be matched can be: determining the initial map area after expansion based on a preset expansion size and the initial map area; mapping the initial map area after expansion to a preset plane based on a preset coordinate conversion relationship to generate a map area to be matched; or, it can be: directly mapping the initial map area to a preset plane based on a preset coordinate conversion relationship to generate a map area to be matched.

[0145] Correspondingly, the map area to be matched is a map area mapped to a preset plane, that is, the map area to be matched is a plane map area, and each road section in the map area to be matched is represented by a broken line. Considering that the direction of the broken line is difficult to determine relative to the broken line, and the distance from the calculation point to the broken line is also difficult to calculate. In order to simplify the subsequent determination of the corresponding road section from the map area to be matched for each spare trajectory point, for each observed road section in the map area to be matched, the n road section points included in the observed road section are split into n-1 observation sub-segments, wherein each observed sub-segment is composed of two adjacent road section points in the observed road section, and n is a positive integer greater than 1. This ensures that each observed sub-segment is a straight line segment, and subsequently, the calculation of the direction corresponding to the observed sub-segment and the distance from the spare trajectory point to the observed sub-segment are more simplified, which improves the trajectory matching efficiency to a certain extent.

[0146] Furthermore, in order to ensure the efficiency of trajectory matching, after determining the observation sub-segments included in each observation segment, a spatial index is established for all observation sub-segments to improve the efficiency of determining the correspondence between subsequent backup trajectory points and observation sub-segments, thereby improving the efficiency of trajectory matching.

[0147] S104: Based on the observation sub-segments in the map area to be matched and the position information of the plurality of spare trajectory points, an observation sequence corresponding to each spare trajectory point and including the observation sub-segments meeting the preset observation conditions is determined from the map area to be matched.

[0148] In this step, the electronic device can match each backup trajectory point with each observation sub-segment in the map area to be matched based on the location information of the backup trajectory point and the location information of the observation sub-segment in the map area to be matched, and determine whether the backup trajectory point and each observation sub-segment in the map area to be matched meet the preset observation conditions; if an observation sub-segment in the map area to be matched meets the preset observation conditions with the backup trajectory point, then determine that the observation sub-segment is the observation sub-segment corresponding to the backup trajectory point that meets the preset observation conditions.

[0149] In one case, the preset observation condition may be: the angle deviation between the observation direction corresponding to the backup trajectory point and the direction corresponding to the observation sub-segment does not exceed a first angle threshold, and the distance between the backup trajectory point and the observation sub-segment does not exceed a first distance threshold. The first angle threshold may be equal to the observation angle threshold mentioned later, or may not be equal to the observation angle threshold; the first distance threshold may be equal to the observation distance threshold mentioned later, or may not be equal to the observation distance threshold.

[0150] In this case, after screening out the observation sub-sections corresponding to the backup trajectory points that meet the preset observation conditions, the observation score between the backup trajectory point and each of its corresponding observation sub-sections can be determined based on the angle deviation, distance, observation angle threshold and observation angle threshold between the backup trajectory point and its corresponding observation sub-section.

[0151] In another case, the preset observation condition may be that the observation score between the backup trajectory point and the observation sub-section is not less than a preset score, wherein the observation score between the backup trajectory point and the observation sub-section is a score determined based on the angular deviation between the observation direction corresponding to the backup trajectory point and the direction corresponding to the observation sub-section, the distance between the backup trajectory point and the observation sub-section, the observation angle threshold, and the observation distance threshold.

[0152] Among them, the observation direction corresponding to the backup trajectory point is: the direction determined based on the position information of the backup trajectory point and the position information of its previous backup trajectory point; in one case, when the backup trajectory point is in the first position of the trajectory to be processed, the observation direction corresponding to the backup trajectory point is: the direction determined based on the position information of the backup trajectory point and the position information of its subsequent backup trajectory point.

[0153] If there is no observation sub-segment that meets the preset observation condition between the backup trajectory point and the observation sub-segment in the map area to be matched, the observation sequence corresponding to the backup trajectory point and containing the observation sub-segment that meets the preset observation condition is empty.

[0154] S105: Determine a matching section corresponding to the to-be-processed trajectory based on each observed sub-section in the observed sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point.

[0155] The matching road section corresponding to the trajectory to be processed includes: an observation sub-road section matched by each spare trajectory point of the trajectory to be processed.

[0156] In one implementation, the electronic device can, based on each observation sub-segment in the observation sequence corresponding to each backup trajectory point and the arrangement order between each backup trajectory point, for each backup trajectory point, filter out the observation sub-segment that represents a connection relationship with the matched observation sub-segment selected corresponding to the previous backup trajectory point of the backup trajectory point from each observation sub-segment in the observation sequence corresponding to the backup trajectory point, so as to determine a set of observation sub-segments that have a connection relationship between the selected observation sub-segments sorted based on the arrangement order between each backup trajectory point, and determine them as the matching segments corresponding to the trajectory to be processed.

[0157] In another implementation, the electronic device can, based on each observation sub-segment in the observation sequence corresponding to each backup trajectory point, the observation score between each backup trajectory point and each observation sub-segment in the observation sequence corresponding to the backup trajectory point, and the arrangement order between each backup trajectory point, for each backup trajectory point, from each observation sub-segment in the observation sequence corresponding to the backup trajectory point, screen out the observation sub-segment that represents a connection relationship with the matched observation sub-segment screened out corresponding to the previous backup trajectory point of the backup trajectory point and has the highest observation score, so as to determine a set of observation sub-segments sorted based on the arrangement order between each backup trajectory point, in which each of the screened matched observation sub-segments has a connection relationship, and determine them as the matching segments corresponding to the trajectory to be processed.

[0158] In an implementation of the present invention, the S105 may include:

[0159] Based on the preset Viterbi algorithm, each observation sub-section in the observation sequence corresponding to each spare trajectory point, and the arrangement order between each spare trajectory point, the matching section corresponding to the to-be-processed trajectory is determined.

[0160] In the implementation of the present invention, the electronic device can use multiple spare trajectory points in the trajectory to be processed, which are arranged in the order of generation time, as an observation sequence; and use each observation sub-segment in the observation sequence corresponding to each spare trajectory point as the implicit state of the spare trajectory point; and use the observation score between each spare trajectory point and each observation sub-segment in the observation sequence corresponding to it as the initial probability of the observation sub-segment. And pre-set the transition probability in the preset Viterbi algorithm, if the observation sub-segment in the observation sequence corresponding to the spare trajectory point is connected or the same as the observation sub-segment with the highest probability corresponding to the previous spare trajectory point determined to be the spare trajectory point, set the transition probability of the observation sub-segment in the observation sequence corresponding to the spare trajectory point to a first value, such as 1; if the observation sub-segment in the observation sequence corresponding to the spare trajectory point is not connected to the observation sub-segment with the highest probability corresponding to the previous spare trajectory point determined to be the spare trajectory point, set the transition probability of the observation sub-segment in the observation sequence corresponding to the spare trajectory point to a second value, such as 1e-50, so as to ensure the accuracy of the matching result of the trajectory matching to a certain extent. The transmission probability in the preset Viterbi algorithm may be determined based on a transmission probability determination method in the related art, or may be manually set in advance.

[0161] Then, according to the arrangement order between each spare trajectory point, each spare trajectory point is taken as the current spare trajectory point in turn. For the current spare trajectory point, based on the preset Viterbi algorithm and the transition probability, emission probability, observation score of each observation sub-segment in the observation sequence corresponding to the current spare trajectory point and the current probability of each observation sub-segment in the observation sequence corresponding to the previous spare trajectory point of the current spare trajectory point, the current probability of the observation sub-segment corresponding to the current spare trajectory point is determined, and the observation sub-segment corresponding to the previous spare trajectory point with the greatest possibility of being transferred to the observation sub-segment corresponding to the current spare trajectory point is added to the observation sub-segment sequence of the observation sub-segment corresponding to the current spare trajectory point; and the subsequent algorithm process is carried out until the observation sub-segment with the highest current probability in the observation sub-segment in the observation sequence corresponding to the last spare trajectory point is determined, and the observation sub-segment sequence corresponding to the observation sub-segment with the highest current probability is determined as the matching segment corresponding to the trajectory to be processed.

[0162] Among them, when transferring to the observation sub-segment corresponding to the current backup trajectory point, the observation sub-segment corresponding to the most likely previous backup trajectory point can be: among the observation sub-segment corresponding to the previous backup trajectory point of the current backup trajectory point, there is a connection relationship with the observation sub-segment corresponding to the current backup trajectory point, and the corresponding observation sub-segment has the highest current probability.

[0163] In the embodiment of the present invention, the probability corresponding to each observation sub-segment in the observation sequence corresponding to the determined spare trajectory point is set to a floating point number. Moreover, in the process of determining the matching segment corresponding to the to-be-processed trajectory based on the preset Viterbi algorithm, each observation sub-segment in the observation sequence corresponding to each spare trajectory point, and the arrangement order between each spare trajectory point; if it is determined that the current probability corresponding to each observation sub-segment in the observation sequence corresponding to a certain spare trajectory point is less than the first preset probability value, and the minimum current probability is less than the second preset probability value, such as the first preset probability value is 1e200, and the second preset probability value is 1e-200; the current probability corresponding to each observation sub-segment in the observation sequence corresponding to the spare trajectory point is simultaneously enlarged by a preset multiple, such as 1e50; and then based on the current probability corresponding to each observation sub-segment in the observation sequence corresponding to the spare trajectory point after the preset multiple is enlarged, subsequent calculations are performed to ensure the feasibility of the trajectory matching process to a certain extent.

[0164] By applying the embodiment of the present invention, a preset trajectory point processing operation can be first performed on the trajectory points to be processed in the trajectory to be processed, that is, the trajectory points to be processed in the trajectory to be processed can be increased or decreased to obtain a plurality of spare trajectory points that are convenient for the subsequent trajectory matching process; and the determined map area to be matched includes an observation section including at least one observation sub-section, so as to simplify the difficulty of determining the observation sequence including the observation sub-section corresponding to each spare trajectory point in the subsequent determination, and to improve the accuracy of the observation sub-section corresponding to each spare trajectory point to a certain extent, and then based on the observation sub-section corresponding to each spare trajectory point with higher accuracy and the arrangement order between each spare trajectory point, the matching section corresponding to the trajectory to be processed with higher accuracy is determined, so as to achieve the matching of the section and the trajectory and to improve the matching accuracy to a certain extent.

[0165] In another embodiment of the present invention, the map area to be matched is: a map area mapped to a preset plane; the position information of the plurality of spare track points is: position information mapped to the preset plane;

[0166] The S104 may include the following steps 021-024:

[0167] Step 021: for each backup trajectory point, based on the position information of the backup trajectory point and the position information of the reference trajectory point corresponding to the backup trajectory point, determine the observation direction corresponding to the backup trajectory point.

[0168] Among them, the observation direction points to: the trajectory point with a later generation time between the backup trajectory point and its corresponding reference trajectory point; if the backup trajectory point is the first backup trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the backup trajectory point is the next backup trajectory point after the backup trajectory point; if the backup trajectory point is not the first backup trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the backup trajectory point is the previous backup trajectory point of the backup trajectory point.

[0169] Step 022: For each backup trajectory point, based on the directions corresponding to the observed sub-segments in the map area to be matched and the observation direction corresponding to the backup trajectory point, determine the angular deviation between the backup trajectory point and the observed sub-segments in the map area to be matched.

[0170] Step 023: For each spare trajectory point, based on the position information of each observed sub-segment in the map area to be matched and the position information of the spare trajectory point, determine the distance from the spare trajectory point to each observed sub-segment in the map area to be matched.

[0171] Step 024: For each backup trajectory point, based on the angle deviation between the backup trajectory point and each observation sub-segment in the map area to be matched, the distance from the backup trajectory point to each observation sub-segment in the map area to be matched, the observation angle threshold and the observation distance threshold, determine the observation sequence corresponding to the backup trajectory point that includes the observation sub-segments that meet the preset observation conditions.

[0172] In this embodiment, the map area to be matched is: the map area mapped to the preset plane; the position information of multiple spare trajectory points is: the position information mapped to the preset plane; accordingly, based on the position information of each spare trajectory point in the preset plane, and the position information of each observation sub-section in the map area to be matched in the preset plane, the observation direction corresponding to each spare trajectory point and the angular deviation between the observation direction corresponding to the spare trajectory point and the direction corresponding to the observation sub-section, as well as the distance between the observation direction corresponding to each spare trajectory point and the observation sub-section can be determined.

[0173] After the electronic device determines the map area to be matched corresponding to the trajectory to be processed, it can determine the reference trajectory point corresponding to each backup trajectory point. In one case, if the backup trajectory point is the first backup trajectory point in the trajectory to be processed, the backup trajectory point after the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point; if the backup trajectory point is a non-first backup trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the backup trajectory point is the backup trajectory point before the backup trajectory point.

[0174] Based on the position information of each backup trajectory point and the position information of its corresponding reference trajectory point, the observation direction corresponding to the backup trajectory point is determined, wherein the observation direction corresponding to the backup trajectory point points to: the trajectory point generated later than the backup trajectory point and its corresponding reference trajectory point; that is, if the reference trajectory point corresponding to the backup trajectory point is: the next backup trajectory point of the backup trajectory point, the observation direction corresponding to the backup trajectory point points to the next backup trajectory point of the backup trajectory point; if the reference trajectory point corresponding to the backup trajectory point is: the previous backup trajectory point of the backup trajectory point, the observation direction corresponding to the backup trajectory point points to the backup trajectory point itself.

[0175] For each spare track point, the electronic device determines the angle between the spare track point and each observed sub-road section in the map area to be matched, which is the angle deviation, based on the directions corresponding to each observed sub-road section in the map area to be matched and the observed direction corresponding to the spare track point. The directions corresponding to each observed sub-road section in the map area to be matched are determined based on the driving direction corresponding to the road section where the observed sub-road section is located, wherein the driving direction indicates the direction in which the vehicle is traveling.

[0176] For each backup trajectory point, based on the location information of each observed sub-segment in the map area to be matched and the location information of the backup trajectory point, the shortest distance between the backup trajectory point and each observed sub-segment in the map area to be matched is calculated, and the distance from the backup trajectory point to each observed sub-segment in the map area to be matched is determined.

[0177] Subsequently, in one case, the process of determining the observation sequence corresponding to the backup trajectory point and including the observation sub-segment that meets the preset observation conditions may be: for each backup trajectory point, from each observation sub-segment in the map area to be matched, determine the observation sub-segment whose angle deviation with the backup trajectory point is less than the observation angle threshold and whose distance with the backup trajectory point is less than the observation distance threshold, and determine it as the observation sub-segment that meets the preset observation conditions corresponding to the backup trajectory point; for each backup trajectory point, based on the angle deviation and distance between the backup trajectory point and the observation sub-segment corresponding to the backup trajectory point, the observation score between the backup trajectory point and the observation sub-segment corresponding to the backup trajectory point, the observation angle threshold and the observation distance threshold, and then sort the observation sub-segments corresponding to the backup trajectory point according to the size of the observation score to form an observation sequence. Among them, the observation score between the backup trajectory point and the observation sub-segment corresponding to the backup trajectory point may be determined according to a subsequent preset scoring formula.

[0178] In another case, the process of determining the observation sequence corresponding to the backup trajectory point and including the observation sub-segments that meet the preset observation conditions may be: for each backup trajectory point, according to a preset scoring formula, based on the angular deviation between the backup trajectory point and the observation sub-segments in the map area to be matched, the distance from the backup trajectory point to the observation sub-segments in the map area to be matched, the observation angle threshold and the observation distance threshold, determine the observation score between the backup trajectory point and the observation sub-segments in the map area to be matched; from the observation sub-segments in the map area to be matched, screen out the observation sub-segments whose observation scores exceed the preset score threshold, and determine them as the observation sub-segments corresponding to the backup trajectory point that meet the preset observation conditions; and sort the observation sub-segments corresponding to the backup trajectory point in order of the size of the observation scores to generate an observation sequence.

[0179] The preset scoring formula can be expressed by the following formula (1):

[0180]

[0181] Among them, D0 represents the observation distance threshold; A0 represents the observation angle threshold; P1 represents the distance score ratio, P2 represents the angle score ratio. D ij represents the distance between the ith backup trajectory point and the jth observed sub-section in the map area to be matched, or, D ij A represents the distance between the ith backup trajectory point and its corresponding jth observation sub-section; ij represents the angle deviation between the ith backup trajectory point and the jth observed sub-section in the map area to be matched, or, A ij It represents the angle deviation between the i-th backup trajectory point and its corresponding j-th observation sub-section, where i and j are both positive integers.

[0182] Among them, the observation distance threshold and the observation angle threshold can be any numerical value set according to the actual situation. In one case, considering that the observation direction corresponding to each spare trajectory point in the to-be-processed trajectory will not deviate to the point opposite to the actual driving direction compared to the observation sub-section in the map area to be matched, the observation angle threshold can be set to 90 degrees, so as to block a wave of observation sub-sections that cannot be matched with the spare trajectory points; and, through testing, 90 degrees also has better matching results with the trajectory at sharp turns, which can avoid the occurrence of some sub-sections that cannot be observed due to improper thinning of trajectory points. In one case, the observation distance threshold can be set to 50 meters.

[0183] In this embodiment, the spare trajectory points in the preset plane are matched with the observed sub-sections in the map area to be matched. When the elevation information of the spare trajectory points and the elevation information of the observed sub-sections in the map area to be matched are obtained, the corresponding trajectory matching process can still be performed. The trajectory matching process provided by this embodiment has strong scalability.

[0184] In another embodiment of the present invention, the step 021 may include the following steps 0211-021:

[0185] Step 0211: For each spare track point, determine whether the spare track point is the first spare track point of the track to be used.

[0186] Step 0212: if it is determined that the backup trajectory point is the first backup trajectory point of the trajectory to be used, the backup trajectory point after the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point;

[0187] Step 0213: Determine the observation direction corresponding to the backup trajectory point based on the position information of the backup trajectory point and the position information of the reference trajectory point corresponding to the backup trajectory point;

[0188] Step 0214: If it is determined that the backup trajectory point is not the first backup trajectory point of the trajectory to be used, the road section direction corresponding to the backup trajectory point is determined based on the backup trajectory point and its previous backup trajectory point.

[0189] The road section direction points to the previous backup track point of the backup track point.

[0190] Step 0215: Determine whether the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the curve angle threshold.

[0191] Step 0216: If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point does not exceed the curve angle threshold, the previous backup trajectory point of the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point.

[0192] Step 0217: Based on the position information of the backup trajectory point and the position information of the reference trajectory point corresponding to the backup trajectory point, determine the observation direction corresponding to the backup trajectory point.

[0193] Step 0218: If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the bend angle threshold, the previous backup trajectory point of the backup trajectory point and the next backup trajectory point of the backup trajectory point are determined as reference trajectory points corresponding to the backup trajectory point.

[0194] Step 0219: Based on the position information of the backup trajectory point and the position information of the reference trajectory point corresponding to the backup trajectory point, determine the observation direction corresponding to the backup trajectory point.

[0195] In one case, there are inevitably trajectory points that represent vehicle turns in the trajectory to be processed. For this type of trajectory to be processed, the observation direction corresponding to the spare trajectory point that represents vehicle turns in the trajectory to be processed may be greatly changed compared to the observation direction corresponding to the previous spare trajectory point. In order to ensure that the spare trajectory point that represents vehicle turns in the trajectory to be processed is determined, a more accurate and comprehensive observation sub-section corresponding to it is determined. When determining the observation direction for this type of spare trajectory point, the observation direction can be determined based on both the previous spare trajectory point of this type of spare trajectory point and the next spare trajectory point of this type of spare trajectory point to ensure the comprehensiveness of the observation direction.

[0196] Correspondingly, after determining that the backup trajectory point is a non-first backup trajectory point, the electronic device can determine the road section direction corresponding to the backup trajectory point based on the backup trajectory point and its previous backup trajectory point, wherein the road section direction points to the previous backup trajectory point of the backup trajectory point; and determine whether the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the bend angle threshold; if it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point does not exceed the bend angle threshold, it is determined that the backup trajectory point is not a trajectory point representing the turning of the vehicle, and the previous backup trajectory point of the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point; if it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the bend angle threshold, it is determined that the backup trajectory point is a trajectory point representing the turning of the vehicle, and the previous backup trajectory point and the next backup trajectory point of the backup trajectory point are determined as the reference trajectory points corresponding to the backup trajectory point.

[0197] In an embodiment of the present invention, when it is determined that the angle deviation between the direction of the section corresponding to the backup trajectory point and the direction of the section corresponding to the previous backup trajectory point exceeds the bend angle threshold, that is, the backup trajectory point is generated when the vehicle is turning, in order to avoid missing the observed section, the previous backup trajectory point and the next backup trajectory point of the backup trajectory point are used to jointly determine the observation direction corresponding to the backup trajectory point, so as to ensure the integrity of the determined observation sub-section, and further ensure the accuracy of the subsequent matching results of the trajectory and the section.

[0198] In another embodiment of the present invention, Figure 2 As shown, after S105, the method may further include the following steps:

[0199] S201: Determine a first standby track point and a last standby track point of a track to be processed from a plurality of standby track points.

[0200] S202: From each observation sub-section in the observation sequence corresponding to the endpoint backup trajectory point, determine an observation sub-section having a perpendicular foot corresponding to the endpoint backup trajectory point as a second observation sub-section.

[0201] Among them, the endpoint spare track point is the first spare track point or the last spare track point.

[0202] S203: Determine whether there is a currently observed sub-segment in the second observed sub-segment that is connected to the matching sub-segment corresponding to the endpoint backup trajectory point; if so, execute S204.

[0203] Among them, the matching sub-segment corresponding to the endpoint backup trajectory point belongs to the matching segment corresponding to the trajectory to be processed.

[0204] S204: Add the current observed sub-segment to the matching segment corresponding to the trajectory to be processed.

[0205] S205: Continue to determine whether there is a new current observation sub-segment connected to the current observation sub-segment in the second observation sub-segment; if it is determined that there is a new current observation sub-segment connected to the current observation sub-segment in the second observation sub-segment, return to execute S204.

[0206] In many cases, the vehicle's trajectory may not completely cover the first road section and / or the last road section that the vehicle actually traveled, that is, the first road section and / or the last road section that the vehicle actually traveled may be missing in the matching road section corresponding to the pending trajectory. In order to avoid the above situation, after determining the matching road section corresponding to the pending trajectory, the electronic device needs to optimize the matching road section corresponding to the pending trajectory.

[0207] Specifically: from multiple spare trajectory points, determine the first spare trajectory point and the last spare trajectory point of the trajectory to be processed; from each observation sub-segment in the observation sequence corresponding to the endpoint spare trajectory point, determine the second observation sub-segment with the perpendicular foot corresponding to the endpoint spare trajectory point, wherein the endpoint spare trajectory point is the first spare trajectory point or the last spare trajectory point; judge whether there is a current observation sub-segment in the second observation sub-segment that has a connection relationship with the matching sub-segment corresponding to the endpoint spare trajectory point, if so, add the current observation sub-segment to the matching segment corresponding to the trajectory to be processed based on the connection relationship of the matching sub-segment corresponding to the endpoint spare trajectory point; and so on, from the second observation sub-segment with the perpendicular foot corresponding to the endpoint spare trajectory point, determine all the current observation sub-segments that have a connection relationship with the first matching sub-segment or the last matching sub-segment in the matching segment corresponding to the trajectory to be processed, and add them to the matching segment corresponding to the trajectory to be processed, so as to optimize the matching segments and improve the accuracy of the matching results.

[0208] In another implementation, if a second observation sub-segment having a perpendicular foot corresponding to the endpoint backup trajectory point is not determined from each observation sub-segment in the observation sequence corresponding to the endpoint backup trajectory point, the trajectory matching process for the trajectory to be matched can be terminated.

[0209] In another implementation, if it is determined that there is no currently observed sub-segment in the second observed sub-segment that is connected to the matching sub-segment corresponding to the endpoint backup trajectory point, the trajectory matching process for the trajectory to be matched may be terminated.

[0210] In another embodiment of the present invention, before S102, the method may further include:

[0211] The process of obtaining a target map includes:

[0212] Obtaining an initial map, wherein the initial map includes multiple road segments;

[0213] Traverse the initial map and determine the forks contained in the initial map;

[0214] For each determined fork in the road, the road sections connected by the fork in the road are marked as different road sections to obtain a target map.

[0215] In this embodiment, in order to ensure the real-time and up-to-dateness of the obtained target map, the electronic device obtains an initial map including multiple road sections after obtaining the trajectory to be processed. Then, the initial map is traversed to determine whether the initial map contains a fork in the road, and if it is determined that a fork in the road is included, the fork in the road included in the initial map is determined, and for each determined fork in the road, the road section connected by the fork in the road is interrupted, that is, the road sections connected by the fork in the road are identified as different road sections to obtain the target map. It can be understood that the initial map is: a map that can at least characterize the scene corresponding to the trajectory to be processed. In one case, the identification information corresponding to each road section in the target map can be information that can uniquely identify different road sections, such as numbers, letters, or a mixture of numbers and letters.

[0216] The fork in the road includes but is not limited to a Y-shaped intersection, a T-shaped intersection and a crossroad. For a Y-shaped intersection and a T-shaped intersection, the road sections connected by the Y-shaped intersection or the T-shaped intersection can be identified as three road sections; for a crossroad, the road sections connected by the crossroad can be identified as four road sections.

[0217] In one case, the initial map may be OSM (Open Street Map). Accordingly, the location information of each road section in the initial map includes latitude and longitude information and elevation information. In this embodiment, the initial map obtained is the latest OSM, which can improve the accuracy of the trajectory matching result to a certain extent.

[0218] In this embodiment, the geometric information and connection relationship of each road section in the initial map are not changed, and all road sections connected through the fork are interrupted accordingly, that is, marked as different road sections, to ensure that each road section at the fork must be single, and no road section is allowed to pass through the fork. The situation of road sections in actual scenes is very complicated. Some road sections may correspond to many entrances and exits, such as the entrances and exits of the expressway to the auxiliary road, the entrances and exits of the auxiliary road to the expressway, etc. In one case, the vehicle may not have driven the entire road section, but directly left the road section from the entrance and exit. For this case, if the entire road is used as the matching road section of the vehicle's trajectory, it is inaccurate. Therefore, the road sections connected through the fork are marked as different road sections to ensure the accuracy of the subsequent matching results. In addition, marking the road sections connected through the fork as different road sections can ensure the topological relationship of the road sections at the fork to a certain extent, and simplify the complexity of judging the connectivity of the road sections.

[0219] Corresponding to the above method embodiment, the embodiment of the present invention provides a trajectory matching device, such as Figure 3 As shown, it may include:

[0220] The first obtaining module 310 is configured to obtain a trajectory to be processed, wherein the trajectory to be processed includes: a plurality of trajectory points to be processed arranged in chronological order according to corresponding generation time;

[0221] The first determination module 320 is configured to determine a plurality of spare trajectory points of the trajectory to be processed based on the position information and arrangement order of the plurality of trajectory points to be processed and a preset trajectory point processing operation, wherein the preset trajectory point processing operation is an operation for increasing or decreasing a trajectory point in the trajectory;

[0222] The second determination module 330 is configured to determine, based on the location information of the plurality of backup trajectory points and the target map, a map area corresponding to the trajectory to be processed as a map area to be matched, wherein the map area to be matched includes: at least one observation section corresponding to the trajectory to be processed, each observation section including at least one observation sub-section;

[0223] The third determination module 340 is configured to determine, from the map area to be matched, an observation sequence corresponding to each spare trajectory point and including an observation sub-segment meeting a preset observation condition, based on the observation sub-segment in the map area to be matched and the position information of the plurality of spare trajectory points;

[0224] The fourth determination module 350 is configured to determine the matching section corresponding to the to-be-processed trajectory based on each observed sub-section in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point.

[0225] By applying the embodiment of the present invention, a preset trajectory point processing operation can be first performed on the trajectory points to be processed in the trajectory to be processed, that is, the trajectory points to be processed in the trajectory to be processed can be increased or decreased to obtain a plurality of spare trajectory points that are convenient for the subsequent trajectory matching process; and the determined map area to be matched includes an observation section including at least one observation sub-section, so as to simplify the difficulty of determining the observation sequence including the observation sub-section corresponding to each spare trajectory point in the subsequent determination, and to improve the accuracy of the observation sub-section corresponding to each spare trajectory point to a certain extent, and then based on the observation sub-section corresponding to each spare trajectory point with higher accuracy and the arrangement order between each spare trajectory point, the matching section corresponding to the trajectory to be processed with higher accuracy is determined, so as to achieve the matching of the section and the trajectory and to improve the matching accuracy to a certain extent.

[0226] In another embodiment of the present invention, the first determining module 320 includes:

[0227] The cumulative calculation unit is configured to traverse each of the currently untraversed trajectory points in turn based on the arrangement order of the multiple trajectory points to be processed, and cumulatively calculate the sum of the distances between each two adjacent trajectory points in the current cumulative trajectory points as the current thinning distance, wherein the current cumulative trajectory points include: the currently traversed trajectory points to be processed, the current reference trajectory points, and the trajectory points to be processed between the two, and the current reference trajectory point is: the first trajectory point to be processed of the trajectory to be processed, or the trajectory point to be processed that meets the preset thinning condition with the previous reference trajectory point;

[0228] A first judgment calculation unit is configured to judge whether the current thinning distance is less than a preset thinning distance threshold, and whether the current number of accumulated trajectory points is not less than a preset thinning number threshold;

[0229] A deletion and retention unit is configured to delete the pending trajectory point between the currently traversed pending trajectory point and the current reference trajectory point if it is determined that the current thinning distance is less than the preset thinning distance threshold and the number of the currently accumulated trajectory points is not less than the preset thinning number threshold; or if it is determined that the current thinning distance is not less than the preset thinning distance threshold and the number of the currently accumulated trajectory points is less than the preset thinning number threshold, and retain the currently traversed pending trajectory point as a new current reference trajectory point;

[0230] The accumulating calculation unit is triggered back until the last trajectory point to be processed of the trajectory to be processed is traversed, and the last trajectory point to be processed is retained to obtain a plurality of spare trajectory points of the trajectory to be processed.

[0231] In another embodiment of the present invention, the first determining module 320 further includes:

[0232] The second judgment unit is configured to, based on the arrangement order of the plurality of trajectory points to be processed, sequentially traverse each trajectory point to be processed that has not been traversed currently, and before accumulating and calculating the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points as the current thinning distance, determine whether the acquisition frequency of the trajectory point corresponding to the trajectory to be processed is greater than a preset frequency threshold;

[0233] If it is determined that the acquisition frequency of the trajectory points corresponding to the to-be-processed trajectory is greater than the preset frequency threshold, the accumulation calculation unit is triggered.

[0234] In another embodiment of the present invention, the first determining module 320 further includes:

[0235] The first determination unit is configured to add at least one trajectory point between each two adjacent trajectory points to be processed, if it is determined that the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is not greater than the preset frequency threshold, based on the position information and arrangement order of the multiple trajectory points to be processed and the preset point encryption algorithm, to determine the multiple backup trajectory points corresponding to the trajectory to be processed.

[0236] In another embodiment of the present invention, the map area to be matched is: a map area mapped to a preset plane; the position information of the plurality of spare track points is: position information mapped to the preset plane;

[0237] The third determination module 340 includes:

[0238] The second determining unit is configured to determine, for each spare trajectory point, an observation direction corresponding to the spare trajectory point based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point, wherein the observation direction points to: a trajectory point generated later in time between the spare trajectory point and its corresponding reference trajectory point; if the spare trajectory point is the first spare trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the spare trajectory point is the next spare trajectory point of the spare trajectory point; if the spare trajectory point is a non-first spare trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the spare trajectory point is the previous spare trajectory point of the spare trajectory point;

[0239] A third determining unit is configured to determine, for each spare trajectory point, an angular deviation between the spare trajectory point and each observed sub-segment in the map area to be matched based on the directions corresponding to the observed sub-segments in the map area to be matched and the observed direction corresponding to the spare trajectory point;

[0240] a fourth determining unit configured to determine, for each spare trajectory point, a distance from the spare trajectory point to each observed sub-segment in the map area to be matched based on the position information of each observed sub-segment in the map area to be matched and the position information of the spare trajectory point;

[0241] The fifth determination unit is configured to determine, for each backup trajectory point, an observation sequence corresponding to the backup trajectory point that includes observation sub-segments that meet preset observation conditions based on the angular deviation between the backup trajectory point and each observation sub-segment in the map area to be matched, the distance from the backup trajectory point to each observation sub-segment in the map area to be matched, the observation angle threshold and the observation distance threshold.

[0242] In another embodiment of the present invention, the second determining unit is specifically configured to determine, for each spare track point, whether the spare track point is the first spare track point of the track to be used;

[0243] If it is determined that the backup trajectory point is the first backup trajectory point of the to-be-used trajectory, the backup trajectory point after the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point; based on the position information of the backup trajectory point and the position information of the reference trajectory point corresponding to the backup trajectory point, the observation direction corresponding to the backup trajectory point is determined;

[0244] If it is determined that the backup trajectory point is a non-first backup trajectory point of the to-be-used trajectory, based on the backup trajectory point and its previous backup trajectory point, the road section direction corresponding to the backup trajectory point is determined, wherein the road section direction points to the previous backup trajectory point of the backup trajectory point;

[0245] Determine whether the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the bend angle threshold;

[0246] If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point does not exceed the curve angle threshold, the previous backup trajectory point of the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point;

[0247] Determine the observation direction corresponding to the spare trajectory point based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point;

[0248] If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the curve angle threshold, the previous backup trajectory point of the backup trajectory point and the next backup trajectory point of the backup trajectory point are determined as reference trajectory points corresponding to the backup trajectory point;

[0249] Based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point, the observation direction corresponding to the spare trajectory point is determined.

[0250] In another embodiment of the present invention, the fourth determination module 350 is specifically configured to determine the matching section corresponding to the trajectory to be processed based on a preset Viterbi algorithm, each observation sub-section in the observation sequence corresponding to each backup trajectory point, and the arrangement order between each backup trajectory point.

[0251] In another embodiment of the present invention, the device further comprises:

[0252] a fifth determination module, configured to determine the first spare trajectory point and the last spare trajectory point of the to-be-processed trajectory from the plurality of spare trajectory points after determining the matching segment corresponding to the to-be-processed trajectory based on each observation sub-segment in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point;

[0253] a sixth determination module, configured to determine, from each observation sub-section in the observation sequence corresponding to the endpoint spare trajectory point, an observation sub-section having a perpendicular foot corresponding to the endpoint spare trajectory point as a second observation sub-section, wherein the endpoint spare trajectory point is a first spare trajectory point or a last spare trajectory point;

[0254] A first judgment module is configured to judge whether there is a current observation sub-segment in the second observation sub-segment that is connected to the matching sub-segment corresponding to the endpoint backup trajectory point, wherein the matching sub-segment corresponding to the endpoint backup trajectory point belongs to the matching segment corresponding to the trajectory to be processed;

[0255] An adding module is configured to add the currently observed sub-segment to the matching segment corresponding to the trajectory to be processed if it is determined to exist;

[0256] A second judgment module is configured to continue to judge whether there is a new current observation sub-section in the second observation sub-section that is connected to the current observation sub-section;

[0257] If it is determined that there is a new current observation sub-segment in the second observation sub-segment that is connected to the current observation sub-segment, the adding module is returned and triggered.

[0258] In another embodiment of the present invention, the device further comprises:

[0259] A second obtaining module is configured to obtain a target map before the step of determining the map area corresponding to the to-be-processed trajectory as the to-be-matched map area based on the location information of the plurality of spare trajectory points and the target map, wherein the second obtaining module is specifically configured to obtain an initial map, wherein the initial map includes a plurality of road segments;

[0260] Traversing the initial map, and determining the forks contained in the initial map;

[0261] For each determined fork in the road, the road sections connected by the fork in the road are identified as different road sections to obtain the target map.

[0262] The above device and system embodiments correspond to the method embodiments and have the same technical effects as the method embodiments. For specific descriptions, please refer to the method embodiments. The device embodiments are obtained based on the method embodiments. For specific descriptions, please refer to the method embodiments part, which will not be repeated here.

[0263] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.

[0264] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.

[0265] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these 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 invention.

Claims

1. A trajectory matching method, characterized in that: include: Obtaining a trajectory to be processed, wherein the trajectory to be processed includes: a plurality of trajectory points to be processed arranged in chronological order according to corresponding generation times; Determine a plurality of spare trajectory points of the trajectory to be processed based on the position information and arrangement order of the plurality of trajectory points to be processed and a preset trajectory point processing operation, wherein the preset trajectory point processing operation is: an operation for increasing or decreasing a trajectory point in the trajectory; Based on the location information of the plurality of spare trajectory points and the target map, a map area corresponding to the trajectory to be processed is determined as the map area to be matched, wherein the map area to be matched includes: at least one observation section corresponding to the trajectory to be processed, each observation section including at least one observation sub-section; Based on the position information of the observation sub-segment in the map area to be matched and the position information of the plurality of spare trajectory points, determining an observation sequence corresponding to each spare trajectory point and including the observation sub-segment meeting the preset observation condition from the map area to be matched; Determine the matching section corresponding to the trajectory to be processed based on each observed sub-section in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point; The preset observation condition includes that the angle deviation between the observation direction corresponding to the spare trajectory point and the direction corresponding to the observation sub-section does not exceed the first angle threshold, and the distance between the spare trajectory point and the observation sub-section does not exceed the first distance threshold, or the preset observation condition includes that the observation score between the spare trajectory point and the observation sub-section is not less than the preset score; When the spare track point is at the first position of the track to be processed, the observation direction corresponding to the spare track point is: a direction determined based on the position information of the spare track point and the position information of the next spare track point; when the spare track point is not at the first position of the track to be processed, the observation direction corresponding to the spare track point is: a direction determined based on the position information of the spare track point and the position information of the previous spare track point; The method for determining the observation score includes: determining the observation score between the spare trajectory point and the observation sub-segment based on the angle deviation between the spare trajectory point and the observation sub-segment, the distance between the spare trajectory point and the observation sub-segment, the observation angle threshold and the observation angle threshold.

2. The method according to claim 1, characterized in that The step of determining a plurality of spare track points of the track to be processed based on the position information and arrangement order of the plurality of track points to be processed and the preset track point processing operation comprises: Based on the arrangement order of the plurality of to-be-processed trajectory points, each to-be-processed trajectory point that has not been traversed currently is traversed in turn, and the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points is accumulated and calculated as the current thinning distance, wherein the current accumulated trajectory points include: the currently traversed to-be-processed trajectory point, the current reference trajectory point, and the to-be-processed trajectory point between the two, and the current reference trajectory point is: the first to-be-processed trajectory point of the to-be-processed trajectory, or the to-be-processed trajectory point that meets the preset thinning condition with the previous reference trajectory point; Determine whether the current thinning distance is less than a preset thinning distance threshold, and whether the current number of accumulated trajectory points is not less than a preset thinning number threshold; If it is determined that the current thinning distance is less than the preset thinning distance threshold, and the number of the current accumulated trajectory points is not less than the preset thinning number threshold; or, if it is determined that the current thinning distance is not less than the preset thinning distance threshold, and the number of the current accumulated trajectory points is less than the preset thinning number threshold, then the pending trajectory points between the currently traversed pending trajectory points and the current reference trajectory points are deleted, and the currently traversed pending trajectory points are retained as new current reference trajectory points; Return to executing the arrangement order of the multiple trajectory points to be processed, traverse each trajectory point to be processed that has not been traversed in turn, and accumulate and calculate the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points as the current thinning distance step, until the last trajectory point to be processed of the trajectory to be processed is traversed, and the last trajectory point to be processed is retained to obtain multiple spare trajectory points of the trajectory to be processed.

3. The method according to claim 2, characterized in that Before the step of traversing each of the currently untraversed trajectory points in turn based on the arrangement order of the plurality of trajectory points to be processed, and accumulating the sum of the distances between each two adjacent trajectory points in the currently accumulated trajectory points as the current thinning distance, the method further includes: Determine whether the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is greater than a preset frequency threshold; If it is determined that the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is greater than the preset frequency threshold, the arrangement order of the multiple trajectory points to be processed is executed, each trajectory point to be processed that has not been traversed currently is traversed in turn, and the sum of the distances between each two adjacent trajectory points in the current accumulated trajectory points is accumulated as the current thinning distance step.

4. The method according to claim 3, characterized in that The method further comprises: If it is determined that the frequency of obtaining the trajectory points corresponding to the trajectory to be processed is not greater than the preset frequency threshold, based on the position information and arrangement order of the multiple trajectory points to be processed and the preset point encryption algorithm, at least one trajectory point is added between every two adjacent trajectory points to be processed to determine the multiple backup trajectory points corresponding to the trajectory to be processed.

5. The method according to any one of claims 1 to 4, characterized in that: The map area to be matched is: a map area mapped to a preset plane; the position information of the plurality of spare track points is: position information mapped to the preset plane; The step of determining, from the map area to be matched, an observation sequence corresponding to each spare trajectory point and including an observation sub-segment meeting a preset observation condition, comprises: For each spare trajectory point, based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point, determine the observation direction corresponding to the spare trajectory point, wherein the observation direction points to: the trajectory point generated later in the spare trajectory point and its corresponding reference trajectory point; if the spare trajectory point is the first spare trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the spare trajectory point is the next spare trajectory point of the spare trajectory point; if the spare trajectory point is not the first spare trajectory point in the trajectory to be processed, the reference trajectory point corresponding to the spare trajectory point is the previous spare trajectory point of the spare trajectory point; For each spare trajectory point, based on the directions corresponding to the observation sub-segments in the to-be-matched map area and the observation direction corresponding to the spare trajectory point, determine the angular deviation between the spare trajectory point and the observation sub-segments in the to-be-matched map area; For each spare trajectory point, based on the position information of each observed sub-segment in the map area to be matched and the position information of the spare trajectory point, determine the distance from the spare trajectory point to each observed sub-segment in the map area to be matched; For each backup trajectory point, based on the angular deviation between the backup trajectory point and each observation sub-segment in the map area to be matched, the distance from the backup trajectory point to each observation sub-segment in the map area to be matched, the observation angle threshold and the observation distance threshold, determine the observation sequence corresponding to the backup trajectory point that includes the observation sub-segments that meet the preset observation conditions.

6. The method according to claim 5, characterized in that The step of determining the observation direction corresponding to the spare trajectory point based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point comprises: For each spare track point, determining whether the spare track point is the first spare track point of the track to be processed; If it is determined that the backup trajectory point is the first backup trajectory point of the to-be-processed trajectory, the backup trajectory point after the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point; based on the position information of the backup trajectory point and the position information of the reference trajectory point corresponding to the backup trajectory point, the observation direction corresponding to the backup trajectory point is determined; If it is determined that the backup trajectory point is a non-first backup trajectory point of the to-be-processed trajectory, based on the backup trajectory point and its previous backup trajectory point, the road section direction corresponding to the backup trajectory point is determined, wherein the road section direction points to the previous backup trajectory point of the backup trajectory point; Determine whether the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the bend angle threshold; If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point does not exceed the curve angle threshold, the previous backup trajectory point of the backup trajectory point is determined as the reference trajectory point corresponding to the backup trajectory point; Determine the observation direction corresponding to the spare trajectory point based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point; If it is determined that the angle deviation between the road section direction corresponding to the backup trajectory point and the road section direction corresponding to the previous backup trajectory point exceeds the curve angle threshold, the previous backup trajectory point of the backup trajectory point and the next backup trajectory point of the backup trajectory point are determined as reference trajectory points corresponding to the backup trajectory point; Based on the position information of the spare trajectory point and the position information of the reference trajectory point corresponding to the spare trajectory point, the observation direction corresponding to the spare trajectory point is determined.

7. The method according to any one of claims 1 to 4, characterized in that: The step of determining the matching section corresponding to the to-be-processed trajectory based on each observed sub-section in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point includes: Based on a preset Viterbi algorithm, each observation sub-section in the observation sequence corresponding to each spare trajectory point, and the arrangement order between each spare trajectory point, the matching section corresponding to the to-be-processed trajectory is determined.

8. The method according to any one of claims 1 to 4, characterized in that: After the step of determining the matching section corresponding to the to-be-processed trajectory based on each observed sub-section in the observation sequence corresponding to each spare trajectory point and the arrangement order between each spare trajectory point, the method further includes: Determining a first spare track point and a last spare track point of the track to be processed from the plurality of spare track points; From each observation sub-section in the observation sequence corresponding to the endpoint spare trajectory point, determine the observation sub-section where the perpendicular foot corresponding to the endpoint spare trajectory point exists as the second observation sub-section, wherein the endpoint spare trajectory point is the first spare trajectory point or the last spare trajectory point; Determine whether there is a current observation sub-segment in the second observation sub-segment that is connected to the matching sub-segment corresponding to the endpoint backup trajectory point, wherein the matching sub-segment corresponding to the endpoint backup trajectory point belongs to the matching segment corresponding to the trajectory to be processed; If it is determined to exist, the current observed sub-section is added to the matching section corresponding to the trajectory to be processed; Continue to determine whether there is a new current observation sub-section in the second observation sub-section that is connected to the current observation sub-section; If it is determined that there is a new current observation sub-segment in the second observation sub-segment that is connected to the current observation sub-segment, the process returns to the step of adding the current observation sub-segment to the matching segment corresponding to the trajectory to be processed.

9. The method according to any one of claims 1 to 4, characterized in that: Before the step of determining the map area corresponding to the to-be-processed trajectory as the to-be-matched map area based on the location information of the plurality of spare trajectory points and the target map, the method further includes: The process of obtaining a target map includes: Obtaining an initial map, wherein the initial map includes a plurality of road segments; Traversing the initial map, and determining the forks contained in the initial map; For each determined fork in the road, the road sections connected by the fork in the road are marked as different road sections to obtain the target map.

10. A trajectory matching device, characterized in that: include: A first obtaining module is configured to obtain a trajectory to be processed, wherein the trajectory to be processed includes: a plurality of trajectory points to be processed arranged in chronological order according to corresponding generation time; A first determination module is configured to determine a plurality of spare trajectory points corresponding to the trajectory to be processed based on the position information and arrangement order of the plurality of trajectory points to be processed and a preset trajectory point processing operation, wherein the preset trajectory point processing operation is an operation for increasing or decreasing a trajectory point in the trajectory; A second determination module is configured to determine, based on the location information of the plurality of backup trajectory points and the target map, a map area corresponding to the trajectory to be processed as a map area to be matched, wherein the map area to be matched includes: at least one observation section corresponding to the trajectory to be processed, each observation section including at least one observation sub-section; A third determination module is configured to determine, from the map area to be matched, an observation sequence corresponding to each spare trajectory point and including an observation sub-segment meeting a preset observation condition based on the position information of the observation sub-segment in the map area to be matched and the position information of the plurality of spare trajectory points; A fourth determination module is configured to determine a matching section corresponding to the to-be-processed trajectory based on each observed sub-section in the observation sequence corresponding to each spare trajectory point and an arrangement order between each spare trajectory point; The preset observation condition includes that the angle deviation between the observation direction corresponding to the spare trajectory point and the direction corresponding to the observation sub-section does not exceed the first angle threshold, and the distance between the spare trajectory point and the observation sub-section does not exceed the first distance threshold, or the preset observation condition includes that the observation score between the spare trajectory point and the observation sub-section is not less than the preset score; When the spare track point is at the first position of the track to be processed, the observation direction corresponding to the spare track point is: a direction determined based on the position information of the spare track point and the position information of the next spare track point; when the spare track point is not at the first position of the track to be processed, the observation direction corresponding to the spare track point is: a direction determined based on the position information of the spare track point and the position information of the previous spare track point; The method for determining the observation score includes: determining the observation score between the spare trajectory point and the observation sub-segment based on the angle deviation between the spare trajectory point and the observation sub-segment, the distance between the spare trajectory point and the observation sub-segment, the observation angle threshold and the observation angle threshold.

Citation Information

Patent Citations

  • Map matching method and device

    CN105444769A

  • Road network matching method and system

    CN108955693A