Concerns about the security of trajectory data have surfaced amid rising public awareness of privacy protection. In this study, we focus on how to protect personal information effectively when adversaries have access to a portion of users’ trajectory data. To resolve this issue, we design a graph-based index structure to store users’ trajectory data and develop a novel subtrajectory upper bound estimation method and corresponding pruning strategies. Using a graph-based index structure and pruning strategies, we propose a global suppression algorithm and a local suppression algorithm to prevent personal information from being extracted from the original trajectory data. Experimental results show that the maintenance cost of the graph-based index structure is low when performing global and local suppression, and that the pruning strategies effectively eliminate unnecessary computation of non-upper-bound subtrajectories. Therefore, the execution times of the proposed algorithms are far shorter than those of existing algorithms.