| With the rapid development of computer networks,intrusion detection has become an important and challenging problem in network security.Network traffic is increasing exponentially,and identifying attack traffic from a large amount of traffic data is a key problem to be solved by intrusion detection methods.Traditional intrusion detection algorithms face the problems of low accuracy and poor generalization ability in the face of complex and unbalanced intrusion detection data.How to extract semantic features from large-scale network traffic data and use efficient classification models to classify the data Classification is very important.Therefore,this thesis proposes a research on intrusion detection methods based on semantic re-encoding and multi-head attention mechanism.The main research contents are as follows.First of all,aiming at the poor generalization ability of existing intrusion detection methods to deal with increasingly complex network traffic,and considering the difference in semantic dimension between normal traffic and attack traffic,this thesis proposes a network traffic representation method based on semantic re-encoding to construct network traffic Represents the model.Due to the problem of category imbalance in intrusion detection data,it affects the classification effect and the extraction of semantic features.In response to this problem,this thesis proposes an oversampling method for generating minority class samples K-SMOTE to solve the problem of class imbalance,using balanced data for semantic encoding of network traffic,which facilitates the extraction of semantic features by deep learning models,thereby improving the performance of intrusion detection systems.Secondly,in view of the problem that the existing intrusion detection methods cannot efficiently extract the features required by the classifier and have poor performance in network traffic classification,this thesis constructs the MHA-DNN intrusion detection classification model.The model uses the advantages of feature extraction based on the multi-head attention mechanism to extract the semantic features of network traffic,and uses a deep neural network model to classify the data to improve the classification effect of intrusion detection systems on complex network traffic data.Finally,this thesis combines the network traffic representation based on semantic reencoding and the MHA-DNN deep learning model based on multi-head attention mechanism,proposes an intrusion detection method based on semantic re-encoding and multi-head attention mechanism,and evaluates the effectiveness and reliability of the method Experimental verification was carried out.This thesis uses multiple public intrusion detection data sets to carry out experimental verification and result analysis of the algorithm,and compares the experimental results with other intrusion detection classification algorithms.The experimental results show that the intrusion detection method proposed in this thesis can achieve higher classification results. |