A global vehicle trajectory splicing method based on double matching

By using a dual-matching method and leveraging time series similarity and arrival sequence features, the problem of short and difficult-to-stitch vehicle trajectory data across the entire domain was solved, achieving efficient and accurate trajectory stitching and restoring complete vehicle spatiotemporal information.

CN116304740BActive Publication Date: 2026-02-06TONGJI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310294662.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2026-02-06
Estimated Expiration
2043-03-23

AI Technical Summary

Technical Problem

Existing full-domain vehicle trajectory data has limited trajectory length due to the limitations of the acquisition equipment, making it difficult to track the spatiotemporal information of individual vehicles over a long period of time. This limits research based on vehicle groups and driver behavior, and existing stitching methods have low computational efficiency or insufficient matching accuracy.

Method used

A dual-matching method is adopted to stitch together vehicle trajectories across the entire domain by using time series similarity and arrival sequence features. This includes data preprocessing, time error verification, arrival sequence encoding and matching, and time series similarity matching using a dynamic time warping algorithm, ensuring stitching accuracy and efficiency.

Benefits of technology

It improves the matching accuracy and computational efficiency of full-domain vehicle trajectory stitching, enabling complete stitching of 100-meter-level trajectories and recovery of kilometer-level trajectories, while reducing errors and waste of computational resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116304740B_ABST
    Figure CN116304740B_ABST
Patent Text Reader

Abstract

The application relates to a global vehicle trajectory splicing method based on double matching, which comprises the following steps: acquiring global vehicle trajectory data from different data sources and performing data preprocessing to obtain coincident area vehicle trajectory data; performing time error checking on the coincident area vehicle trajectory data of different data sources; performing arrival sequence coding and arrival sequence matching on the vehicle trajectory data based on trajectory arrival characteristics; performing time sequence similarity matching based on a dynamic time warping algorithm; comparing and checking the arrival sequence matching result and the time sequence similarity matching result to complete global vehicle trajectory splicing. Compared with the prior art, the trajectory of the coincident area is used as the splicing basis, the problem of larger errors in the data source without the coincident area is avoided, and the matching precision is improved based on the double matching of the time sequence similarity and the arrival sequence characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of traffic big data mining, and particularly relates to a global vehicle trajectory splicing method based on double matching. BACKGROUND

[0002] Vehicle trajectory data generally refers to continuous space-time information of a vehicle, and generally includes position, time, speed and other information. Global vehicle trajectory data refers to trajectory data of all vehicles within a certain spatial range. In the field of traffic, global vehicle trajectory data has a wide application space. From a micro perspective, such data can be used to study driving behavior of vehicles, such as car-following models, lane-changing models, and high-risk vehicle identification. From a macro perspective, it can be used for traffic flow model correction, accident risk prediction, and traffic flow bottleneck analysis.

[0003] In recent years, the public global trajectory data source is becoming more and more abundant. Existing global trajectory acquisition equipment is mainly a camera. Compared with the acquisition method of common vehicle-mounted equipment (such as GPS positioning equipment), the roadside camera avoids the cost of laying a large number of vehicle-mounted equipment and can obtain global trajectory data at a lower cost. However, due to the limitation of the shooting range, the length of the trajectory data collected by the roadside camera is generally in the order of hundreds of meters, and the shorter trajectory length greatly limits the application space of such trajectory data. Such data cannot track the space-time information of individual vehicles for a long time, and a series of researches focusing on the continuity of vehicle traffic characteristics, such as vehicle group and driver behavior, are difficult to carry out.

[0004] The most direct method to solve the above problems is to use a higher-definition camera to shoot at a higher angle, but the cost and feasibility of such a solution have not been verified. A more reasonable method is to splice the trajectory from the data level to obtain the complete continuous vehicle trajectory. There are few studies in existing literature to solve such problems, and the main solutions are as follows: first, the video is spliced to form complete video data of the target area, and then the video data is analyzed and recognized to obtain the trajectory data of the entire area; second, the trajectory data is directly spliced according to the characteristic information of the extracted trajectory data to finally form complete trajectory data. Due to the uncertain factors such as shaking offset and distortion in the process of shooting by the unmanned aerial vehicle, it is difficult to perform simple splicing. The first method needs to analyze each frame of the video, correct the angle deviation, determine the overlapping area of each frame of image according to the feature points, align the overlapping area, form a panoramic image, and finally form a panoramic video data. From the model point of view, this method has large amount of calculation and low processing efficiency. On the other hand, the existing public data set has completed the work of extracting trajectory data from the video, and using this method will waste the existing achievements. The second method has been tried in the existing data set, and some studies have established kinematic constraints according to the traffic parameters extracted from the trajectory to search for upstream and downstream trajectories. However, the motion characteristics of vehicles on the same road at the same time are highly similar, especially in the case of following behavior, the constraint search method is easy to match incorrectly, and the matching accuracy of this method is only about 80%, which is low. SUMMARY

[0005] The purpose of the present application is to provide a global vehicle trajectory splicing method based on double matching, which can improve the matching accuracy while ensuring the calculation efficiency.

[0006] The purpose of the present application can be achieved by the following technical solutions:

[0007] A global vehicle trajectory splicing method based on double matching, comprising the following steps:

[0008] Obtain global vehicle trajectory data from different data sources and perform data preprocessing to obtain vehicle trajectory data in the overlapping area;

[0009] Time error verification is performed on the vehicle trajectory data in the overlapping area from different data sources;

[0010] Based on the trajectory arrival feature, the vehicle trajectory data is coded and matched in the arrival sequence;

[0011] Time series similarity matching based on dynamic time warping algorithm;

[0012] The arrival sequence matching results and time series similarity matching results are compared and verified to complete the full-domain vehicle trajectory stitching.

[0013] The data preprocessing involves marking the latitude and longitude of overlapping areas in different data sources and filtering out trajectory data within those areas from the dataset.

[0014] The time error verification specifically involves:

[0015] For vehicles that have been identified as originating from two different data sources N a and N b trajectory i a and i b Take the time series of its velocity:

[0016]

[0017]

[0018] Two time series and The time overlap range is [t1, t2]. Calculate the Euclidean distance between corresponding points in the two overlapping regions: t1≤i a p a =i b p b ≤t2, the average distance L is:

[0019]

[0020] Each time in trajectory i b The moment plus t g ∈100,100, i.e. i b k b -t g After iterating through the pre-configuration steps a number of times, the sum of Euclidean distances at different time verification values ​​is obtained, and the verification value t with the smallest average distance L is selected. f For the final check value, t f Add to N b The timestamps of the data sources are used to verify the time errors between different data sources.

[0021] The arrival sequence encoding is specifically as follows:

[0022] Within the time range [0, T], set the time window size to t. ′ Set a cross section on the lane, and in each time window t ′If no vehicle passes the cross section, the code q is 0, and if a vehicle passes the cross section, the code q is the track number i, and thus the arrival sequence Q = [q1, q2, …, qd] composed of d codes is generated in the time range. d ] in the time range.

[0023] The arrival sequence matching is specifically:

[0024] The cross sections at the same position are selected in the track sets N a and N b of two different data sources with overlapping areas, and the arrival sequences Q and Q

[0025] Q a and Q b are merged to form a d x 2 matrix Z.

[0026] Considering the influence of detection errors and other factors, a 3 x 2 sliding window is established to slide on the matrix Z.

[0027] If two track numbers appear in the same sliding window during the sliding process, that is, the track numbers appear in 2s and 2s+1 respectively, it is considered that the two track numbers correspond to the same vehicle, and the track number matching is successful, and thus the arrival sequence matching result of the vehicle track is formed. The arrival sequence matching result of the vehicle track is formed.

[0028] The time sequence similarity matching based on the dynamic time warping algorithm is specifically:

[0029] All points in the two tracks are paired through iteration. If two points are successfully paired, the distance between the two points is accumulated, and if two points are not successfully paired, a distance-based loss function is accumulated. When all points are paired, the similarity of the two tracks is represented by the accumulated distance of all paired points. If the similarity of the two tracks is less than a preconfigured threshold, it is indicated that the two tracks are successfully matched, and the iteration completes the matching of all tracks.

[0030] For two tracks i a and i b , two unequal length track time sequences are constructed:

[0031]

[0032]

[0033] wherein, are i a and i b ​sequence length of X

[0034] The distance matrix D is composed of the square of the Euclidean distance between and , where the element is

[0035]

[0036] An optimal bending path W = (w1, w2, …, w l ,…,w m ) is found in D, so that and The similarity between the two trajectories is determined based on the optimal bending path, where represents and match.

[0037] The bending path satisfies the following constraints:

[0038] 1) Boundary constraint: w1 = (1, 1);

[0039] 2) Monotonicity and continuity constraint: w l = (b l ,c l ); w l+1 = (b l+1 ,c l+1 ), where 0 ≤ b l+1 -b l ≤ 1, 0 ≤ c l+1 -c l ≤ 1.

[0040] The optimal bending path is the shortest path in the distance matrix D that simultaneously satisfies the boundary constraint, the monotonicity and continuity constraint, that is:

[0041]

[0042] where DTW(X ia ,X ib ) is the optimal path found.

[0043] The search for the optimal path is achieved by dynamic programming, defining the cumulative matrix

[0044]

[0045] The comparison and verification of the arrival sequence matching result and the time sequence similarity matching result complete the global vehicle trajectory splicing, which is specifically:

[0046] The arrival sequence matching result and the time sequence similarity matching result are compared, if a certain result of the arrival sequence matching appears in the candidate result of the time sequence similarity matching, it is considered that the result matching is successful, the matching successful pairs in all matching results are calculated, the double matching rate is calculated in combination with the total number of matching, if the double matching rate is greater than the preconfigured percentage, it is considered that the data in the current time range is matched successfully, the data matching of the next time range is carried out, if the double matching rate is less than the preconfigured percentage, the matching is wrong, the time error checking is re-performed, and the arrival sequence matching result and the time sequence similarity matching are re-performed, and iteration is carried out in turn, and the splicing of all vehicle trajectory data is completed.

[0047] Compared with the prior art, the present application has the following beneficial effects:

[0048] (1) The present application proposes a global vehicle trajectory splicing method based on time sequence similarity and arrival sequence characteristics, the matching accuracy of the algorithm is further improved through the coincidence degree of the time sequence similarity matching result and the arrival sequence matching result, the global vehicle trajectory splicing of hundreds of meters can be carried out, and the complete kilometer-level trajectory can be restored.

[0049] (2) The present application uses the trajectory of the overlapping area as the splicing basis, avoids the problem of larger error in the data source without overlapping area, reduces the matching difficulty and unnecessary waste of computing resources, and improves the matching accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0050] Figure 1 The method flowchart of the present application is shown in the figure;

[0051] Figure 2 The principle diagram of time error checking is shown in the figure;

[0052] Figure 3 The arrival sequence matching diagram in an embodiment is shown in the figure. DETAILED DESCRIPTION

[0053] The present application will be described in detail below in combination with the drawings and specific embodiments. The present embodiment is implemented on the premise of the technical scheme of the present application, and detailed implementation modes and specific operation processes are given, but the protection scope of the present application is not limited to the following embodiments.

[0054] The present embodiment provides a global vehicle trajectory splicing method based on double matching, as shown in the figure, including the following steps: Figure 1

[0055] S1: Obtain global vehicle trajectory data from different data sources and perform data preprocessing to obtain overlapping area vehicle trajectory data.

[0056] ​The present application is based on the splicing of the overlapping area data, which first needs to extract the data of the overlapping area as the data basis, so the specific method of data preprocessing is to mark the latitude and longitude of the overlapping area in different data sources, and filter out the trajectory data in the area from the data set.

[0057] S2: Time error checking of the overlapping area vehicle trajectory data of different data sources.

[0058] For the same car's trajectory from different data sources, there is a time error. By translating the two trajectories on the time axis, the time when the two trajectories coincide is found, and the time error value of different data sources can be obtained, as shown in the following formula: Figure 2 Considering that the time error has a certain degree of influence on the accuracy of the arrival sequence matching and the time sequence similarity matching result, the present embodiment proposes a time checking algorithm based on Euclidean distance. For the trajectories i a and i b of the same car from two different data sources N a and N b , take the time sequence of their speed:

[0059]

[0060]

[0061] The range of time overlap of the two time sequences V ia and V ib is [t1, t2], and the Euclidean distance of the corresponding points of the two overlapping areas is calculated: t1≤i a p a =i b p b ≤t2, and the distance average value L is:

[0062]

[0063] Then add t g ∈100,100 to the time of trajectory i b each time, that is, i b k b -t g , and after 200 iterations, the sum of the Euclidean distances under different time checking values is obtained, and the checking value t f with the smallest distance average value L is selected as the final checking value. Add t f to the timestamp of the N b data source to check the time error of different data sources.

[0064] S3: Arrival sequence encoding and matching of vehicle trajectory data based on trajectory arrival feature.

[0065] In order to quantify the arrival feature of vehicles on the same section, the sequence of vehicles arriving at the same section is encoded, and the specific encoding method is as follows: in the time range [0, T], set the time window size to t ′ , and set a section on the lane. In each time window t ′ , if no vehicle passes through the section, encode q as 0, and if a vehicle passes through the interface, encode q as the trajectory number i. Accordingly, in the time range [0, T], the arrival sequence Q = [q1, q2, …, q d d composed of d encodings is generated.

[0066] For example, as shown in Figure 3 , there is no vehicle passing through the section in the first time window, so the encoding is 0, and there is a vehicle passing through the section in the third time window, so the encoding is the vehicle number. The arrival sequence encoding of vehicles in a certain time is completed in turn.

[0067] Based on the above arrival sequence encoding method, select the section at the same position in the trajectory set N a and N b of two different data sources with overlapping regions. After time verification, in the time range [0, T], the arrival sequence encoding is performed respectively to obtain two groups of arrival sequences and

[0068] Merge Q a and Q b to form a d x 2 matrix Z. Considering the influence of detection errors and other factors, a 3 x 2 sliding window is established to slide on the matrix Z. If two trajectory numbers appear in the same sliding window during the sliding process, i.e. in and where 2s≤d-1, the trajectory numbers are considered to correspond to the same vehicle, and the trajectory number matching is successful. In this way, the arrival sequence matching result of the vehicle trajectory is formed.

[0069] S4: Time sequence similarity matching based on dynamic time warping algorithm.

[0070] Dynamic Time Warping (DTW) algorithm, originally used to handle the time warping problem in similarity calculation, is later used to calculate the trajectory similarity. DTW algorithm gives a more efficient time series matching method by stretching the time series. The main idea of DTW algorithm is to obtain the minimum sum of distance between each step of two trajectories. Specifically, all points in two trajectories are paired by iteration, if two points are successfully paired, the distance between two points is accumulated, if two points are not successfully paired, a distance-based loss function is accumulated; when all points are paired, the similarity of two trajectories is represented by the accumulated distance of all paired points. Therefore, the smaller the sum of total distance, the more similar the two trajectories. If the similarity of two trajectories is less than the pre-configured threshold, it means that two trajectories are successfully matched, and the iteration completes the matching of all trajectories.

[0071] For two trajectories i a and i b , two unequal length trajectory time series are constructed:

[0072]

[0073]

[0074] wherein, are the sequence lengths of i a and i b , respectively.

[0075] The distance matrix D is composed of the square of the Euclidean distance between x and x , wherein the element is:

[0076]

[0077] An optimal bending path W=(w1,w2,…,w l ,…,w m ) is found in D, so that the matching degree of x ia and x ib is maximum, and the similarity of two trajectories is determined based on the optimal bending path, wherein, represents the matching of x and x .

[0078] w l satisfies the following constraints:

[0079] 1) Boundary constraint: w1=(1,1);

[0080] 2) Monotonicity and continuity constraint: wl = (b l ,c l ) ; w l+1 = (b l+1 ,c l+1 ), wherein 0 ≤ b l+1 -b l ≤ 1, 0 ≤ c l+1 -c l ≤ 1.

[0081] The optimal bending path is the shortest path in the distance matrix D that simultaneously satisfies the boundary constraint, the monotonicity constraint and the continuity constraint, that is:

[0082]

[0083] wherein, is the optimal path found.

[0084] The finding of the optimal path is achieved by dynamic programming, defining the cumulative matrix

[0085] S5: comparing and checking the arrival sequence matching result and the time sequence similarity matching result, and completing the global vehicle trajectory splicing.

[0086] The arrival sequence matching result and the time sequence similarity matching result are compared, if a certain result of the arrival sequence matching appears in the candidate result of the time sequence similarity matching, it is considered that this result is matched successfully, the matching successful pairs in all matching results are calculated, and the double matching rate is calculated in combination with the total number of matching, if the double matching rate is greater than 90%, it is considered that the data matching in the current time range is successful, the data matching of the next time range is carried out, if the double matching rate is less than 90%, the matching is wrong, the time error checking is re-performed, and the arrival sequence matching result and the time sequence similarity matching are re-performed, and iteration is completed, and the splicing of all vehicle trajectory data is completed.

[0087] The preferred embodiments of the application are described in detail above. It should be understood that those skilled in the art can make many modifications and changes without creative labor according to the concept of the application. Therefore, any technical solution obtained by logical analysis, reasoning or limited experiment on the basis of the prior art according to the concept of the application should be within the protection scope determined by the claims.

Claims

1. A global vehicle trajectory stitching method based on double matching, characterized in that, The method comprises the following steps: Obtaining global vehicle trajectory data from different data sources and performing data preprocessing to obtain vehicle trajectory data in the overlapping area; Performing time error verification on vehicle trajectory data in the overlapping area from different data sources; Performing arrival sequence coding and arrival sequence matching on vehicle trajectory data based on trajectory arrival characteristics; Performing time sequence similarity matching based on a dynamic time warping algorithm; Comparing and verifying the arrival sequence matching result and the time sequence similarity matching result to complete global vehicle trajectory splicing; The time error verification is specifically: For trajectories that have been determined to be the same car from two different data sources and , take the time series of their speeds and ​ two time series and the range of time overlap is The Euclidean distance of the corresponding points of the two overlapping areas is calculated: , The average value L of the distance is: Each time in the trajectory The moment plus ,Right now After iterating through the pre-configuration steps a number of times, the sum of Euclidean distances at different time verification values ​​is obtained, and the verification value with the smallest average distance L is selected. For the final verification value, Add to The timestamps of the data sources are used to verify the time errors between different data sources. 2.The global vehicle trajectory stitching method based on double matching according to claim 1, wherein, The data preprocessing is to mark the longitude and latitude of the overlapping area in different data sources, and to filter out trajectory data in the area from the data set. 3.The global vehicle trajectory stitching method based on double matching according to claim 1, wherein, The arrival sequence coding is specifically: Within the time range Inside, set the time window size to Set a section on the lane, in each time window If no vehicle passes through the section within the specified time, then the code is entered. The value is 0; if a vehicle passes through the interface, the code is set to 0. Number the trajectory Accordingly, within the stated time range, generate The arriving sequence consists of coded elements. .

4. The global vehicle trajectory stitching method based on double matching according to claim 3, characterized in that, The arrival sequence matching is specifically: In the trajectory set of two different data sources with overlapping regions and The cross sections at the same position are selected in the time range The arrival sequence encoding is performed respectively to obtain two groups of arrival sequences and ; Merging and composes a matrix Z ; Considering the influence of detection errors and other factors, the establishment of a sliding window on the matrix Z is performed; If two track numbers appear in the same sliding window during the sliding process, i.e. in and wherein track numbers appear respectively, it is considered that the two track numbers correspond to the same vehicle, and the matching of the two track numbers is successful, so as to form the arrival sequence matching result of the vehicle track.

5. The global vehicle trajectory stitching method based on double matching according to claim 1, wherein, The time sequence similarity matching based on the dynamic time warping algorithm is specifically: All points in two trajectories are paired through iteration. If two points are successfully paired, the distance between the two points is accumulated. If two points are not successfully paired, a distance-based loss function is accumulated. When all points are paired, the similarity of two trajectories is represented by the accumulated distance of all paired points. If the similarity of two trajectories is less than a preconfigured threshold, it indicates that the two trajectories are successfully matched, and the iteration completes the matching of all trajectories. For 2 trajectories and Two time series of unequal length trajectories are constructed: wherein respectively and the sequence length of distance matrix comprises comprises comprises, wherein the elements are: In finding an optimal curved path such that the degree of matching with is maximum, and determining the similarity degree of the two trajectories based on the optimal curved path, wherein , denotes matching with .

6. The global vehicle trajectory stitching method based on double matching according to claim 5, wherein, The curved path satisfies the following constraints: 1) Boundary constraints: ; ; 2) monotonicity and continuity constraints: ; where , .

7. The global vehicle trajectory stitching method based on double matching according to claim 6, characterized in that, The optimal bending path is a distance matrix D The shortest path that satisfies the boundary constraint, monotonicity and continuity constraint at the same time, that is: wherein, is the found optimal path.

8. The global vehicle trajectory stitching method based on double matching according to claim 7, characterized in that, The search of the optimal path is implemented by dynamic programming, defining a cumulative matrix to record the shortest path: 。 9. The global vehicle trajectory stitching method based on double matching according to claim 1, wherein, The comparison and verification of the arrival sequence matching result and the time sequence similarity matching result to complete global vehicle trajectory splicing is specifically: The arrival sequence matching result and the time sequence similarity matching result are compared. If a result of the arrival sequence matching appears in the candidate result of the time sequence similarity matching, it is considered that the result is successfully matched. The number of successfully matched results in all matching results is calculated, and the double matching rate is calculated in combination with the total number of matches. If the double matching rate is greater than a preconfigured percentage, it is considered that the data in the current time range is successfully matched, and the data matching of the next time range is performed. If the double matching rate is less than a preconfigured percentage, the matching is incorrect, and the time error verification is performed again, and the arrival sequence matching result and the time sequence similarity matching result are performed again. Iteration is performed in sequence to complete the splicing of all vehicle trajectory data.

Citation Information

Patent Citations

  • Cross-lane vehicle matching method and system based on dynamic time warping

    CN112070130A

  • Universe vehicle trajectory construction method under incomplete perception data

    CN115205334A