Sensor node localization is the basis for the entire wireless sensor networks. Because of restricted energy of the sensor nodes, the location error, costs of communication and computation should be considered in localization algorithms. DV-Hop localization algorithm is a typical positioning algorithm that has nothing to do with distance. In the isotropic dense network, DV-Hop can achieve position more precisely, but in the random distribution network, the node location error is great. This paper summed up the main causes of error based on the analysis on the process of the DV-Hop algorithm, aimed at the impact to the location error which is brought by the anchor nodes of different position and different quantity, a novel localization algorithm called NDVHop_Bon (New DV-Hop based on optimal nodes) was put forward based on optimal nodes, and it was simulated on Matlab. The results show that the new proposed location algorithm has a higher accuracy on localization with a smaller communication radius in the circumstances, and it has a wider range of applications.