Lin Sinus 1 in 2012 pointed out that computer communication network has become an essential part of social production and life, and it has been extensively used in various industries. At present, it has penetrated into every corner of the world. Shorthand R A 2 in 2013 proposed that computer network security problems arise with the development of the network. Standardization and openness of the network, facilitate the operations; meanwhile, it also leads to a trend of rapid growth of the network security incidents, which causes great loss. Li Min 3 in 2015 put forward that hacker attacks, computer viruses and denial of service attacks are the three main threats to computer network security. With the advancement of computer network, the attack mode changes from system-based attack to network-based attack. Ramirez I S 4 in 2014 thought that with the improvement of attack tools, even if the attacker does not acquire professional knowledge, they can also complete the attack process. Tchaikovsky A G 5 in 2013 explained that computer network security assessment is a supplement to the security mechanism, which increases the protection of the system in depth. However, there are still some difficulties in the technology of computer network security assessment. Most products have certain problems, and the development requires more participation and efforts of technical personnel. Based on this, according to relevant domestic and foreign theories and research results, the security threats and the defense mechanism of computer network are studied. Section 2 discusses the development status of computer network security evaluation and the theory of intelligent algorithms. Section 3 proposes the computer network security evaluation model based on swarm intelligence algorithm in view of the existing problems. Section 4 carries out the simulation analysis. The research process and conclusions are summarized in section 5. With the current technology background, in the dynamic and complex network environment, network security situation assessment can be faced with the current network security situation and effective quantitative assessment, timely reflect the security status of the target network. In order to achieve effective control of the administrator, the status of network security be targeted to reduce the network attack on bearing the network itself and its business losses, effectively improve the network security management capabilities.