## 2 Proposed Method  
### Continuous Trajectory Extraction  
To better illustrate the method of this paper, the following basic definitions are given.  
**Definition 1**.: _Location point: A tuple consisting of latitude and longitude, which represents the spatial location of a vehicle and is denoted by \(p=(x,y)\), where \(x\) is longitude and \(y\) is latitude._  
**Definition 2**.: _Trajectory sampling points: A tuple is formed by adding the vehicle identifier violating and sampling time \(t\) to the location points, denoted by \(tp=(x,y,vid,t)\)._  
**Definition 3**.: _Trajectory: A sequence of all trajectory sampling points of a vehicle within a certain period of time in the order of the sampling time, denoted as \(T=\{tp_{1},tp_{2},\ldots,tp_{n}\}\), where \(n\geq 2\) represents the amount of sampling points contained in a given trajectory \(T\)._  
**Definition 4**.: _Continuous trajectory: A sub-trajectory of a trajectory \(T\), which satisfies the sampling interval of adjacent trajectory sampling points less than a given threshold \(\tau\), is denoted as_  
\[TS=\{tp_{t},tp_{l+1},\ldots,tp_{m}\},(1\leq l\leq m\leq n)\]  
_satisfying \(tp_{i+1}.t-tp_{i}.t<\tau\) for any adjacent sampling points \(tp_{i}\) and \(tp_{i+1}\)._  
Due to some large sampling time intervals existing in the original trajectory data, which leads to a reduction in the trajectories' confidence, the original trajectory needs to be divided by the location points with large sampling time intervals to obtain a continuous trajectory.  
When dividing the original trajectory, it is important to select a proper sampling time interval threshold. A sampling time interval threshold that is too large will retain some original trajectories with a large sampling interval, thus reducing the effectiveness of the segmentation. A threshold that is too small will make the divided trajectory segments too fragmented and risk losing the original trajectory information.  
Therefore, it is necessary to set a sampling time interval threshold for continuous trajectories based on prior experience and the distribution characteristics of the experimental data. In this paper, the dataset is BaiduMap's vehicle trajectory data in Lianyungang City in China. The general GPS sampling interval of this navigation map is 2 s. The distribution of the sampling time interval of all the sampling points of the dataset used in this paper is shown in Figure 2.  
As can be seen from Figure 2, most of the original trajectory data sampling time interval is less than 5 s; therefore, we set the continuous trajectory sampling time interval threshold \(\tau\) to 5 s and about 95% of all sampling points. The continuous trajectory amount after segmentation by this threshold is about 10 times the original trajectory amount.  
Figure 2: Distribution of the sampling interval of the original trajectory.  
After time interval segmentation, on the other hand, there are trajectories with few sampling points (short trajectories) in the segmented continuous trajectory segment. These short trajectories should be removed as noise to obtain a valid continuous trajectory, and are removed according to the amount of sampling points. When the number of sampling points of a continuous trajectory is less than a preset threshold of 3, this continuous trajectory is to be removed. The final amount of valid continuous trajectories is about half the total amount of continuous trajectories. At the same time, the sampling points of all the valid continuous trajectories cover 93% of the sampling points of the original trajectories, indicating that the final continuous valid trajectories retain most of the information of the original trajectories.