In recent years, with the rapid growth of Internet-related services, the traditional software-defined network architecture has gradually failed to adapt to user demands and services. This paper proposes an ant colony algorithm (ACO)-based data flow control policy optimization scheme specifically designed for software-defined networks (SDNs). It has been found that the traditional ACO algorithm is prone to overfitting during the optimization process of data flow control policies for SDN, and a pheromone updating strategy has been introduced to optimize this phenomenon. After solving this phenomenon, the optimization scheme of data flow control policy for software-defined networks based on the ACO algorithm will be formally formulated, and simulation experiments will be used to confirm the effectiveness of the optimization scheme in this paper. The results show that this paper’s algorithm has a higher priority than the control algorithm in terms of four evaluation metrics: average link throughput, link utilization, average round-trip delay, and data packet loss rate. This study enables the optimization of data flow control strategies under software-defined network architecture and also improves the utilization of network data flow to bring about a better network experience.