摘要:With the development of information technology, computer networks have become a part of people’s lives and work. However, computer viruses and malicious network attacks make network security face huge challenges, and more accurate detection of attacks has become the focus of attention to current computer fields. This paper proposes an intrusion detection model, which is mainly based on the XGBoost (Extreme Gradient Boosting), and uses the WOA (Whale Optimization Algorithm) to find the best parameters for it. The collected network data are first preprocessed by the PCA (Principal Component Analysis) dimensionality reduction method, and then, the preprocessed data are imported into the WOA-XGBoost algorithm so that the overall model has better intrusion detection capabilities for data after training. The experimental results are applied to the well-known KDD CUP 99 data in the computer network field, and compared with the accuracy of the results obtained by parameter adjustment in the traditional way, it shows that the intrusion detection model under this method has better accuracy.