摘要:Intrusion detection system is automatic system which recognize intrusions of computers or computer network systems. The existing security detection systems have many problems such as wrong detection of intrusions, false intrusions, poor real-time performance. To solve these problems, this paper improves the particle swarm optimization algorithm and presents an attribute-weighted distance calculation method based on information gain ratio. This method for the division of spherical or ellipsoidal data can obtain better clustering results. And the data set of KDD-cup 99 is used as the experimental data. The experimental results show that the method can detect many kinds of known network intrusion and also can detect many unknown network intrusions. At the same time, the method can maintain the higher intrusion detection rate and lower false alarm rate.