Efficiently planning the trajectory of unmanned aerial vehicles (UAVs) for power grid inspections is a critical factor in ensuring the performance of such inspections and represents a current research hotspot in the field of UAV-based power grid inspections. In this study, addressing the limitations of traditional algorithms in meeting the requirements of UAV inspections, we propose a multi-objective Traveling Salesman Problem (TSP) optimization model. This model aims to optimize the UAV trajectory while considering both speed and prioritizing visits to towers with multiple defects. The simulated annealing algorithm is employed to solve this optimization problem and implement it through MATLAB programming. The results show that the path distance obtained after applying the algorithm converges more effectively towards the optimal solution. This demonstrates the effectiveness of the proposed algorithm in addressing the optimization challenges related to UAV-based inspection trajectories.