Wireless sensor network is composed of a large number of sensor nodes by self-organization in the monitoring area. The energy, computing and communication capabilities of sensor nodes are very limited, and therefore a good routing protocol is very important to prolong the lifetime of the network. An energy-balanced clustering protocol is proposed to solve the inequality problem of consumption in routing protocol. Clustering protocol considers the residual energy of nodes and the distance between sink nodes in the selection of cluster head node, which can be more evenly distributed cluster head. On the basis of estimating the optimal cluster number, the clustering method is improved, the number of clustering is reduced, and the network energy consumption is saved. The simulation experiment shows that the Clustering protocol makes the whole network energy consumption more balanced and increases the life cycle of the wireless sensor network.