## 3 The PSOTSC Algorithm
### Results of Segmentation Accuracy  
#### 4.2.1 Real Trajectory Data  
We use real data to test the segmentation and compression effect of this algorithm under different numbers of particles and iterations. First, some representative long trajectories  
Figure 6: Ungulate data. Figure 7: Trajectory data of maneuvering target simulation: (**a**) Data set; (**b**) Typical trajectories. in the hurricane data set are segmented. It can be seen from Figure 8 that the segmented trajectories keep the profile features of the original trajectories. By increasing the number of particles from 20 to 50 and the number of iterations from 10 to 20, the segmentation effect is obviously better. One hundred Monte-Carlo statistical experiments were carried out on the whole hurricane data set to analyze the compression effect of the PSOTSC algorithm; the statistical analysis results are shown in Table 1. Let the mean values of compression rate and accuracy be m_CR and m_AY, respectively, and the standard deviation values be sd_CR and sd_AY. When the segmentation accuracy is controlled at around 98.3%, the overall trajectory compression rate increases with the increase in the number of particles or the number of iterations, which means that the particle swarm optimization can find a better segmentation and compression solution while maintaining the segmentation accuracy. It can be found from the standard deviation results that the standard deviation gradually decreases with the increase in the number of particles and iterations, which indicates that the stability of the optimal search is also increasing. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Particles** & **Iterations** & **m\_CR** & **sd\_CR** & **m\_AY** & **sd\_AY** \\ \hline
5 & 5 & 23.1972\% & 0.0237\% & 98.3321\% & 0.0102\% \\
10 & 5 & 22.5092\% & 0.0211\% & 98.354\% & 0.0069\% \\
20 & 10 & 21.6146\% & 0.0182\% & 98.3918\% & 0.0062\% \\
40 & 15 & 21.2099\% & 0.0171\% & 98.4182\% & 0.0047\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance with different parameter values in hurricane data set experiments. Figure 8: Segmentation effect of typical hurricane trajectory. For ungulate data set, the experiments of the PSOTSC algorithm were also carried out to test the performance. Unlike the experiments for hurricane data set, which uses fixed trajectory segmentation accuracy to find the change of trajectory data compression rate, this time the compression rate is stable at a certain level, i.e., it retains the same number of trajectory points, and finds the change of trajectory segmentation accuracy with the numbers of particles and iterations. One hundred Monte-Carlo statistical experiments were carried out on the whole data set, and the results are shown in Table 2. It can be seen that whether the compression ratio is controlled to 20% or 30%, we can get better trajectory segmentation accuracy with the expansion of particle swarm size and the increase in iteration times. At the same time, we also note that for the ungulate data set, the segmentation accuracy is generally lower than that of the hurricane data set. This is because the trajectories in the ungulate data set have obvious polyline characteristics. Intuitively, the points constituting these polylines should be trajectory feature points, therefore the proportion of redundant data is lower than that of hurricane trajectories, which can be seen from Figure 6.  
The advantages of NARJ particle update strategy are verified, and the segmentation accuracy of PSOTSC with NARJ is compared with that of standard PSOTSC with the same number of segments (the same compression ratio), particles and iterations. One hundred Monte-Carlo statistical experiments were carried out on typical trajectories in hurricane and ungulate data sets. The number of particles and iterations is 20 and 10, respectively, and the number of segment feature points increases.