The invention discloses a 
wireless sensor 
network clustering method based on initiative avoidance of hotspots and NLOS. The 
wireless sensor 
network clustering method comprises the following steps that firstly, a network is initialized, secondly, 
middleware of an upper computer builds a WSN 
environmental model, thirdly, the 
middleware of the upper computer analyzes analog information, and fourthly, cluster heads change in an operating period. According to the 
wireless sensor 
network clustering method, by means of regulation and control performed by the 
middleware of the upper computer connected to a 
base station, the overall life cycle of the WSN is improved and prolonged, and overall expandability and 
controllability of the network can be enhanced; as nodes in areas which can lead to cavities are bypassed, durability of the covering 
radius of the network is enhanced, and the hotspot effect is avoided. Besides, the nodes can be added or moved or abandoned randomly, and compared with traditional algorithms, the 
wireless sensor network clustering method achieves that the expandability is greatly enhanced. As for the 
wireless sensor network clustering method, most of the traditional algorithms belong to passive cluster head self-election algorithms. In addition, the 
wireless sensor network clustering method reduces loads of a routing 
list, simplifies the routing 
list, and prolongs the overall service life of the network.