In the complex and changeable indoor environment, the positioning fingerprint algorithm based on Received Signal Strength Indication (RSSI) has been widely studied. The matching algorithm in the online stage usually uses the Weighted K-Nearest Neighbor (WKNN) algorithm, but the algorithm often uses the fixed k
value method, which has large position errors and certain limitations. In addition, the volatility of Access Point (AP) signals is not taken into account when building the positioning fingerprint database in the offline stage. Therefore, there is a lot of redundant information of different APs, which has a great impact on the positioning effect. To solve these problems, a dynamic indoor positioning method based on stable AP selection is proposed. Firstly, the RSSI value is preprocessed by Gaussian filtering to eliminate the random interference. Then, the stability of AP is calculated by optimizing AP algorithm, and the key AP is selected for positioning. Finally, the distance threshold is used to dynamically adjust the value of k
, and the weight coefficient is improved, so the WKNN algorithm is improved. The experimental results show that the dynamic indoor positioning method based on stable AP selection can effectively remove redundant AP information and realize the dynamic k
-value scheme. It is superior to the K-Nearest Neighbor (KNN) algorithm, the weighted K-nearest neighbor algorithm and the improved weighted K-nearest neighbor algorithm in positioning accuracy. The average positioning error is reduced by 26.13%, 21.29% and 9.89% respectively. The cumulative distribution probability of positioning error within 1.5 m reaches 60.41%, which is increased by 25%, 16.66% and 8.33% respectively, and the positioning effect is improved obviously.