Aiming at the problems of user trajectory privacy budget and personalized demand of existing trajectory differential privacy protection technology, a personalized differential privacy protection mechanism based on sliding window and prediction perturbation is proposed. First, based on the road network topology, the sensitive road sections are classified into levels, and the allocation of personalized privacy budget is achieved by customizing the sensitivity of semantic locations. Then, recurrent neural networks and exponential perturbation methods are utilized to predict the perturbed locations that satisfy the differential privacy and temporal correlation requirements, and service similarity is introduced to detect location availability; If successful, the predicted location is directly used instead of the location of the differential perturbation, which reduces the privacy overhead from successive queries and further improves the utilization of the privacy budget. Finally, a w sliding window based trajectory budget allocation mechanism is designed to dynamically adjust the degree of privacy protection for each position in the trajectory according to the privacy needs of the user of the position. Experiments on real datasets show that the method can better achieve the balance between privacy and utility of trajectory data and improve the usability of published data while strictly protecting privacy.