Software-defined network structure of the network fundamental changes, its network equipment to achieve the hardware and software isolation and virtualization technology underlying hardware, so as to further development of the network provides a platform. This is due to the hardware and software isolation, making the network more vulnerable to attack, thus changing the topology and business information. To solve this problem, the paper depending on the traffic data and the corresponding topology, the method gives security software-defined network, combined with business process model of cloud computing, network security algorithm optimization. Simulation results show that the proposed method is robust to a variety of business, and can effectively prevent network attacks.