Aiming at the problem of large amount of data and large number of nodes in wireless sensor network, this paper proposes an improved directional routing algorithm based on clustering structure. The algorithm combines the efficient energy consumption of the cluster routing algorithm with the optimal performance of the directed diffusion routing algorithm in the process of large data transmission. And the routing algorithm of directed diffusion needs to be broadcasted many times to lead to the long delay of network and the clustering routing algorithm needs to improve and optimize the characteristics of the topology structure. Finally, the paper integrated the improved clustering algorithm and the directed diffusion algorithm. The algorithm reduces the delay of network and improves the robustness of the system. For wireless sensor networks, network delay is one of the indexes to evaluate a routing algorithm. Ultimately, according to the simulation results and the actual system test results, the proposed algorithm is proved more effective.