| With the diversification of Internet business and the rapid growth of network scale,the network traffic generated by information exchange has increased exponentially.It greatly consumes the overall network bandwidth and brings new problems and challenges to network management.As one of the means to monitor network performance and ensure the quality of network service,network traffic detection has been widely concerned by scholars at home and abroad.Because machine learning can effectively integrate the behavioral statistical characteristics of network traffic,it is of great significance to study the method of network traffic detection based on machine learning.This paper summarizes the research status of machine learning in network traffic detection.In view of the poor real-time performance of current traffic detection methods,an improved XGBoost network traffic detection model is proposed.In this model,shadow features and random forest classifiers are created by introducing Boruta algorithm,and the original flow features are selected according to the feature importance score to reduce the feature dimension;in addition,XGBoost is parallelized in feature granularity,and the Block structure is used to save the pre-ranking results of eigenvalues,and the structure is reused in determining the optimal split points to reduce the amount of computation.In the experimental design,the environment is built by Python and the above model functions are realized,and then verified based on the network intrusion data set released by Lincoln Lab.Experiments show that the feature scale of the improved XGBoost network traffic detection model is reduced by 25%,and the training time of the model is also reduced from 325 seconds to 198 seconds,which improves the real-time performance of traffic detection.In order to solve the problem of low accuracy of current network traffic detection methods,a traffic detection model based on dynamic deep forest is proposed in this paper.Through the multi-grained traversing module and the cascade forest module,the reorganization of traffic features and the classification of traffic types are realized respectively.In the multi-grained traversing module,the representation learning ability of the model is enhanced by constructing a dynamic selector to combine and traverse different traffic features;in the cascade forest module,by introducing layer-by-layer tree structure and dynamic level growth strategy to limit the complexity of the model,it can improve the classification performance and prevent over-fitting at the same time.Through the design of the experiment and the verification of the results,the flow detection accuracy of the dynamic deep forest model is improved by about 12%,and the false alarm rate is reduced from 19.4%to 2.8%,which improves the accuracy of traffic detection in an all-round way. |