The invention provides a method for carrying out dynamic filtering optimization based on real-time positioning trajectory data. The method comprises the following steps: 1, reading positioning coordinate data calculated in real time; 2, reading positioning coordinate data obtained by historical calculation; 3, if the number of the historical calculation data is less than 4, turning to the step 4,otherwise, turning to the step 5; 4, fusing newly solved data and solved at most even number of historical data to form sliding window data with the length of odd number; 5, fusing the newly solved data and the recently solved four pieces of data to form sliding window data; 6, carrying out smoothing processing on the obtained window data; 7, adding newly resolved data into a historical data set after filtering, and updating the historical data subjected to smoothing processing in the window to the historical data set; 8, emptying the window data, carrying out positioning data calculation of the next step, turning to the step 1 after the calculation is completed, and reading the next piece of data.