In this paper, the positioning method based on time difference of arrival (TDOA) is selected. Based on the analysis and study of two single algorithms, Chan and particle swarm(PSO), the Chan algorithm solves the initial value and the PSO algorithm performs iterative optimization of the hybrid positioning algorithm. In the NLOS environment, the position coordinates calculated by the Chan algorithm are screened by setting the threshold θ, which is suitable for positioning in different indoor environments. The pressure of the PSO algorithm is relieved through threshold screening, the convergence speed is faster, and the positioning accuracy in indoor non-line-of-sight environments is effectively improved. A node trajectory optimization method based on vector map area classification is proposed, the collision detection method of the ray method is used to detect and constrain the label position, and the trajectory prediction method based on the motion recursive function and the Savitzky-Golay filter algorithm are used to predict and predict the travel trajectory of people. Smooth optimization to make the trajectory route more consistent with the actual route.The UWB indoor positioning software system is designed to cooperate with the positioning hardware system to complete the indoor positioning algorithm experiment, which is shown by the experimental data and data simulation results of the fixed scene. In the line-of-sight environment and the label is stationary, the hybrid positioning algorithm compared with the single algorithm, the percentage of the label track points with an error of 0~20cm in the total test track points has increased by 22.4%~33.7%, and the error in the non-line-of-sight environment is 0~50cm. The percentage of track points increased by 25.8%~30.7%. The average value of the experimental data is closer to the actual observation point, and the variance is smaller. It is verified that the hybrid positioning algorithm proposed in this paper is better than the single positioning algorithm when the label is stationary. When the label moves, the system can display the label travel status in real time. Compared with the single positioning algorithm, the hybrid positioning algorithm has fewer abnormal points, and the trajectory is smoother, which meets the needs of indoor positioning.