APTEEN is a typical routing protocol for wireless sensor networks, but when clustering, cluster heads are randomly selected, which makes it easy to select nodes with low residual energy as cluster heads, thus forming network holes. At the same time, in multi hop transmission, the cluster head near the sink node is overloaded due to forwarding a large amount of data. Aiming at these problems, this paper introduces PSO algorithm and proposes ADCH-EPE-APTEEN routing protocol. In order to make the particle swarm optimization algorithm more suitable for routing protocol, this paper first proposes DCA-PSO based on particle swarm optimization algorithm. DCA-PSO uses the classification adaptive change inertia weight for different states of particles in the optimization process. At the same time, dynamic learning factor is used to improve the influence of particle experience and other particle experience on convergence speed and to improve the optimization accuracy and speed of the algorithm. Secondly, when APTEEN routing protocol is networked, the cluster head is selected by DCA-PSO, in which the residual energy of nodes, the location of nodes, and the energy distribution around nodes are fully taken into consideration. Thirdly, considering the distance between nodes and the sink node, the residual energy and the energy distribution around nodes, a front area is set up in the cluster located in the upper half and the assistant cluster head is selected in the front area through the DCA-PSO algorithm. The simulation results show that the DCA-PSO algorithm can significantly improve the search speed and precision compared with the PSO algorithm. Compared with APTEEN routing protocol, the ADCH-EPE-APTEEN routing protocol can reduce the network energy consumption rate and extend network lifetime by 173%.