Existing network topology planning does not fully consider the increasing network traffic and problem of uneven link capacity utilization, resulting in lower resource utilization and unnecessary investments in network construction. The AI-based network topology optimization system introduced in this paper builds a Long Short-Term Memory (LSTM) model for time series traffic forecasting, which uses NetworkX, a Python library, for graph analysis, dynamically optimizes the network topology by edge deletion or addition based on traffic over nodes, and ensures network load balancing when node traffic increases, mainly introducing the LSTM forecasting model building process, parameter optimization strategy, and network topology optimization in some detail. As it effectively enhances resource utilization, this system is vital to the optimization of complex network topology. The end of this paper looks forward to the future development of artificial intelligence, and suggests the possibility of how to cooperate with operator networks and how to establish cross-border ecological development.