## 5 Method Design
### Trajectory Similarity Search
#### 5.3.3 Filtering Strategy
Then, we use these sample trajectories as target trajectories to evaluate the performance of PMMTss. ### Performance Evaluation and Result Analysis

In this subsection, we first make a comprehensive comparison of PMMTss and PPJoin+ with the same experimental conditions. Then, we discuss the weaknesses of the PPJoin+ algorithm and summarize the features and the advantages of the PMMTss. Finally, we evaluate the effectiveness of the multi-layer index and the performance of the filtering in PMMTss. #### 6.3.1 Performance Comparison between PMMTss and PPJion+

We first illuminate experimental results on the performance comparison between PMMTss and PPJion+. Then, we introduce the problems encountered in the implementation of the trajectory similarity search by PPJion+ and discuss the underlying reasons. Finally, we summarize the design philosophy for PMMTss and PPJion+, respectively. Figure 5(a,c) show the average searching time of PPJion+ and PMMTss for different combinations of \(\langle|SPCL|,threshold\rangle\). The search time of PPJion+ is between 500 ms and 12,500 ms, whereas the search time of PMMTss is between 1 ms and 160 ms. Obviously, PMMTss is 43x-5370x faster than that of PPJion+. In detail, under the condition of \(\langle|SPCL|,threshold\rangle=\langle 64,0.8\rangle\), PMMTss is 43 times faster than PPJion+. Under the condition of \(\langle|SPCL|,threshold\rangle=\langle 4,1\rangle\), PMMTss is 5370 times faster than PPJion+. Focus on the performance of PPJoin+, Figure 5(a) shows that the search time for PPJion+ decreases as the threshold increases for longer trajectories (L16, L32, and L64) and that the decrease is greater for longer trajectories. However, in the case of shorter trajectories (L4 and L8), the decrease in the search time for PPJion+ goes from a sharp decrease to a slower decrease as the threshold increases. Note that for thresholds above 0.8, the search time of PPPJion+ for long trajectories is smaller than for short trajectories. The above

Figure 6: Performance of PMMTs and PPJion+. performance reveals three characteristics of PPJoin+: (i) generally, the filtering strategy of PPJoin+ is effective as the search time decreases with an increasing threshold; (ii) PPJion+ performs best when the trajectory similarity threshold is greater than or equal to 0.8; and (iii) specifically, PPJion+ is better at searching long trajectories than short trajectories when the threshold is greater than 0.8. Based on the above experimental results and the algorithmic logic of PPJion+, we can make a conclusion that the main reason for the above characteristics of PPJion+ is that although three filtering strategies work well, PPJion+ still needs to access each item in the trajectory set. It is very time-consuming to access all items in the trajectory set. In summary, it is difficult to reduce search time by optimizing these filtering strategies. This is also confirmed by the fact that the line in Figure 6a flattens out after a threshold greater than 0.8. Focus on the performance of PMMTss. Figure 6c shows that the search timelines for different trajectory lengths have a very similar shape, indicating that PMMTss has a stable search performance for different trajectory lengths. Overall, the search time of PMMTss can be kept in milliseconds for trajectories with different lengths. Compared to PPJion+, PMMTss performs much better and the performance is more stable. The main reason is that PMMTss has a highly efficient spatiotemporal index, which keeps points in different space and time intervals. Given a target point, it can easily locate and obtain the corresponding candidate points. It searches similar trajectories using points rather than using trajectories in PPJion+. PMMTss avoids vigorous trajectory similarity search, reducing unnecessary computation. In addition, PMMTss first generates candidate trajectory segments and then performs the filtering strategy during the search process, which ensures that the search time can maintain a linear trend as the threshold increases.