| The demand for oil has increase gradually in industrial times, the technology of long-distance oil pipeline leakage detection is becoming more important. The conventional detection has some weakness, such as cost more time and can not do real-time monitoring. This paper combine negative pressure wave testing and wireless sensor network, design the leak monitoring and wireless transmission system, focused on the research and design to the wireless sensor routing algorithm and design the wireless sensor node, this method can do real-time monitoring and leak reports.The energy and computational capabilities of wireless sensor node is limited, when design routing protocol it need to consider energy balance this paper has done some improvement based on the traditional wireless sensor tree routing algorithms. Created neighbors list in the coordination nodes, the nodes look up neighbors list in the process of information transmission, considering surplus energy and the number of path during the process of information transmission, this method can reduce energy losses by inquiring neighbor list to reduce path quantity in the process of information transmission, and this method can be also reduce the number of dead nodes by calculating the residual energy.This paper using the ZigBee wireless sensor network technology as the core network architecture, it divide the nodes into two parts, such as Full-Function Device and Reduced-Function Device according to the different function of sensor nodes, the purpose is to reduce the cost. It finished the software design on the base of hardware design, divided into four parts when designed the node software program, individually designed for each part and put them together by serial connection to assure integral function integrity, improve the software portability and convenience.Through comparison of the traditional algorithm and the improved algorithm, the results show that the improved routing algorithm significantly reduces the energy consumption of nodes and the number of dead nodes. In the nodes correspondence test, it tested two coordinate nodes data transmission, the results show that the nodes of this paper designed can achieve communication. |