For the LEACH protocol during the process of cluster formation, only consider node its own communication cost disadvantage and security issues, through the analysis of the optimization design issues of single nodes and the network whole level of WSNs, a kind of security technology put forward to the clustering phrases proposed in this paper, and comprehensive consideration of the multi-hop improvement algorithm on node location and energy state. The simulation shows that the new algorithm save and balance energy consumption of each nodes, prolong the life cycle of the network and identify the malicious nodes based on key pre-distribution scheme and node ID information, in addition, prevent attack behavior from the beginning, which contribute to guarantee the authenticity and reliability of the message collection fundamentally, as well as enhance the survivability and robustness of the network to maximum.