Track segment similarity searching and optimizing method based on dynamic programming

By conducting accurate similarity search at the trajectory segment level based on dynamic programming, the accuracy and efficiency problems of trajectory segment similarity search in the prior art are solved, and the subtrajectory length and query accuracy that meet the actual application requirements are achieved.

CN120216735APending Publication Date: 2025-06-27YANGTZE DELTA REGION INST (QUZHOU) UNIV OF ELECTRONIC SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510373835.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the trajectory similarity search, it is difficult to accurately measure the similarity between trajectories at the trajectory segment level, and the approximation algorithm lacks accuracy guarantee, and the subtrajectory length returned by the conversion matching algorithm may be too short to meet the actual application needs.

Method used

Using a dynamic programming method, by obtaining and preprocessing trajectory data, defining point matching sequences and continuous point matching sequences, using dynamic programming method to compare the similarity between query trajectory and standardized data trajectory, solving the similar sub-trajectory search problem, obtaining the most similar sub-trajectory, and introducing user-specified sub-trajectory length constraints to meet actual needs.

Benefits of technology

Accurate similarity search at the trajectory segment level is realized, the accuracy and efficiency of the search is ensured, the needs of neutron trajectory length are met, and the self-similarity of the trajectory is preserved through trajectory simplification and the query accuracy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216735A_ABST
    Figure CN120216735A_ABST
Patent Text Reader

Abstract

The invention discloses a trajectory segment similarity searching and optimizing method based on dynamic programming, and relates to the technical field of geographic information processing and trajectory data mining. The method comprises the following steps: acquiring trajectory data and preprocessing the trajectory data to obtain a standardized data trajectory; defining a point matching sequence and a continuous point matching sequence, comparing the similarity of sub-trajectories in the query trajectory and the standardized data trajectory based on a dynamic planning method, and solving a similar sub-trajectory search problem to obtain the most similar sub-trajectory; the similar sub-trajectory search problem comprises the distance between sub-trajectories of a minimized query trajectory and a standardized data trajectory, and a state transition equation capable of retaining trajectory key feature points under dynamic planning; any starting point and end point are allowed to be selected in the process of solving the process state transition equation. According to the method, the solution accuracy is ensured, the optimal search efficiency is realized, the search flexibility can be ensured, and the method can be expanded to any trajectory similarity measurement based on dynamic planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of geographic information processing and trajectory data mining. Specifically, it relates to a method for searching and optimizing the similarity of trajectory segments based on dynamic programming. Background Art

[0002] With the wide application of global positioning system devices and wireless communication technologies, a large amount of trajectory data has been generated. These data provide opportunities for in-depth understanding of human movement patterns and promote the rapid development of trajectory analysis tasks such as route recommendation, trajectory clustering, and location prediction. In these tasks, it is particularly important to efficiently retrieve trajectories similar to a given query from a large-scale trajectory database. However, most existing similar trajectory search studies treat trajectories as a whole, ignoring the fine-grained similarity between trajectories, that is, the similarity between trajectories cannot be accurately measured at the trajectory segment level. To address this limitation, in recent years, researchers have proposed the problem of searching for similar sub-trajectories, whose core goal is to extract the sub-trajectories (i.e., segment trajectories) that are most similar to the query trajectory from the given data trajectories (i.e., the trajectories to be queried).

[0003] Searching for similar sub-trajectories, as a basic unit for many applications, plays a key role in tasks such as sub-trajectory clustering and sub-trajectory connection. For the problem of sub-trajectory search, an intuitive solution is to enumerate all possible sub-trajectories in the data trajectory and return the sub-trajectory that is most similar to the query trajectory. Although this method is simple and straightforward, its time complexity O(mn 3 ) is often unbearable in practical applications, where m and n represent the lengths of the query trajectory and the data trajectory respectively. To improve efficiency, researchers have proposed a variety of approximation algorithms to balance retrieval accuracy and efficiency. Specifically, these methods use reinforcement learning techniques to sequentially check the points in the data trajectory and decide whether to perform a segmentation operation at each point, thus reducing the time complexity to O(mn). However, these approximation methods lack theoretical guarantees for the accuracy of the searched sub-trajectories. A recent study proposed a transformation matching algorithm aimed at precisely solving the problem of similar sub-trajectories. This algorithm locates the optimal sub-trajectory by calculating the minimum cost of transforming the query trajectory into the data trajectory and achieves a time complexity of O(mn) on various trajectory distance functions such as weighted edit distance and dynamic time warping. Although the transformation matching algorithm shows high efficiency in solving the problem of similar sub-trajectories, the length of the sub-trajectory it returns may be extremely limited (such as only containing one point), which often cannot meet the requirements of practical applications.

[0004] In addition, in the practical application of trajectory analysis, storage and query are two major challenges. Trajectory simplification technology effectively reduces the storage space requirement and improves the query efficiency by deleting non-informative points in the original trajectory, providing an effective way to solve these problems. However, most existing research has ignored the potential impact of trajectory simplification on query accuracy, that is, executing a query on the simplified database may produce results inconsistent with the original database. Summary of the Invention

[0005] The present invention aims to provide a method for searching and optimizing the similarity of trajectory segments based on dynamic programming, which can solve the above problems.

[0006] To solve the above problems, the technical solutions adopted by the present invention are as follows:

[0007] In a first aspect, the present invention provides a method for searching and optimizing the similarity of trajectory segments based on dynamic programming, including:

[0008] Obtain trajectory data and perform preprocessing to obtain a standardized data trajectory T d ;

[0009] Define a point matching sequence and a continuous point matching sequence, and compare the query trajectory T q with the standardized data trajectory T d in terms of the similarity of sub-trajectories in it, solve the similar sub-trajectory search problem, and obtain the most similar sub-trajectory;

[0010] Among them, the similar sub-trajectory search problem includes minimizing the distance between the query trajectory T q and the sub-trajectory of the standardized data trajectory T d , and a state transition equation that can retain the key feature points of the trajectory under dynamic programming; any starting point and ending point are allowed to be selected during the process of solving the state transition equation.

[0011] Specifically, the method for preprocessing the trajectory data includes data cleaning, standardization, and denoising.

[0012] Specifically, the trajectory data includes the spatial position and speed information of the trajectory, the dynamic characteristics of the trajectory, the road topology, and the lane information; the spatial position and speed information of the trajectory are obtained using the global positioning system and the inertial measurement unit; the road topology and lane information are obtained using the high-precision map; the dynamic characteristics of the trajectory, including acceleration and rotation angle, are obtained using the sensor.

[0013] Specifically, the point matching sequence PMS describes the point matching relationship between the query trajectory T q and the standardized data trajectory T d ; in the continuous point matching sequence, adjacent matching points satisfy i z+1 -iz ≤ 1 and j z+1 -j z ≤ 1, i z and i z+1 respectively represent the position indices of the z-th and (z + 1)-th matching points in the query trajectory T q , and j z and j z+1 respectively represent the position indices of the z-th and (z + 1)-th matching points in the normalized data trajectory T d .

[0014] Preferably, the end index j* of the most similar sub-trajectory is determined by the formula , and by backtracking from S[m, j of the state matrix, the start index i * of the optimal sub-trajectory can be obtained, where m is the length of the query trajectory T * , and n is the length of the normalized data trajectory T q . d

[0015] Preferably, the dynamic programming method is any one of dynamic time warping, Fréchet distance method, and longest common subsequence.

[0016] In a second aspect, the present invention provides a trajectory segment similarity search and optimization method based on dynamic programming different from the above method, including:[[]]

[0017] Obtaining trajectory data and performing preprocessing to obtain a normalized data trajectory T d ;

[0018] Defining a point matching sequence and a continuous point matching sequence, and comparing the similarity of sub-trajectories between the query trajectory T q and the normalized data trajectory T d based on a dynamic programming method, solving the similar sub-trajectory search problem, and obtaining the most similar sub-trajectory;

[0019] Among them, the similar sub-trajectory search problem includes minimizing the distance between the sub-trajectory of the query trajectory T q and the normalized data trajectory T d , and a state transition equation that can retain the key feature points of the trajectory under dynamic programming;

[0020] The state transition equation is constructed based on the user-specified sub-trajectory length C, and a matrix is introduced to record the start point of each state S i,j,k , where P[i, j] represents that in the normalized data trajectory T d , the sub-trajectory starting from T d [P[i, j], j] is the sub-trajectory most similar to the first i points of the query trajectory T q .​

[0021] After the state transition equation is calculated, by obtaining the ending index j of the most similar sub-trajectory * , P[m, j * is an element in the matrix P, representing the starting index of the most similar sub-trajectory after the state transition equation is calculated;

[0022] During the process of solving the state transition equation, any starting point and ending point are allowed to be selected.

[0023] In a third aspect, the present invention provides a method for trajectory segment similarity search and optimization based on dynamic programming different from the above method, including:

[0024] Obtaining trajectory data and performing preprocessing to obtain a standardized data trajectory T d ;

[0025] Defining a point matching sequence and a continuous point matching sequence, and comparing the query trajectory T q with the sub-trajectories in the standardized data trajectory T d to obtain the similarity of the sub-trajectories, solving the similar sub-trajectory search problem, and obtaining the most similar sub-trajectory;

[0026] Among them, the similar sub-trajectory search problem includes minimizing the distance between the query trajectory T q and the sub-trajectories of the standardized data trajectory T d , and a state transition equation that can retain the key feature points of the trajectory under dynamic programming;

[0027] The state transition equation is constructed based on the user-specified simplified trajectory length C to realize constructing a simplified trajectory by retaining the points that can best represent the original trajectory structure, and retaining the self-similarity of the trajectory by solving the most similar sub-trajectory of the simplified trajectory;

[0028] After the state transition equation is calculated, backtrack from the dynamic programming state S m,n,C in reverse to find the optimal sub-trajectory containing the trajectory point p n as the most similar sub-trajectory, where m is the length of the query trajectory T q , and n is the length of the standardized data trajectory T d ;

[0029] During the process of solving the state transition equation, any starting point and ending point are allowed to be selected.

[0030] Compared with the prior art, the beneficial effects of the present invention are:

[0031] 1) Solving the similar sub-trajectory search problem through dynamic programming ensures the accuracy of the solution from a theoretical perspective and achieves optimal search efficiency. This method is not limited to a specific trajectory similarity metric and can be extended to any trajectory similarity metric based on dynamic programming;

[0032] 2) In the similar sub-trajectory search problem, a user-specified sub-trajectory length constraint is introduced to meet the requirements of practical applications; a state matrix P is introduced during the solution process to record the starting points of the searched sub-trajectories. Through this matrix, pruning can be performed on the forward search process, and when backtracking the reverse sub-trajectory, the return result can be quickly located, further optimizing the search efficiency and reducing storage consumption.

[0033] 3) Trajectory simplification is performed by maximizing self-similarity, which retains the characteristics of the trajectory to the greatest extent and reduces the difference between the simplified trajectory search result and the original trajectory search result.

[0034] To make the above objects, features, and advantages of the present invention more obvious and understandable, specific embodiments of the present invention are hereinafter given, and in conjunction with the accompanying drawings, the following detailed description is provided. Description of the Drawings

[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 It is the overall architecture diagram of the trajectory segment similarity search and optimization based on dynamic programming for the embodiments of the present invention;

[0037] Figure 2 It is the structural diagram of the similar sub-trajectory search module for the embodiments of the present invention;

[0038] Figure 3 It is the structural diagram of the trajectory simplification module for the embodiments of the present invention.

[0039] Figure 4 It is the effectiveness of the algorithm of the embodiments of the present invention in changing the constraint length;

[0040] Figure 5 It is the efficiency under different constraint lengths for the embodiments of the present invention;

[0041] Figure 6 It is the effectiveness of the trajectory simplification algorithm in the KNN query for the embodiments of the present invention. Detailed Embodiments

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention.

[0043] An embodiment of the present invention provides a method for searching and optimizing the similarity of trajectory segments based on dynamic programming. As Figure 1 shown, the overall system architecture of this method includes a data preprocessing module, a similar sub-trajectory search module, a constrained similar sub-trajectory search module, and a trajectory simplification module. The design of these four modules is based on dynamic programming technology, improving the search efficiency through optimization algorithms and ensuring the quality of the returned sub-trajectories.

[0044] 1. Data preprocessing module

[0045] The data preprocessing module is used to preprocess the acquired trajectory data, such as data cleaning, standardization, and denoising, etc., and organize the processed information into a standardized data trajectory T d , and input it into the similar sub-trajectory search module for subsequent calculations.

[0046] In this embodiment, the trajectory data includes the spatial position and speed information of the trajectory, the dynamic characteristics of the trajectory, the road topology, and the lane information, where:

[0047] The global positioning system and inertial measurement unit are used to obtain the spatial position and speed information of the trajectory; the high-precision map is used to obtain the road topology and lane information to understand the distribution and changes of the trajectory data on the road; sensors (such as accelerometers and gyroscopes) are used to obtain the dynamic characteristics of the trajectory, including acceleration and rotation angle, etc.

[0048] 2. Similar sub-trajectory search module

[0049] The objective of the similar sub-trajectory search module is to find the sub-trajectory with the minimum distance from the standardized data trajectory T d to the query trajectory T q .

[0050] Different from traditional similar trajectory searches, the similar sub-trajectory search of the present invention allows the starting and ending points of the searched sub-trajectories to be more flexible, so as to be able to more accurately match trajectory segments of different lengths. To achieve this goal, the embodiments of the present invention are based on the dynamic time warping method to compare the similarity of all possible sub-trajectories between the query trajectory T q and the standardized data trajectory T d . As Figure 2 shown, this method uses dynamic programming to efficiently calculate the similarity between sub-trajectories, avoiding the high time complexity of brute-force enumeration.

[0051] To better understand the search for similar sub-trajectories, the present invention first defines a point matching sequence and a continuous point matching sequence.

[0052] The point matching sequence PMS describes the point matching relationship between the query trajectory T q and the normalized data trajectory T d , that is:

[0053] PMS = [(i1, j1), (i2, j2),..., (i z , j z )]

[0054] where T q is a trajectory of length m, where the indices 1 ≤ i1 ≤ i2... ≤ i z ... ≤ m, T d is a trajectory of length n, where the indices 1 ≤ j1 ≤ j2... ≤ j z ... ≤ n, (i z , j z ) indicates that the point T q in the query trajectory T q [i z and the point T d in the normalized data trajectory T d [j z are matched.

[0055] The continuous point matching sequence is a special point matching sequence, where adjacent matching points satisfy i z+1 -i z ≤ 1 and j z+1 -j z ≤ 1, that is, the point matching sequence is continuous. i z and i z+1 respectively represent the position indices of the z-th and (z + 1)-th matching points in the query trajectory T q , and j z and j z+1 respectively represent the position indices of the z-th and (z + 1)-th matching points in the normalized data trajectory T d .

[0056] In the search for similar sub-trajectories, the present invention defines S i,j as the dynamic programming state for solving the similar sub-trajectory problem, representing the minimum distance between the first i points of the query trajectory T q and any sub-trajectory ending with j of the normalized data trajectory T d , that is:

[0057]

[0058] Among them, Θ(.,.) represents the trajectory distance measure. The similar sub-trajectory search allows the selection of any starting and ending points, making the search more flexible. Its state transition equation under the dynamic time warping distance is as follows:

[0059]

[0060] Among them, q i represents the i-th point in the query trajectory T q , p j represents the j-th point in the data trajectory T d , and E(q i , p j ) is the Euclidean distance between q i and p j . When all S i,j are calculated, the end index j* of the most similar sub-trajectory is determined by the following formula:

[0061]

[0062] Then, backtrack from the state matrix S[m, j * to obtain the start index i * of the optimal sub-trajectory.

[0063] In addition to the above dynamic time warping distance, the similar sub-trajectory search can also choose to use other trajectory similarity metrics, such as the Fréchet distance and the longest common subsequence.

[0064] The Fréchet distance uses the maximum value instead of the minimum value calculation method of the dynamic time warping. Based on the above state definition, the state transition equation using the Fréchet distance is as follows:

[0065]

[0066] The state transition equation using the longest common subsequence is as follows:

[0067]

[0068] Among them, I i,j represents whether the distance between two points is less than the threshold ε. When the distance between two points is less than the threshold ε, I i,j = 1. When the distance between two points is greater than the threshold ε, I i,j = 0.

[0069] 3. Constrained Similar Sub-Trajectory Search Module

[0070] The constrained similar sub-trajectory search module requires that the length of the returned sub-trajectory is at least an integer C specified by the user. When C = 1, the constrained similar sub-trajectory search problem degenerates into the similar sub-trajectory search problem.

[0071] To ensure the validity of the returned sub-trajectory, the present invention introduces an additional state parameter in the dynamic programming matrix to record the starting index of the most similar sub-trajectory. This state matrix can reduce the computational complexity in the dynamic programming process. Specifically, when the length of the most similar sub-trajectory meets the user's requirements, the update of the dynamic programming matrix ends; otherwise, the dynamic programming matrix continues to be updated until the length constraint is satisfied.

[0072] To solve the constrained similar sub-trajectory search problem, the present invention defines a dynamic programming state S i,j,k , representing the minimum distance between the first i points of the query trajectory T q and a subsequence (with length k) of the data trajectory T d . When k = 1, the solution method for the sub-trajectory search problem can be used. Here, only the case of k ≥ 2 is given. Based on the above state definition, the state transition equation for the constrained similar sub-trajectory search problem using the dynamic time warping distance is expressed as follows:

[0073]

[0074] where S i,j,k represents the minimum distance between the first i points of the query trajectory and a sub-trajectory of the data trajectory starting from the j-th point and with a length of at least k (k ∈ [1, C]). Through the above equation, the returned sub-trajectory contains at least k points. When all states S i,j,k are calculated, the ending index j* of the most similar sub-trajectory can be obtained in the following way:

[0075]

[0076] Then, the starting index i* of the most similar sub-trajectory is traced from the state matrix.

[0077] By observing the constrained similar sub-trajectory search state, the present invention can find that if the length of a certain most similar sub-trajectory is greater than k + 1, the length of this sub-trajectory already meets the constraint, and subsequent calculations do not need to be updated. This property provides a pruning algorithm for the present invention and greatly reduces redundant calculations, optimizing the search efficiency. Specifically, by introducing a matrix for recording the starting point of each state S i,j,k , where P[i, j] represents that in the data trajectory T d , the sub-trajectory starting from T d [P[i, j], j] is the most similar to the query trajectory T qThe sub-trajectory most similar to the first i points. After all calculations are completed, the present invention can obtain the end index j of the most similar sub-trajectory through obtaining the end index j of the most similar sub-trajectory * , the matrix P is used to track the starting point of each sub-trajectory and can ultimately trace back to the starting index of the most similar sub-trajectory. P[m, j * is an element in the matrix P, representing the starting index of the most similar sub-trajectory after all S i,j,k are calculated.

[0078] 4. Trajectory Simplification Module

[0079] The purpose of the trajectory simplification module is to find a simplified sub-trajectory that best represents the original trajectory, reduce the storage cost by deleting unimportant points in the trajectory, and accelerate subsequent query operations. Traditional trajectory simplification methods ignore the accuracy of the simplified trajectory during querying, while the present invention designs to retain the self-similarity of the trajectory by solving the most similar sub-trajectory of the simplified trajectory, thereby improving the query accuracy. As Figure 3 shown, the trajectory simplification method proposed by the present invention constructs the simplified trajectory by retaining the points that best represent the structure of the original trajectory. To solve the simplified trajectory, the present invention defines the dynamic programming state S i,j,k to represent minimizing the distance between the first i points of the query trajectory T q and a subsequence (with length k) of the data trajectory T d , where the subsequence starts from T d [1] and ends at T d [j]. When k = 1 and k = 2, there are the following state transition equations:

[0080]

[0081]

[0082] When k > 2, there is the following general state transition equation:

[0083]

[0084] where, when all states S i,j,k are calculated (i.e., k ∈ [1, C]), the present invention backtracks from the dynamic programming state S m,n,C to find the optimal sub-trajectory containing the trajectory point p n to satisfy the simplified trajectory required by the trajectory simplification module, where m is the length of the query trajectory T q , n is the length of the data trajectory T d , and C is the length of the sub-trajectory returned specified by the user.

[0085] 5. Experimental Results

[0086] 1) Effect of Similar Sub-trajectory Search with Constraints

[0087] The present invention conducts experiments on the problem of similar sub-trajectory search with constraints for different algorithms and distance functions on ChengDu and Porto datasets to evaluate the effectiveness of the proposed method. As Figure 4 shown, the value range of the constraint length C is from 1 to 7. It can be observed from the experimental results that when C = 1, RLS performs best compared with other approximation algorithms. However, for other constraint values, the performance of RLS drops sharply because it may need to be specially designed to handle the length constraint conditions during the training process. The performance of other approximation algorithms is relatively stable when C changes, showing the robustness of these methods. Among all approximation algorithms, when C = 1, CMA and the method of the present invention perform superiorly because they can provide exact solutions to the similar sub-trajectory search problem under the dynamic time warping distance and Fréchet distance metrics. However, CMA cannot work when C ≠ 1, while the algorithm of the present invention can flexibly adapt according to different requirements of users for the minimum length of the searched sub-trajectory.

[0088] In addition, the present invention conducts experiments on the running time of all competing algorithms. As Figure 5 shown, where ours / woP represents the running time of the algorithm of the present invention without the pruning algorithm. Compared with ExactS, the speed of other algorithms is increased by more than 10 times. When the constraint length C is equal to 1, the efficiency of CMA and the algorithm of the present invention is comparable, and the efficiency of ours / woP is slightly faster than the original algorithm of the present invention because the pruning technique is only effective when C > 1 and requires additional recording and updating of matrix P. As C increases, the algorithm curve of the present invention integrating the pruning technique becomes flatter because it can reduce the number of updates of the DP matrix S. This observation proves the effectiveness of the pruning algorithm proposed by the present invention. Although the running time of the algorithm of the present invention increases with the increase of the constraint length C, its efficiency is still comparable to that of approximation algorithms such as PSS.

[0089] 2) Effect of Trajectory Simplification

[0090] Figure 6 Shows the experimental results of three datasets under different trajectory metrics, where the K values are set to 5 and 10, denoted as ACC5 and ACC10 respectively. The experimental results show that compared with other competing algorithms, solving trajectory simplification by the present invention can achieve the best query accuracy in most cases. This result indicates that maintaining self-similarity helps to maintain the trajectory distance distribution in the entire database.

[0091] The above experimental results indicate the effectiveness of the trajectory segment similarity search and optimization method based on dynamic programming proposed by the present invention in terms of trajectory simplification and query accuracy. The present invention can provide an accurate solution to the problem of searching for similar sub-trajectories with constraints, and is comparable to other approximate algorithms in terms of running time. In the problem of trajectory simplification, the present invention can effectively improve the query accuracy and performs excellently under the dynamic time warping distance metric.

[0092] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A trajectory segment similarity search and optimization method based on dynamic programming, characterized in that: include: Obtain trajectory data and preprocess it to obtain standardized data trajectory T d ; Define point matching sequence and continuous point matching sequence, and compare query trajectory T based on dynamic programming method q With the normalized data trajectory T d The similarity of neutron trajectories is used to solve the similar sub-trajectory search problem and obtain the most similar sub-trajectory; The similar sub-trajectory search problem consists of minimizing the query trajectory T q With the normalized data trajectory T d The distance between the sub-trajectories, and the state transfer equation that can retain the key feature points of the trajectory under dynamic programming; It allows the selection of any starting and ending points in solving the process state transition equations.

2. The trajectory segment similarity search and optimization method based on dynamic programming according to claim 1, characterized in that: Methods for preprocessing trajectory data include data cleaning, standardization and denoising.

3. The trajectory segment similarity search and optimization method based on dynamic programming according to claim 1, characterized in that: The trajectory data includes the spatial position and velocity information of the trajectory, the dynamic characteristics of the trajectory, the road topology, and the lane information; the spatial position and velocity information of the trajectory is obtained using the global positioning system and the inertial measurement unit; the road topology and lane information are obtained using a high-precision map; and the dynamic characteristics of the trajectory, including acceleration and rotation angle, are obtained using sensors.

4. The trajectory segment similarity search and optimization method based on dynamic programming according to claim 1, characterized in that: Point matching sequence PMS describes the query trajectory T q With the normalized data trajectory T d The point matching relationship between them; the adjacent matching points in the continuous point matching sequence satisfy i z+1 -i z ≤1 and j z+1 -j z ≤1,i z and i z+1 Respectively represent the query trajectory T q The position index of the zth and z+1th matching points in j z and j z+1 Represent the standardized data trajectory T d The position indices of the zth and z+1th matching points in .

5. The trajectory segment similarity search and optimization method based on dynamic programming according to claim 4 is characterized in that: The end point index j* of the most similar sub-trajectory is given by the formula Determine, from the state matrix S[m,j * ] Backtrack to get the starting index i of the optimal sub-trajectory * , where m is the query trajectory T q The length of n is the standardized data track T d Length.

6. The trajectory segment similarity search and optimization method based on dynamic programming according to claim 1, characterized in that: The dynamic programming method is any one of dynamic time warping, Fréchet distance method and longest common subsequence.

7. A trajectory segment similarity search and optimization method based on dynamic programming, characterized in that: include: Obtain trajectory data and preprocess it to obtain standardized data trajectory T d ; Define point matching sequence and continuous point matching sequence, and compare query trajectory T based on dynamic programming method q With the normalized data trajectory T d The similarity of neutron trajectories is used to solve the similar sub-trajectory search problem and obtain the most similar sub-trajectory; The similar sub-trajectory search problem consists of minimizing the query trajectory T q With the normalized data trajectory T d The distance between the sub-trajectories, and the state transfer equation that can retain the key feature points of the trajectory under dynamic programming; The state transfer equation is constructed based on the sub-trajectory length C specified by the user, introducing the matrix Record each state S i,j,k The starting point of P[i,j] is the normalized data trajectory T d In, from T d The sub-trajectory starting from [P[i,j],j] is the sub-trajectory that is consistent with the query trajectory T q The most similar sub-trajectory of the first i points; After the state transfer equation is calculated, Get the end index j of the most similar sub-trajectory * , P[m,j * ] is an element in the matrix P, which represents the starting index of the most similar sub-trajectory after the state transfer equation is calculated; It allows the selection of any starting and ending points in solving the process state transition equations.

8. A trajectory segment similarity search and optimization method based on dynamic programming, characterized in that: include: Obtain trajectory data and preprocess it to obtain standardized data trajectory T d ; Define point matching sequence and continuous point matching sequence, and compare query trajectory T based on dynamic programming method q With the normalized data trajectory T d The similarity of neutron trajectories is used to solve the similar sub-trajectory search problem and obtain the most similar sub-trajectory; The similar sub-trajectory search problem consists of minimizing the query trajectory T q With the normalized data trajectory T d The distance between the sub-trajectories, and the state transfer equation that can retain the key feature points of the trajectory under dynamic programming; The state transfer equation is constructed based on the simplified trajectory length C specified by the user to achieve the simplified trajectory by retaining the points that best represent the original trajectory structure, and the self-similarity of the trajectory is retained by solving the most similar sub-trajectory of the simplified trajectory; After the state transfer equation is calculated, the dynamic programming state S m,n,C Backtrack to find the point p that contains the trajectory n The optimal sub-trajectory of is taken as the most similar sub-trajectory, where m is the query trajectory T q The length of n is the standardized data track T d Length; It allows the selection of any starting and ending points in solving the process state transition equations.