In response to the missing discrete variables in current wireless network topology optimization, an improved particle swarm optimization algorithm based on fusion of discrete variables is proposed to obtain network discrete variables. A wireless network topology optimization model is constructed. The research results indicate that it has better anti-interference performance in complex situations, which contributes to improving network load balancing. The topology obtained by this method has independence and predictability. When optimizing network topology, it has high network node coverage. When the network nodes are 50, 100, 150, and 200, the connectivity is 99.85 %, 93.64 %, 91.25 %, and 90.18 %, respectively. The testing time is 19s, 34s, 54s, and 64s respectively, which has the best optimization performance. The method can effectively improve the missing discrete variables in wireless network topology optimization, which has good performance.