## 6 Conclusions  
This paper shows work on pre-processing by applying a pre-trained GA-KNN algorithm. First, we use a GA for feature selection to perform dimensionality reduction for attack-type detection, after which we use a KNN algorithm for attack-type matching. This approach can effectively contribute to the attack detection rate of NIDS in terms of multiple classifications, thus informing security systems. Meanwhile, we propose a multi-classification model for anomaly detection based on this and an improved neural network model that provides detailed guidance for other network security systems. We also offer solutions such as modified objective functions for the inherent drawbacks of traditional datasets.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Method** & **Dataset** & **With FS7** & **ACR** & **Time** & **Feature No.** \\ \hline CM-NIDS & NOM & YES & 0.8144 & 28.195 & 3 \\ CM-NIDS & True-Set & YES & 0.9737 & 27.619 & 3 \\ CM-NIDS & NOM & NO & 0.8134 & 27.313 & 41 \\ CM-NIDS & True-Set & NO & 0.9733 & 28.766 & 41 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Comparison of NIDS systems with FS and without FS in terms of metrics.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **Accuracy** & **Case** \\ \hline Neural network & 100.00\% & Binary \\ Neural network—Single & 99.18\% & Binary \\ KNN & 99.70\% & Binary \\ Neural network & 91.13\% & Multi \\ Neural network—Single & 99.15\% & Multi \\ KNN & 68.05\% & Multi \\ \hline \hline \end{tabular}
\end{table}
Table 8: Comparison of accuracy of each algorithm in two cases.  
**Author Contributions:** Conceptualization, Y.W.; methodology, Z.L. and W.Z.; software, Z.L. and W.Z.; validation, Y.W., J.W. and H.S.; formal analysis, Y.W., Z.L. and W.Z.; investigation, Y.W. and J.W.; data curation, H.S.; writing--original draft preparation, Z.L. and W.Z.; writing--review and editing, Y.W., J.W., H.S. and M.G.; visualization, Z.L. and W.Z.; supervision, J.W.; project administration, M.G.; funding acquisition, H.S. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This work was supported in part by the Shanghai Key Laboratory of Scalable Computing and Systems, Internet of Things special subject program, China Institute of IoT (Wuxi), Wuxi IoT Innovation Promotion Center under Grant 2022 SP-T13-C, and Industry-university-research Cooperation Funding Project from the Eighth Research Institute in China Aerospace Science and Technology Corporation (Shanghai) under Grant USCAST2022-17.  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** Data available in a publicly accessible repository that does not issue DOIs. Publicly available datasets were analyzed in this study. This data can be found here: KD-DCup99 ([[http://kdd.ics.uci.edu/databases/kddcup99/kddcup99.html](http://kdd.ics.uci.edu/databases/kddcup99/kddcup99.html)]([http://kdd.ics.uci.edu/databases/kddcup99/kddcup99.html](http://kdd.ics.uci.edu/databases/kddcup99/kddcup99.html)), accessed on 2 November 2022), NSL-KDD ([[https://www.unb.ca/cic/datasets/nsl.html](https://www.unb.ca/cic/datasets/nsl.html)]([https://www.unb.ca/cic/datasets/nsl.html](https://www.unb.ca/cic/datasets/nsl.html)), accessed on 2 November 2022), and CIC-IDS-2017 ([[https://www.unb.ca/cic/datasets/ids-2017.html](https://www.unb.ca/cic/datasets/ids-2017.html)]([https://www.unb.ca/cic/datasets/ids-2017.html](https://www.unb.ca/cic/datasets/ids-2017.html)), accessed on 2 November 2022).  
**Conflicts of Interest:** The authors declare no conflict of interest.