One of the tasks of the research on the complex network invulnerability is to optimize the topology structure of network. Based on the analysis of the invulnerability of common complex networks, the natural connectivity is used to measure the invulnerability of complex networks, and the topology structure optimization model is established. Because of the good performance of ADMPDE algorithm, the improved algorithm is applied to solving the topology structure optimization model. According to the simulation analysis, it is verified that the topology structure optimization model of the complex networks and the improved algorithm are reasonable and feasible, the essential rules of the topology structure optimization are obtained, and the invulnerabilities of the primary and the optimized complex networks are analyzed with the random attack, the intentional attack.