Ant colony system has a good performance in solving Traveling Salesman Problem (TSP), but it tends to fall into local optimum and is deficient in convergence speed. To address this problem, a dynamic density clustering ant colony algorithm with a filtering recommendation backtracking mechanism is proposed (DBACS). Firstly, a dynamic density clustering strategy is proposed to accelerate the convergence speed of the algorithm and improve the quality of the solution. Under this strategy, the search radius is expanded dynamically to merge adjacent classes, so as to form the differential pheromone distribution. The splicing paths between each class are adjusted through the ant colony algorithm to achieve better performance. Secondly, a recommendation backtracking mechanism based on collaborative filtering is proposed to increase the diversity of the population, thus helping the algorithm jump out of the local optimum. With the help of the collaborative filtering algorithm, some dense data points are recommended for pheromone dynamic backtracking, which can not only help algorithm jump out of the local optimum, but also help the algorithm accelerate convergence. Simulation results show that the improved algorithm can obtain a better solution and higher stability. Especially in solving large-scale TSP, the accuracy of the solution is significantly improved.