A sparse trajectory space reconstruction method and system based on probability distribution model

Through the sparse trajectory space reconstruction method based on the probability distribution model, GPS trajectory data and Bayesian classifier calculate the probability of vehicle paths, the data dependence and reconstruction accuracy problems in sparse automatic vehicle identification trajectory reconstruction are solved, and more efficient and accurate trajectory reconstruction is achieved.

CN116775782BActive Publication Date: 2025-08-19CHONGQING UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310578385.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-22
Publication Date
2025-08-19
Estimated Expiration
2043-05-22

AI Technical Summary

Technical Problem

The prior art has data dependency problems and reconstruction accuracy problems in sparse automatic vehicle identification trajectory reconstruction, making it difficult to improve the accuracy of trajectory reconstruction while reducing data dependency.

Method used

A sparse trajectory space reconstruction method based on the probability distribution model is used to construct a trajectory network through GPS trajectory data, a Bayesian classifier is used to calculate the probability of the vehicle path, and the EM algorithm is used to optimize the model parameters, and the path with the maximum probability is selected as the vehicle's trajectory.

Benefits of technology

With the reduction of data dependence, the accuracy and efficiency of trajectory reconstruction are improved and there is a high application prospect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116775782B_ABST
    Figure CN116775782B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for spatial reconstruction of sparse trajectories based on a probability distribution model, and belongs to the technical field of spatial reconstruction of automatic vehicle identification trajectories. The method comprises the following steps: S1, constructing a trajectory network through GPS trajectory data, wherein the trajectory network includes all possible roads that a vehicle may pass through when traveling on urban roads; S2, when a vehicle travels in the trajectory network, using a Bayesian classifier to calculate the probability of the vehicle taking each path, and selecting the path with the highest probability as the vehicle's trajectory; S3, using the overall model to reconstruct the trajectory of a test set, and evaluating and analyzing the prediction error based on the prediction results and actual data. The present invention can more accurately reconstruct the spatial trajectory of a vehicle while reducing data dependence, has higher efficiency and higher accuracy than existing methods, and has a broad application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of spatial reconstruction of automatic vehicle recognition trajectories, and relates to a sparse trajectory spatial reconstruction method and system based on a probability distribution model. Background Art

[0002] Automatic vehicle identification (AVI) data can capture information about all vehicles on the road, but its sampling rate is very low. This is because AVI equipment cannot record vehicle locations in real time; it can only record vehicle information as it passes through a collection point. Due to environmental and economic constraints, collection points in urban road networks are often sparsely distributed, with the distance between two adjacent collection points ranging from a few hundred meters to several kilometers. This directly leads to very sparse vehicle trajectories based on AVI data. Existing research has shown that sparse vehicle trajectories can lead to a loss of detail in the trajectories, severely impacting subsequent research and applications. Therefore, if AVI trajectories are to fully leverage their advantages and role in the development of intelligent transportation systems, they must be reconstructed.

[0003] Trajectory reconstruction for this type of data involves reconstructing the fine-grained spatiotemporal position of the trajectory between two adjacent points. In existing research, trajectory reconstruction for fixed collection points is often approached as a path matching problem. This involves using road network data to find the path space between adjacent collection points. A suitable road is then selected within this path space using a specific path selection method. The time the vehicle spends at each point on the road is then calculated as the reconstructed vehicle trajectory. These path selection methods can be categorized into two main types: those based on traffic flow theory (TFT) and those based on statistical modeling.

[0004] Both methods suffer from numerous issues, the most significant of which are data dependency and reconstruction accuracy. Data dependency refers to the extreme difficulty of reconstructing trajectory data from fixed collection points, as the collection points are often sparsely distributed. Reconstructing such data often requires additional data, such as road network data, which can be used to transform trajectory reconstruction into a path selection problem (all of the methods described previously require this assistance). After reconstruction, GPS data or simulations are then used to verify the accuracy of the reconstruction. However, both the auxiliary road network data and the GPS data used for verification are extremely difficult to obtain, and simulation experiments often lack persuasiveness. Existing methods cannot reconstruct such trajectories without road network data. This data dependency is a significant issue in this type of trajectory reconstruction. The reconstruction accuracy issue is that, because the trajectory data contains very little known information, while the information required to be predicted is substantial, the accuracy of trajectory reconstruction is inevitably much lower than that of moving point trajectories. In summary, how to improve the accuracy of trajectory reconstruction while reducing data dependence is an urgent problem that needs to be solved in the reconstruction of trajectory data at fixed collection points. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a sparse trajectory space reconstruction method and system based on a probability distribution model. This solution does not rely on the probability distribution model of road network data to reconstruct the automatic vehicle identification trajectory. The trajectory network is constructed through the GPS trajectory of taxis. When the vehicle travels in the trajectory network, a Bayesian classifier is used to select a probabilistic path for the vehicle. This can more accurately reconstruct the vehicle's spatial trajectory while reducing data dependence.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A sparse trajectory space reconstruction method based on a probability distribution model comprises the following steps: S1. constructing a trajectory network using GPS trajectory data, wherein the trajectory network includes all possible roads that a vehicle may pass through when traveling on urban roads; S2. using a Bayesian classifier to calculate the probability of the vehicle taking each path when traveling in the trajectory network, and selecting the path with the highest probability as the vehicle's trajectory; S3. reconstructing the trajectory of a test set using the overall model, and evaluating and analyzing the prediction error based on the prediction results and actual data.

[0008] Furthermore, in step S1, constructing a trajectory network using GPS trajectory data specifically includes:

[0009] S11. Trajectory space similarity measurement:

[0010] The trajectory similarity metric chosen is to calculate the longest common sub-sequence (LCSS) between the trajectories. For two given trajectories Tr1 and Tr2, the calculation formula of LCSS is as follows:

[0011]

[0012] From the calculation formula of LCSS, it can be seen that when the similarity between two trajectories is higher, the value of LCSS is larger;

[0013] In the present invention, the LCSS used are all normalized LCSS, and the name of LCSS is still used; for given trajectories Tr1 and Tr2, the calculation formula of the normalized LCSS is as follows:

[0014]

[0015] The normalized LCSS calculation result is between 0 and 1. The closer the value is to 0, the more similar the two trajectories are, and the closer the value is to 1, the greater the difference between the two trajectories.

[0016] S12, DBSCAN trajectory clustering:

[0017] For a given pair of AVI adjacent points (C A ,C B ) and the set of neighboring point trajectories Use the DBSCAN algorithm to distinguish different paths between the point pairs. First, give the following definition:

[0018] Definition 1: Trajectory space neighborhood: For a given set of neighboring trajectories and one of the GPS tracks Tr X , its spatial neighborhood refers to the set of trajectories at the neighboring point In the given trajectory Tr X The set of trajectories whose trajectory similarity is less than a pre-set threshold ε (the smaller the LCSS value, the more similar the trajectories are), is denoted by N(X);

[0019] Definition 2: Core trajectory: For a given set of neighboring trajectories and one of the GPS tracks Tr X , if the trajectory Tr X The number of trajectories in the spatial neighborhood of is greater than the pre-set hyperparameter MinPts, then the trajectory Tr X It is a core track in this set;

[0020] Definition 3: Spatial direct trajectory: For a given set of neighboring point trajectories and one of the GPS tracks Tr X , Tr X Any trajectory in its spatial neighborhood is spatially direct;

[0021] Definition 4: Spatially reachable trajectory: For a given set of neighboring trajectories And two of the GPS tracks Tr X and Tr Y , if there is a spatial direct sequence (Tr X ,Tr1,Tr2,…Tr n ,Tr Y ), where any two adjacent trajectories are directly connected in space, then it is called Tr X and Tr Y is a spatially reachable trajectory;

[0022] Definition 5: Spatially connected trajectory: For a given set of neighboring point trajectories And two of the GPS tracks Tr X and Tr Y , if the neighboring point trajectory set There is a core trajectory Tr in Z , so that the trajectory Tr X and Tr Y Both with trajectory Tr C The space is reachable, then it is called the trajectory Tr X and trajectory Tr Y It is spatially connected;

[0023] Use DBSCAN algorithm to find adjacent point pairs (C A ,C B ) and the set of neighboring point trajectories When clustering to generate a trajectory network, the following steps are mainly involved:

[0024] 1) For a given set of trajectories, use the formula to calculate the similarity between trajectories;

[0025] 2) Find core trajectories as temporary clusters: For a trajectory in the trajectory set, if the number of trajectories within its radius is greater than the preset value MinPts, then the trajectory is set as a core trajectory; scan all trajectories to find all core points and their clusters, that is, all temporary clusters;

[0026] 3) For each temporary cluster, check whether the trajectory in it is a core trajectory. If so, set the cluster to be merged with the current cluster to obtain a new temporary cluster;

[0027] 4) Repeat step 3) until all temporary clusters have been scanned and processed; after clustering, the adjacent point pairs (C A ,C B ) and the set of neighboring point trajectories A collection divided into one or more clusters in Indicates the kth cluster in the result, each cluster represents a line from C A to C B The clustering result indicates the path from C A to C B There are m clusters in total, i.e., m possible paths; in each cluster, the trajectory with the largest number in the trajectory neighborhood is selected as the path represented by the trajectory cluster.

[0028] Furthermore, in step S2, the present invention designs a multi-path travel time distribution model. By learning the different travel time distributions of taxis on different roads between the adjacent point pairs, the present invention calculates the probability of the vehicle taking each path when the vehicle passes through the adjacent point pair with a travel time t, and selects the path with the highest probability as the vehicle's travel path. Specifically, the model includes:

[0029] S21. Multi-path travel time distribution model:

[0030] For a given pair of adjacent points (C A ,C B ), and its neighboring point trajectory set N represents the total number of trajectories passing through the adjacent point pair, and each trajectory passes through the adjacent point pair (C A ,C B ) has a time t corresponding to it, and its time set is expressed as T={t1,t2,…,t N}, where t i Represents the trajectory Tr i The travel time;

[0031] gather The neighboring point trajectory cluster after clustering is expressed as For the i-th cluster Using N i Represents the total number of trajectories in the cluster, using the set T i To represent the travel time set T within the cluster i = in Represents a cluster The kth trajectory in the A ,C B ) time; use P(t) to represent the travel time distribution of the travel time set T of the neighboring point trajectory, and use Pi (t) represents the time set T when the vehicle passes through the adjacent point pair via the i-th road i The travel time distribution of , their relationship is expressed as follows:

[0032]

[0033] where α i The prior probability of the vehicle taking the i-th road can be obtained from the set of neighboring point trajectories before and after clustering:

[0034]

[0035] Given a given pair of adjacent points (C A ,C B ), and its neighboring point trajectory set N represents the total number of trajectories in the set before clustering; the set of neighboring point trajectories after clustering is expressed as Using N i To represent the i-th cluster The total number of trajectories in ;

[0036] In the above formula, α i is known, and the i-th cluster, that is, the travel time distribution P on the i-th road i (t) is unknown, so we need to calculate the travel time distribution set on the i-th road. Fit the travel time distribution model on the road; for the i-th cluster, that is, the travel time distribution P on the i-th road i (t), based on the different traffic conditions of the road, the travel time distribution of the road is divided into two states, namely the fast passing state (move) and the congested state (cong), using Denotes the travel time distribution of a vehicle quickly passing through the i-th road, using represents the travel time distribution of vehicles congested through the i-th road, and the relationship between them is expressed as follows:

[0037]

[0038] in represents the probability of a vehicle passing quickly on the i-th road, represents the probability of a vehicle passing through the i-th road in traffic congestion;

[0039] When vehicles pass through a road quickly, their travel time distribution can be represented by a lognormal distribution model. Previous studies have shown that when vehicles pass through a road in a congested state, their travel time distribution can be fitted by a normal distribution model. and The calculation model can be expressed as follows:

[0040]

[0041]

[0042] in and They represent the expectation and standard deviation of the lognormal distribution model when the vehicle passes through the i-th road quickly; and They represent the expectation and standard deviation of the normal distribution model when the congestion passes through the i-th road;

[0043] Therefore, the travel time distribution model of the i-th road is expressed as follows:

[0044]

[0045] The parameters can be expressed as

[0046] S22. Model parameter calculation:

[0047] For adjacent point pairs (C A ,C B ) on the i-th road, the travel time distribution model P i (t) and its model parameters θ i , use the EM algorithm to calculate its optimal parameters; the time data on the i-th road comes from the travel time set of the i-th cluster in the clustering result The goal is to find the optimal parameter θ i Make its likelihood function reach its maximum value, that is:

[0048]

[0049] Use the EM algorithm to calculate θ i The calculation is divided into two steps: E step and M step. By continuously iterating the E step and M step, the parameters that can maximize the model likelihood function can be calculated. The steps for calculating the model parameters using the EM algorithm are as follows:

[0050] 2) Initialization: Randomly initialize the parameter θ i

[0051] 2) Step E: According to the parameters after the k-1th iteration Calculate the time corresponding to each trajectory in the collection Belong to each category of state z j Probability of:

[0052]

[0053] 3) Step M: Recalculate the model parameters based on the results obtained in step E:

[0054]

[0055] 4) Iteration: By continuously iterating the E step and M step, we can finally get the parameter θ that maximizes the model likelihood function. i , the specific iteration formula is as follows:

[0056]

[0057]

[0058]

[0059] The above formula means that for a fixed road i, the travel time of a trajectory j traveling on the road is According to travel time Calculate the probability of whether the trajectory's driving state is fast passing or congested passing under the current parameters;

[0060]

[0061]

[0062]

[0063]

[0064]

[0065] The above formula means that after calculating the Q values of all samples under the current parameters, the Q values of all samples are used to update the parameters of the model, including the expectation and standard deviation of the two distributions, as well as the weight values of the two distributions;

[0066] S23, Path Selection:

[0067] For a pair of adjacent points (C A ,C B ), when a vehicle passes through the adjacent point pair at time t, the probability P(t) of appearing between the adjacent point pairs at that time and the probability P(t) of appearing on the i-th road at that time are calculated by the following formulas. i (t) and the probability of the vehicle passing through the adjacent point pair from the i-th road, and the road with the largest probability is considered to be the path taken by the vehicle:

[0068]

[0069]

[0070]

[0071] Furthermore, in step S3, the trajectory of the test set is reconstructed using the overall model, and the prediction error is evaluated and analyzed based on the prediction results and actual data. The main evaluation indicators include:

[0072] Longest Common Sub-Sequence (LCSS): A metric used to measure the length of the longest common subsequence between two target sequences. It allows skipping trajectory points when necessary, which helps reduce the impact of noise.

[0073] Dynamic Time Warping (DTW): A time series similarity metric used to measure the distance between two time series. It allows for time series to be out of sync, i.e., aligned differently. The DTW method minimizes the distance between two series by aligning their corresponding elements.

[0074] Edit Distance on Real Sequence (EDR): A metric used to calculate the similarity between two sequences. Similar to DTW and LCSS, EDR can also handle situations where sequences have different lengths and is robust to noise. Unlike DTW, EDR calculates the distance between two sequences by considering the minimum cost of deletion, insertion, and substitution operations between them.

[0075] The beneficial effects of the present invention are:

[0076] The present invention provides a sparse trajectory space reconstruction method and system based on a probability distribution model. This solution does not rely on the probability distribution model of road network data to reconstruct automatic vehicle identification trajectories. Instead, it constructs a trajectory network using taxi GPS trajectories. When a vehicle travels in the trajectory network, a Bayesian classifier is used to select a probabilistic path for the vehicle. This method can more accurately reconstruct the vehicle's spatial trajectory while reducing data dependence. Compared with existing methods, it has higher efficiency and higher accuracy and has broad application prospects.

[0077] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below with reference to the accompanying drawings, in which:

[0079] Figure 1 It is a model diagram of the present invention;

[0080] Figure 2 It is the experimental effect diagram of the present invention. DETAILED DESCRIPTION

[0081] The technical solution of the present invention is described in detail below with reference to the accompanying drawings.

[0082] Figure 1 This is a model diagram of the present invention. As shown in the figure, the present invention provides a sparse trajectory space reconstruction method based on a probability distribution model, which mainly includes the following steps: S1. Constructing a trajectory network using GPS trajectory data. The trajectory network includes all possible roads that a vehicle may pass through when traveling on urban roads; S2. When a vehicle travels in the trajectory network, a Bayesian classifier is used to calculate the probability of the vehicle taking each path, and the path with the highest probability is selected as the vehicle's trajectory; S3. Using the proposed overall model, the trajectory of the test set is reconstructed, and the prediction error is evaluated and analyzed based on the prediction results and actual data.

[0083] In this embodiment, step S1 of constructing a trajectory network using GPS trajectory data specifically includes:

[0084] S11. Trajectory space similarity measurement:

[0085] In trajectory clustering, the most important parameter is the similarity measure between trajectories. The quality of the trajectory similarity measure directly determines the clustering result. In the present invention, the trajectory similarity measure selected is by calculating the longest common subsequence (LCSS) between the trajectories. LCSS has several advantages. First, it can handle trajectory sequences of unequal lengths. In a set of neighboring point trajectories between adjacent acquisition points, the lengths of different GPS trajectories are very likely to be different. This is highly related to road traffic conditions, vehicle speed, and taxi sampling frequency, and LCSS can handle such sequences of unequal lengths. Second, when calculating LCSS, some trajectory points can be skipped if necessary. This is crucial in clustering neighboring point trajectory sets because GPS devices have partial offsets, and LCSS can effectively process these offset data. For two given trajectories Tr1 and Tr2, the calculation formula of LCSS is as follows:

[0086]

[0087] The LCSS calculation formula shows that the higher the similarity between two trajectories, the larger the LCSS value. However, in practice, the normalized LCSS is often used. In many literatures, although the normalized LCSS is used, its name remains unchanged, and it is still LCSS. Therefore, in this invention, the LCSS used is the normalized LCSS and the name LCSS is still used. For given trajectories Tr1 and Tr2, the normalized LCSS is calculated as follows:

[0088]

[0089] As can be seen from the two formulas, using normalized LCSS has two advantages. First, it can eliminate the influence of trajectories of different lengths on trajectory similarity, so that the similarity between trajectories is no longer affected by trajectory length, and the similarity between trajectories can be measured uniformly. Second, it makes the LCSS indicator more intuitive and easy to understand. The normalized LCSS intuitively describes the percentage difference between trajectories from the calculation results. The normalized LCSS calculation result is between 0 and 1. The closer the value is to 0, the more similar the two trajectories are, and the closer the value is to 1, the greater the difference between the two trajectories.

[0090] S12, DBSCAN trajectory clustering:

[0091] For a given pair of AVI adjacent points (C A ,C B ) and the set of neighboring point trajectories Use the DBSCAN algorithm to distinguish different paths between the point pairs. First, give the following definition:

[0092] Definition 1: Trajectory space neighborhood: For a given set of neighboring trajectories and one of the GPS tracks Tr X , its spatial neighborhood refers to the set of trajectories at the neighboring point In the given trajectory Tr X The set of trajectories whose trajectory similarity is less than a pre-set threshold ε (the smaller the LCSS value, the more similar the trajectories are), is denoted by N(X);

[0093] Definition 2: Core trajectory: For a given set of neighboring trajectories and one of the GPS tracks Tr X , if the trajectory Tr X The number of trajectories in the spatial neighborhood of is greater than the pre-set hyperparameter MinPts, then the trajectory Tr X It is a core track in this set;

[0094] Definition 3: Spatial direct trajectory: For a given set of neighboring point trajectories and one of the GPS tracks Tr X , Tr X Any trajectory in its spatial neighborhood is spatially direct;

[0095] Definition 4: Spatially reachable trajectory: For a given set of neighboring trajectories And two of the GPS tracks Tr X and Tr Y , if there is a spatial direct sequence (Tr X ,Tr1,Tr2,…Tr n ,Tr Y ), where any two adjacent trajectories are directly connected in space, then it is called Tr X and Tr Y is a spatially reachable trajectory;

[0096] Definition 5: Spatially connected trajectory: For a given set of neighboring point trajectories And two of the GPS tracks Tr X and Tr Y , if the neighboring point trajectory set There is a core trajectory Tr in Z , so that the trajectory Tr X and Tr Y Both with trajectory Tr C The space is reachable, then it is called the trajectory Tr X and trajectory Tr Y It is spatially connected;

[0097] Use DBSCAN algorithm to find adjacent point pairs (C A ,C B ) and the set of neighboring point trajectories When clustering to generate a trajectory network, the following steps are mainly involved:

[0098] 1) For a given set of trajectories, use the formula to calculate the similarity between trajectories;

[0099] 2) Find core trajectories as temporary clusters: For a trajectory in the trajectory set, if the number of trajectories within its radius is greater than the preset value MinPts, then the trajectory is set as a core trajectory; scan all trajectories to find all core points and their clusters, that is, all temporary clusters;

[0100] 3) For each temporary cluster, check whether the trajectory in it is a core trajectory. If so, set the cluster to be merged with the current cluster to obtain a new temporary cluster;

[0101] 4) Repeat step 3) until all temporary clusters have been scanned and processed;

[0102] After clustering, adjacent point pairs (C A ,C B ) and the set of neighboring point trajectories A collection divided into one or more clusters in Indicates the kth cluster in the result, each cluster represents a line from C A to C B The clustering result indicates the path from C A to C B There are m clusters in total, i.e., m possible paths; in each cluster, the trajectory with the largest number in the trajectory neighborhood is selected as the path represented by the trajectory cluster.

[0103] In step S2, after the trajectory network is constructed, there are one or more paths between adjacent point pairs in the network. At this time, when a vehicle is traveling between a pair of adjacent point pairs, if there is only one path between the adjacent point pairs, it can be inferred that when the vehicle passes through the adjacent point pair, it must take this unique path; when there are multiple paths between the adjacent point pairs, a path selection problem will arise. The key point of this problem is how to choose the right path for the vehicle; this problem is a very challenging problem. The difficulty lies in the fact that there are too few known conditions. When a vehicle passes through an adjacent point pair (C A ,C B ), the only known information is that the vehicle passes through C A Time, vehicle passing C B Given the time and duration t of the vehicle on this road, calculating the path taken by the vehicle using this limited time is a very challenging problem. To this end, the present invention designs a multi-path travel time distribution model. By learning the different travel time distributions of taxis on different roads between adjacent point pairs, the probability of the vehicle taking each path when the vehicle passes through the adjacent point pair with a travel time t is calculated, and the path with the highest probability is selected as the vehicle's travel path. Specifically, the model includes:

[0104] S21. Multi-path travel time distribution model:

[0105] For a given pair of adjacent points (C A ,C B ), and its neighboring point trajectory set N represents the total number of trajectories passing through the adjacent point pair, and each trajectory passes through the adjacent point pair (C A ,C B) has a time t corresponding to it, and its time set is expressed as T={t1,t2,…,t N}, where t i Represents the trajectory Tr i The travel time;

[0106] gather The neighboring point trajectory cluster after clustering is expressed as For the i-th cluster Using N i Represents the total number of trajectories in the cluster, using the set T i To represent the set of travel times within the cluster in Represents a cluster The kth trajectory in the A ,C B ) time; use P(t) to represent the travel time distribution of the travel time set T of the neighboring point trajectory, and use P i (t) represents the time set T when the vehicle passes through the adjacent point pair via the i-th road i The travel time distribution of , their relationship is expressed as follows:

[0107]

[0108] where α i The prior probability of the vehicle taking the i-th road can be obtained from the set of neighboring point trajectories before and after clustering:

[0109]

[0110] Given a given pair of adjacent points (C A ,C B ), and its neighboring point trajectory set N represents the total number of trajectories in the set before clustering; the set of neighboring point trajectories after clustering is expressed as Using N i To represent the i-th cluster The total number of trajectories in ;

[0111] In the above formula, α i is known, and the i-th cluster, that is, the travel time distribution P on the i-th road i (t) is unknown, so we need to calculate the travel time distribution set on the i-th road. Fit the travel time distribution model on the road; for the i-th cluster, that is, the travel time distribution P on the i-th road i(t), based on the different traffic conditions of the road, the travel time distribution of the road is divided into two states, namely the fast passing state (move) and the congested state (cong), using Denotes the travel time distribution of a vehicle quickly passing through the i-th road, using represents the travel time distribution of vehicles congested through the i-th road, and the relationship between them is expressed as follows:

[0112]

[0113] in represents the probability of a vehicle passing quickly on the i-th road, represents the probability of a vehicle passing through the i-th road in traffic congestion;

[0114] When vehicles pass through a road quickly, their travel time distribution can be represented by a lognormal distribution model. Previous studies have shown that when vehicles pass through a road in a congested state, their travel time distribution can be fitted by a normal distribution model. and The calculation model can be expressed as follows:

[0115]

[0116]

[0117] in and They represent the expectation and standard deviation of the lognormal distribution model when the vehicle passes through the i-th road quickly; and They represent the expectation and standard deviation of the normal distribution model when the congestion passes through the i-th road;

[0118] Therefore, the travel time distribution model of the i-th road is expressed as follows:

[0119]

[0120] The parameters can be expressed as

[0121] S22. Model parameter calculation:

[0122] For adjacent point pairs (C A ,C B ) on the i-th road, the travel time distribution model P i (t) and its model parameters θ i , use the EM algorithm to calculate its optimal parameters; the time data on the i-th road comes from the travel time set of the i-th cluster in the clustering result The goal is to find the optimal parameter θ i Make its likelihood function reach its maximum value, that is:

[0123]

[0124] Use the EM algorithm to calculate θ i The calculation is divided into two steps: E step and M step. By continuously iterating the E step and M step, the parameters that can maximize the model likelihood function can be calculated. The steps for calculating the model parameters using the EM algorithm are as follows:

[0125] 3) Initialization: Randomly initialize the parameter θ i

[0126] 2) Step E: According to the parameters after the k-1th iteration Calculate the time corresponding to each trajectory in the collection Belong to each category of state z j Probability of:

[0127]

[0128] 3) Step M: Recalculate the model parameters based on the results obtained in step E:

[0129]

[0130] 4) Iteration: By continuously iterating the E step and M step, we can finally get the parameter θ that maximizes the model likelihood function. i , the specific iteration formula is as follows:

[0131]

[0132]

[0133]

[0134] The above formula means that for a fixed road i, the travel time of a trajectory j traveling on the road is According to travel time Calculate the probability of whether the trajectory's driving state is fast passing or congested passing under the current parameters;

[0135]

[0136]

[0137]

[0138]

[0139]

[0140] The above formula means that after calculating the Q values of all samples under the current parameters, the Q values of all samples are used to update the parameters of the model, including the expectation and standard deviation of the two distributions, as well as the weight values of the two distributions;

[0141] S23, Path Selection:

[0142] For a pair of adjacent points (C A ,C B ), when a vehicle passes through the adjacent point pair at time t, the probability P(t) of appearing between the adjacent point pairs at that time and the probability P(t) of appearing on the i-th road at that time are calculated by the following formulas. i (t) and the probability of the vehicle passing through the adjacent point pair from the i-th road, and the road with the largest probability is considered to be the path taken by the vehicle:

[0143]

[0144]

[0145]

[0146] In this embodiment, step S3 uses the overall model to reconstruct the trajectory of the test set, and evaluates and analyzes the prediction error based on the prediction results and actual data:

[0147] Experimental data:

[0148] In this example, two real-world automatic vehicle identification datasets from Chongqing were used. Dataset 1 contains 330 RFID monitoring points in Chongqing's main urban area. These monitoring points are spatially unevenly distributed, and their neighboring relationships can be determined from their trajectory data. The distance between two adjacent detection points ranges from a few hundred meters to several kilometers, with complex road structures in between, resulting in high uncertainty in the trajectories between adjacent points. Dataset 2 contains 47 RFID detection points on Chongqing's Inner Ring Expressway. The Inner Ring Expressway has a simple road structure without complex side roads, resulting in a relatively uniform path between two adjacent collection points and low uncertainty. The final dataset contains GPS data from over 15,000 taxis in Chongqing for October 1, 2021, to October 31, 2021. Chongqing taxi GPS devices record taxi locations every 10-15 seconds, resulting in approximately 1.5 billion taxi records for that month. After extracting the taxi trips, approximately 12 million passenger trips were recorded. This was used to train the model.

[0149] Evaluation indicators:

[0150] Longest Common Sub-Sequence (LCSS): A metric used to measure the length of the longest common subsequence between two target sequences. It allows skipping trajectory points when necessary, which helps reduce the impact of noise.

[0151] Dynamic Time Warping (DTW): A time series similarity metric used to measure the distance between two time series. It allows for time series to be out of sync, i.e., aligned differently. The DTW method minimizes the distance between two series by aligning their corresponding elements.

[0152] Edit Distance on Real Sequence (EDR): A metric used to calculate the similarity between two sequences. Similar to DTW and LCSS, EDR can also handle situations where sequences have different lengths and is robust to noise. Unlike DTW, EDR calculates the distance between two sequences by considering the minimum cost of deletion, insertion, and substitution operations between them.

[0153] Experimental results:

[0154] Trajectory reconstruction from automatic vehicle identification data is a relatively new problem and there is little research on it. This paper considers the following successful methods for comparison: RICK, MPR, and HMM.

[0155] In this example, the dataset was divided into a training set and a test set in a ratio of 8:2. The training set was first used to construct a trajectory network. The EM algorithm was then used to fit a travel time distribution model for each path in the trajectory network. The model's performance was then tested using the training set data. The AVI trajectory from the test set was input. After the model reconstructed the spatial trajectory of the trajectory, it was compared with the vehicle's GPS trajectory and the error was calculated. The reconstruction results are shown in the following table.

[0156]

[0157] From the trajectory space reconstruction results, it can be seen that in the simple dataset AVI dataset 2, the method proposed by the present invention and the three comparison methods all achieved good results. The gap between the predicted trajectory and the true trajectory was very small. Among them, the method proposed by the present invention performed the best. Among the traditional methods, the RICK method's trajectory space reconstruction effect was not much different from MPR, and it was better than another traditional method HMM. In the complex dataset AVI dataset 1, the effectiveness of various methods for trajectory space reconstruction declined, which is highly related to its complex road structure. However, the overall performance trend of the model remained unchanged. The method proposed by the present invention still outperformed the traditional methods, followed by RICK and MPR, and HMM was the worst. The reason for the poor performance of the HMM method may be related to the error caused by correcting the trajectory position during the trajectory processing process.

[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified without departing from the purpose and scope of the technical solutions, which should all be included in the scope of the claims of the present invention.

Claims

1. A sparse trajectory space reconstruction method based on a probability distribution model, characterized by: The method comprises the following steps: S1. Construct a trajectory network using GPS trajectory data. The trajectory network includes all possible roads that a vehicle may pass through when driving on urban roads. S2. When the vehicle is traveling in the trajectory network, the Bayesian classifier is used to calculate the probability of the vehicle taking each path, and the path with the highest probability is selected as the vehicle's trajectory; S3. Use the overall model to reconstruct the trajectory of the test set and evaluate and analyze the prediction error based on the prediction results and actual data; In step S1, constructing a trajectory network using GPS trajectory data specifically includes: S11. Trajectory space similarity measurement: The trajectory similarity metric chosen is to calculate the longest common sub-sequence (LCSS) between the trajectories. For two given trajectories Tr1 and Tr2, the calculation formula of LCSS is as follows: It can be seen from the calculation formula of LCSS that the higher the similarity between two trajectories, the larger the LCSS value. In this invention, the LCSS used are all normalized LCSS, and the name of LCSS is still used. For given trajectories Tr1 and Tr2, the calculation formula of the normalized LCSS is as follows: The normalized LCSS calculation result is between 0 and 1. The closer the value is to 0, the more similar the two trajectories are, and the closer the value is to 1, the greater the difference between the two trajectories. S12, DBSCAN trajectory clustering: For a given pair of AVI adjacent points (C A ,C B ) and the set of neighboring point trajectories The DB SCAN algorithm is used to distinguish different paths between the point pairs. First, the following definition is given: Definition 1: Trajectory space neighborhood: For a given set of neighboring trajectories and one of the GPS tracks Tr X , its spatial neighborhood refers to the set of trajectories at the neighboring point In the given trajectory Tr X The set of trajectories whose trajectory similarity is less than the pre-set threshold ε is represented by N(X); Definition 2: Core trajectory: For a given set of neighboring trajectories and one of the GPS tracks Tr X , if the trajectory Tr X The number of trajectories in the spatial neighborhood of is greater than the pre-set hyperparameter MinPts, then the trajectory Tr X It is a core track in this set; Definition 3: Spatial direct trajectory: For a given set of neighboring point trajectories and one of the GPS tracks Tr X , Tr X Any trajectory in its spatial neighborhood is spatially direct; Definition 4: Spatially reachable trajectory: For a given set of neighboring trajectories And two of the GPS tracks Tr X and Tr Y , if there is a spatial direct sequence (Tr X ,Tr1,Tr2,…Tr n ,Tr Y ), where any two adjacent trajectories are directly connected in space, then it is called Tr X and Tr Y is a spatially reachable trajectory; Definition 5: Spatially connected trajectory: For a given set of neighboring point trajectories And two of the GPS tracks Tr X and Tr Y , if the neighboring point trajectory set There is a core trajectory Tr in Z , so that the trajectory Tr X and Tr Y Both with trajectory Tr C The space is reachable, then it is called the trajectory Tr X and trajectory Tr Y It is spatially connected; Use DBSCAN algorithm to find adjacent point pairs (C A ,C B ) and the set of neighboring point trajectories When clustering to generate a trajectory network, the following steps are mainly involved: 1) For a given set of trajectories, use the formula to calculate the similarity between trajectories; 2) Find core trajectories as temporary clusters: For a trajectory in the trajectory set, if the trajectories within its radius If the number is greater than the preset value MinPts, the trajectory is set as a core trajectory; scan all trajectories to find all core points and their clusters, that is, all temporary clusters; 3) For each temporary cluster, check whether the trajectory is a core trajectory. If so, set the cluster Merge with the current cluster to obtain a new temporary cluster; 4) Repeat step 3) until all temporary clusters have been scanned and processed; After clustering, adjacent point pairs (C A ,C B ) and the set of neighboring point trajectories A collection divided into one or more clusters in Indicates the kth cluster in the result, each cluster represents a line from C A to C B The clustering result indicates the path from C A to C B There are M clusters, i.e., M possible paths. In each cluster, the trajectory with the largest number of paths in its neighborhood is selected as the path represented by the cluster. In step S2, a multi-path travel time distribution model is designed. By learning the different travel time distributions of taxis on different roads between the adjacent point pairs, the probability of the vehicle taking each path when the vehicle passes through the adjacent point pair with a travel time t is calculated, and the path with the highest probability is selected as the vehicle's travel path. Specifically, the following steps are performed: S21. Multi-path travel time distribution model: For a given pair of adjacent points (C A ,C B ), and its neighboring point trajectory set N represents the total number of trajectories passing through the adjacent point pair, and each trajectory passes through the adjacent point pair (C A ,C B ) has a time t corresponding to it, and its time set is expressed as T={t1,t2,…,t N }, where t i Represents the trajectory Tr i The travel time; gather The neighboring point trajectory cluster after clustering is expressed as For the i-th cluster Using N i Represents the total number of trajectories in the cluster, using the set T i To represent the set of travel times within the cluster in Represents a cluster The kth trajectory in the A ,C B ) time; use P(t) to represent the travel time distribution of the travel time set T of the neighboring point trajectory, and use P i (t) represents the time set T when the vehicle passes through the adjacent point pair via the i-th road i The travel time distribution of , their relationship is expressed as follows: where α i The prior probability of the vehicle taking the i-th road can be obtained from the set of neighboring point trajectories before and after clustering: Given a given pair of adjacent points (C A ,C B ), and its neighboring point trajectory set N represents the total number of trajectories in the set before clustering; the set of neighboring point trajectories after clustering is expressed as Using N i To represent the i-th cluster The total number of trajectories in ; In the above formula, α i is known, and the i-th cluster, that is, the travel time distribution P on the i-th road i (t) is unknown, so we need to calculate the travel time distribution set on the i-th road. Fit the travel time distribution model on the road; for the i-th cluster, that is, the travel time distribution P on the i-th road i (t), based on the different traffic conditions of the road, the travel time distribution of the road is divided into two states, namely the fast passing state and the congested state, using Denotes the travel time distribution of a vehicle quickly passing through the i-th road, using represents the travel time distribution of vehicles congested through the i-th road, and the relationship between them is expressed as follows: in represents the probability of a vehicle passing quickly on the i-th road, represents the probability of a vehicle passing through the i-th road in traffic congestion; and The calculation model is expressed as follows: in and They represent the expectation and standard deviation of the lognormal distribution model when the vehicle passes through the i-th road quickly; and They represent the expectation and standard deviation of the normal distribution model when the congestion passes through the i-th road; Therefore, the travel time distribution model of the i-th road is expressed as follows: The parameters can be expressed as S22. Model parameter calculation: For adjacent point pairs (C A ,C B ) on the i-th road, the travel time distribution model P i (t) and its model parameters θ i , use the EM algorithm to calculate its optimal parameters; the time data on the i-th road comes from the travel time set of the i-th cluster in the clustering result The goal is to find the optimal parameter θ i Make its likelihood function reach its maximum value, that is: Use the EM algorithm to calculate θ i The calculation is divided into two steps: E step and M step. By continuously iterating the E step and M step, the parameters that can maximize the model likelihood function can be calculated. The steps for calculating the model parameters using the EM algorithm are as follows: 1) Initialization: Randomly initialize the parameter θ i 2) Step E: According to the parameters after the k-1th iteration Calculate the time corresponding to each trajectory in the collection Belong to each category of state z j Probability of: 3) Step M: Recalculate the model parameters based on the results obtained in step E: 4) Iteration: By continuously iterating the E step and M step, we can finally get the parameter θ that maximizes the model likelihood function. i , The specific iteration formula is as follows: The above formula means that for a fixed road i, the travel time of a trajectory j traveling on the road is According to travel time Calculate the probability of whether the trajectory's driving state is fast passing or congested passing under the current parameters; The above formula means that after calculating the Q values of all samples under the current parameters, the Q values of all samples are used to update the parameters of the model, including the expectation and standard deviation of the two distributions, as well as the weight values of the two distributions; S23, Path Selection: For a pair of adjacent points (C A ,C B ), when a vehicle passes through the adjacent point pair at time t, the probability P(t) of appearing between the adjacent point pairs at that time and the probability P(t) of appearing on the i-th road at that time are calculated by the following formulas. i (t) and the probability of the vehicle passing through the adjacent point pair from the i-th road, and the road with the largest probability is considered to be the path taken by the vehicle:

2. The sparse trajectory space reconstruction method based on a probability distribution model according to claim 1, characterized in that: In step S3, the trajectory of the test set is reconstructed using the overall model, and the prediction error is evaluated and analyzed based on the prediction results and actual data. The main evaluation indicators include: Longest Common Sub-Sequence (LCSS): A metric used to measure the length of the longest common subsequence between two target sequences, which allows skipping trajectory points when necessary; Dynamic Time Warping (DTW): A time series similarity metric used to measure the distance between two time series. It allows for time series to be out of sync, i.e., aligned differently. The DTW method minimizes the distance between two series by aligning their corresponding elements. Edit Distance on Real Sequence (EDR): A measure used to calculate the similarity between two sequences.

3. A sparse trajectory space reconstruction system based on a probability distribution model, characterized by: The system adopts the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Mathematical model for vehicle trajectory reconstruction and compression method and system

    CN115061987A

  • Vehicle track recovery method, equipment, device and storage medium

    CN115908507A