Aiming at the problem that the classification accuracy of the existing intrusion detection methods is low due to the imbalance of classification,this paper proposes two algorithm models to improve.First a hybrid intrusion detection method based on convolutional neural network and Ada Boost algorithm is studied.The main research of this method includes three aspects:(1)the optimization strategy of loss function is added to CNN model.In the feature extraction stage,the focus loss is used as the loss function of the model,which improves the classification ability of attack data.(2)In order to solve the problem that the weight of small proportion attack data is not high,a method to change the sample weight in the classification training stage is proposed.It takes the weighted average correct rate of each sample in the first t training as the weight of the sample,so as to narrow the weight gap between different types of sample data and improve the detection ability of the model for small proportion attack data.(3)In order to solve the problem of redundancy in the training process of weak classifiers in existing intrusion detection methods,a selective integration method is adopted to divide the weak classifiers that exceed the threshold,and combine the weak classifiers with high classification accuracy to form a strong classifier,so as to reduce the occurrence of redundancy.Second,an improved sparse autoencoder is studied,which is combined with softmax classifier.By continuously adjusting the parameters of the sparse autoencoder,the learning ability of small proportion attack data classification is increased,so as to improve the classification accuracy of the model.This method uses KDD99 and UNSW-NB15 datasets to test the code in pycharm environment.The test results show that this method has advantages over the existing methods in the detection rate and false alarm rate of small proportion of attack data.This method is suitable for the analysis of continuous and classified attack data,improves the detection effect of imbalanced data classification,and solves the defects of existing intrusion detection models with large classification error and slow calculation speed. |