Aiming at the problems that highly dynamic environment in underground coal mines causes precision of WiFi localization model to decrease,extreme gradient boosting(XGBoost)fingerprint localization algorithm is proposed to accomplish localization using its learning ability of high-dimensional data features.Compared with the traditional gradient boosting tree(GBDT)algorithm,the speed is greatly improved while accomplishing better localization results.Meanwhile,aiming at the problem of volatility of WiFi data and the drift of XGBoost algorithm facing dynamic environment model,the D-XGBoost algorithm and Z-XGBoost algorithm,which integrate denoising auto-encoder(DAE)and self-adaptive mechanism,are proposed respectively.Experimental results show that the localization precision of XGBoost algorithm is improved,compared with the GBDT algorithm and the efficiency is increased by more than five times.The localization accuracy of the D-XGBoost algorithm fusing DAE is improved by 17%compared with the XGBoost algorithm;the Z-XGBoost algorithm fusing the self-adaptive mechanism effectively reduces the error caused by model drift.The proposed improved algorithm better improves the problem of WiFi precision degradation of localization model and model drift.