With the development of information age and the maturity of Internet of things (IoT) technology, wireless sensor network (WSN) has been widely applied in indoor localization. However, the non-line-of-sight (NLOS) environment and the inherent noise of the sensor will introduce errors in the measurement, which will seriously lead to inaccurate positioning. In this paper, a novel localization scheme based on mean reconstruction method is proposed, which reconstructs the distance measurements from each beacon nodes by taking the average twice to weaken the adverse effects of NLOS. At the same time, the noise average is re-estimated when the distance difference is tiny. Next, the robust extended Kalman filter (REKF) is used to process the reconstructed distance measurements to obtain positioning results. In order to prevent invalid reconstruction, hypothesis testing is used as NLOS identification to classify the position estimates which generated from all distance combinations by least-squares. Then we use residual weighting (RWGH) method to combine position estimates that fall into validation gate, and take it as a collaborative localization with the REKF algorithm. The simulation and experimental results show that the proposed algorithm has high positioning accuracy and strong positioning robustness.