In this paper, we give attention to the robustness of the Cyber-Physical System, which consists of interdependent physical resources and computational resources. Numerous infrastructure systems can evolve into the Cyber-Physical System, e.g., smart power grids, traffic control systems, and wireless sensor and actuator networks. These networks depend on their interdependent networks, which provide information or energy to function. In a Cyber-Physical System, a small failure could trigger serious cascading failures within the entire interdependent networks. In this paper, we try to alleviate these cascading failures between interdependent networks to reduce losses. We discuss the robustness of systems for random attacks by calculating the size of functioning components in entire networks. We change the inter-links topology of the coupled networks to enhance the reliability of the entire system. Then we get the most effective swapping strategy in enhancing the robustness of the Cyber-Physical System compared to previous studies. Different systems' structures would influence the performance of swap inter links strategies on improving the reliability of networks. Moreover, our work could guide how to optimize a Cyber-Physical System topology by reducing the influence of cascading failures. INDEX TERMS Cyber-physical system, interdependent networks, cascading failures, swap inter-links strategy, robustness, giant component.