| With the rapid development of the information age,the construction of campus networks in universities is constantly being updated and improved.Campus networks have become important tools for students,teachers,and staff to carry out their daily work and studies.However,as the number of campus network users continues to increase and network traffic grows immeasurably,network security issues have become more and more severe.How to monitor and analyze campus network traffic to ensure its security and stability has become an urgent problem that needs to be solved.Traditional network traffic analysis tools are not sophisticated enough,and complex analysis is required to restore transmission content,which brings difficulties to campus network management.Therefore,a network traffic capture and restoration scheme has been proposed.Although some individual feature selection algorithms have been used for network traffic classification,there are still deficiencies.To solve this problem,this study proposes a network traffic classification method based on ensemble feature selection,which is used in actual campus network environments.The specific research content is as follows:1)In response to the content security issues of campus networks,a network traffic capture and restoration scheme is proposed.The scheme is based on the Gopacket library for packet capture,protocol analysis,and packet reassembly.Multiple file types are restored through the AC multi-mode matching algorithm.Finally,experiments in the campus network environment prove that the scheme can efficiently restore network transmission content.In addition,by simulating attacks on target hosts,relevant data packets and actual campus network data packets were captured to construct a campus network traffic dataset.2)In response to the problem that current network traffic data contains many irrelevant and redundant features that affect the performance of the model,and the issue of bias in single feature selection algorithms,a network traffic classification method based on ensemble feature selection is proposed.By combining three different single feature selection algorithms,three feature subsets are obtained,and their intersection and union are selected as the ensemble feature subset after eliminating strongly correlated features.The CIC-IDS 2017 dataset is applied to the proposed feature selection method,and Random Forest,Naive Bayes,and K Nearest Neighbors algorithms are used for modeling to evaluate the proposed ensemble feature selection method.The experimental results show that the feature intersection ensures classification accuracy while reducing computational resources,and the feature union improves accuracy.Finally,the best performing model is selected for classification using the feature extraction method on a campus network traffic dataset,and the experimental results show that the method can effectively classify various types of traffic in campus networks,and has a certain reference value in practical campus network attack prevention. |