With the rapid development of Internet,the problem of Network Security is becoming more and more serious. Therefore,an Improved Harmony Search-based Network Security Situation Prediction (IHS-NSSP) method is proposed. The performance of the algorithm is optimized by introducing the adaptive parameter adjustment strategy and the diversity-driven memory update mechanism. Combining algorithm optimization,feature selection and dimensionality reduction,and ensemble learning techniques,IHS-NSSP can significantly improve the accuracy and efficiency of network security situation prediction.