With the gradual expansion of the application field in wireless sensor networks, the problems of the energy consumption has received more and more attention. In wireless sensor networks, the location of sensor nodes and gateway nodes are usually fixed. To ensure that the energy consumption of the sensor network is minimized during data transmission, it is necessary to optimize the placement of relay nodes. This paper proposes the solution of relay nodes placement based on optimal transmission distance, which can minimize the energy consumption and extend the lifetime of the entire network duri...