Under the premise of limited node energy, an efficient and energy-saving wireless sensor network routing algorithm was proposed to prolong the lifetime of overall network. By analysing the operation pattern of wireless sensor network, the energy model and transmission model was introduced, and BTPHS algorithm based on the above two was proposed. BTPHS algorithm divided the network lifetime into 3 periods. According to the characteristics of the energy distribution and energy consumption in different periods of the network, two new node selection strategies were proposed and a new objective function as a reference standard was provided. The adjustment process of the HS algorithm is abandoned, which makes less parameters in proposed routing algorithm. The experiment results indicate that BTPHS algorithm can prolong the lifetime of overall WSN network effectively.