Currently, WSN is widely used, and it is important to obtain the location information of each node in real time for WSN where localization is the main function or where nodes are subject to unpredictable changes in location by different factors. In this paper, the traditional TDOA algorithm and the FDEM algorithm based on energy consumption are analyzed in the localization section, and the ANP analysis algorithm is analyzed in the identity section. The paper states the necessity and feasibility of combining localization and identity identification techniques, and proposes a general way to achieve self-testing coverage of WSN nodes by analogy with flooding mechanisms and routing protocols, and simulates the parameter changes under various scenarios through experiments. It can be deduced from the results that the quality and speed of the coverage are closely related to the node density and the number of neighbour nodes to receive the information. And according to the key problem of energy consumption in WSN, it is significant to find proper values of all the parameters to realize maximum efficiency in practice.