Network security communication high-precision intrusion detection method and system based on multi-scale convolutional neural network

Through the deep learning method based on multi-scale convolutional neural network, network traffic data is preprocessed and feature extracted, which solves the shortcomings of traditional intrusion detection systems in identifying unknown threats and adapting to new attacks, and achieves more efficient and accurate intrusions. detection.

CN118869313APending Publication Date: 2024-10-29HENAN UNIVERSITY
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202411049549.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Traditional intrusion detection systems perform poorly in identifying and responding to unknown threats, especially when facing complex network attacks. They also have high false alarm and missed detection rates, making it difficult to adapt to new attack modes.

Method used

The deep learning method based on multi-scale convolutional neural network (MSCNN) is used to preprocess, feature select and denoise the network traffic data, and improve the accuracy and efficiency of intrusion detection through multi-scale feature fusion. Specific steps include data cleaning, imbalance processing, feature importance scoring, denoising autoencoders and the application of multi-scale convolutional neural networks.

Benefits of technology

It significantly improves the detection rate, reduces the false alarm rate and processing speed. It is superior to traditional methods in terms of accuracy, F1-score, precision and recall, and provides a more efficient ability to identify network intrusion types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869313A_ABST
    Figure CN118869313A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of network security, and discloses a network security communication high-precision intrusion detection method and system based on a multi-scale convolutional neural network, and the method comprises the steps: firstly, employing a novel data preprocessing method, combining SMOTE and ENN technologies, and carrying out the high-precision intrusion detection of network security communication; the method solves the problems that data set categories are unbalanced and minority class samples and majority class samples are overlapped, and then introduces a method combining information gain (IG), random forest (RF) feature importance scoring and recursive feature elimination (RFE) to perform feature screening, thereby optimizing model performance and reducing calculation burden. And finally, data features are accurately captured on different scales, so that the analysis capability of the model on complex network behaviors is greatly enhanced. Experimental results carried out on a public data set show that the method can accurately identify network intrusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular to a high-precision intrusion detection method and system for network security communication based on a multi-scale convolutional neural network. Background Art

[0002] In the context of the information age, network security has rapidly become a global challenge. As network attacks increase in number and become more complex, traditional intrusion detection systems (IDS) are facing unprecedented challenges. The effectiveness of these systems depends largely on their ability to identify and respond to unknown threats.

[0003] Traditional intrusion detection systems mainly rely on signature matching and anomaly detection techniques. Signature-based IDS identify attacks by comparing them with known signatures. Although these methods are relatively effective in dealing with known attacks, they perform poorly in identifying zero-day attacks and advanced persistent threats (APTs). Vinayakumar et al. [R. Vinayakumar, K. Soman, P. Poornachandran, "Applying convolutional neural network for network intrusion detection", 2017] pointed out that with the increasing complexity and frequency of network attacks, traditional intrusion detection systems (IDS) face unprecedented challenges, especially in terms of the ability to identify and respond to unknown threats. In addition, with the surge in data volume and the diversification of attack patterns, the performance and scalability of these systems have been severely affected. On the other hand, anomaly-based intrusion detection technology collects and analyzes normal network activity data to establish a standard behavior model. The system then uses this model to compare new, unknown activity data. If there is any discrepancy with the standard behavior pattern, the system generates an alarm. Therefore, it is able to detect zero-day attacks and other unknown attack types. However, anomaly-based intrusion detection often produces false positive results and requires a lot of resources to collect and analyze network behavior data to build and update normal behavior models. Signature-based intrusion detection may produce false negative results and requires regular updates to the attack signature library to include new known threats.

[0004] In recent years, deep learning has made significant progress in image recognition, natural language processing and other fields. However, it cannot be ignored that as the types of hacker network intrusions become more and more complex, conventional network security intrusion detection systems are beginning to face challenges in speed and accuracy. Summary of the invention

[0005] Aiming at the problems of high false alarm rate, high missed detection rate and insufficient adaptability to new attacks in network intrusion detection system (NIDS), the present invention proposes a high-precision intrusion detection method and system for network security communication based on multi-scale convolutional neural network (MSCNN), aiming to improve the efficiency and accuracy of current intrusion detection system by combining the powerful ability of deep learning and the advantage of MSCNN in complex data processing. First, the network traffic data is preprocessed to reduce the data dimension and highlight the key features. Secondly, the model's ability to identify network traffic features is improved by adjusting the architecture and parameters of the model. In order to verify the effectiveness of the present invention, we conducted extensive experiments on 2 public data sets. The experimental results show that compared with traditional IDS, the MSCNN model has significant improvements in detection rate, false alarm rate and processing speed. These results not only demonstrate the application potential of deep learning in the field of intrusion detection, but also provide a new perspective for future network security research.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] On the one hand, the present invention proposes a high-precision intrusion detection method for network security communication based on a multi-scale convolutional neural network, comprising:

[0008] Step 1: Collect network traffic data and pre-process the collected network traffic data; the pre-processing includes data cleaning, imbalance processing and data standardization;

[0009] Step 2: Based on the preprocessed network traffic data, information gain and feature importance score of random forest are used to reduce the search space of feature subsets, and then recursive feature elimination method is applied to further eliminate redundant features;

[0010] Step 3: Use the denoising autoencoder to perform denoising and dimensionality reduction on the network traffic data features processed in step 2;

[0011] Step 4: Convert the data processed in step 3 into a form suitable for multi-scale convolutional neural network input;

[0012] Step 5: Input the data converted in step 4 into the multi-scale convolutional neural network, perform multi-scale feature fusion processing through the multi-scale convolutional neural network, and then obtain the network intrusion type recognition result.

[0013] Furthermore, the imbalance processing includes: using synthetic minority oversampling technology to increase the sample ratio of the minority class, and introducing an edited nearest neighbor algorithm to remove samples that may cause category confusion.

[0014] Furthermore, in step 2, the feature importance score of the random forest is calculated in the following manner:

[0015]

[0016] Where Δerror(f) represents the average error reduction caused by splitting feature f in all trees of the random forest model, and Importance(f) represents the feature importance score of f.

[0017] Furthermore, in the step 3, before the network traffic data features processed in step 2 are input into the denoising autoencoder, it also includes performing a BatchSwapNoise operation on the network traffic data features processed in step 2.

[0018] Furthermore, the multi-scale convolutional neural network includes multiple parallel basic convolution branches, and performs deep serial convolution operations on each branch. The starting point of each branch is a 1×1 convolution layer for dimensionality reduction and cross-channel information integration. After the 1×1 convolution, each branch applies convolution kernels of different scales to obtain features of different scales. After feature extraction of each branch, the multi-scale features are merged through feature fusion operation.

[0019] Another aspect of the present invention provides a high-precision intrusion detection system for network security communication based on a multi-scale convolutional neural network, comprising:

[0020] A data preprocessing module is used to collect network traffic data and preprocess the collected network traffic data; the preprocessing includes data cleaning, imbalance processing and data standardization;

[0021] A feature selection module is used to reduce the search space of feature subsets based on the preprocessed network traffic data using information gain and feature importance scores of random forests, and then recursive feature elimination is applied to further eliminate redundant features;

[0022] A denoising autoencoder processing module is used to perform denoising and dimension reduction processing on the network traffic data features processed by the feature selection module through a denoising autoencoder;

[0023] A data conversion module, used to convert the data processed by the denoising autoencoder processing module into a form suitable for multi-scale convolutional neural network input;

[0024] The network intrusion type identification module is used to input the data converted in the data conversion module into the multi-scale convolutional neural network, perform multi-scale feature fusion processing through the multi-scale convolutional neural network, and then obtain the network intrusion type identification result.

[0025] Furthermore, the imbalance processing includes: using synthetic minority oversampling technology to increase the sample ratio of the minority class, and introducing an edited nearest neighbor algorithm to remove samples that may cause category confusion.

[0026] Furthermore, in the feature selection module, the feature importance score of the random forest is calculated in the following manner:

[0027]

[0028] Where Δerror(f) represents the average error reduction caused by splitting feature f in all trees of the random forest model, and Importance(f) represents the feature importance score of f.

[0029] Furthermore, in the denoising autoencoder processing module, before the network traffic data features processed by the feature selection module are input into the denoising autoencoder, a BatchSwapNoise operation is performed on the network traffic data features processed by the feature selection module.

[0030] Furthermore, the multi-scale convolutional neural network includes multiple parallel basic convolution branches, and performs deep serial convolution operations on each branch. The starting point of each branch is a 1×1 convolution layer for dimensionality reduction and cross-channel information integration. After the 1×1 convolution, each branch applies convolution kernels of different scales to obtain features of different scales. After feature extraction of each branch, the multi-scale features are merged through feature fusion operation.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] In summary, the contributions of the present invention can be summarized as follows:

[0033] 1. This paper proposes a new deep learning architecture for intrusion detection based on network traffic data. By combining the denoising autoencoder (DAE) with a multi-scale convolutional neural network, the performance of intrusion detection is effectively improved.

[0034] 2. The present invention combines the synthetic minority oversampling technique (SMOTE) and the edited nearest neighbor algorithm (ENN) to deal with the imbalance of data set categories, while solving the problem of overlap between minority class samples and majority class samples in the SOMTE algorithm. Then, a novel method combining information gain (IG), random forest (RF) feature importance score and recursive feature elimination (RFE) is used to perform efficient feature screening, thereby optimizing the performance of the model and reducing the computational burden.

[0035] 3. Experiments have shown that the method of the present invention is superior to the compared methods in terms of accuracy, F1-score, precision, and recall. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1This is a flow chart of a high-precision intrusion detection method for network security communication based on a multi-scale convolutional neural network according to an embodiment of the present invention;

[0037] Figure 2 The feature importance ranking of the CICIDS2017 data set provided in the embodiment of the present invention;

[0038] Figure 3 The feature importance ranking of the KDDCUP99 data set provided by the embodiment of the present invention;

[0039] Figure 4 A schematic diagram of the basic structure of a denoising encoder provided by an embodiment of the present invention;

[0040] Figure 5 Representative images of each category in the two datasets provided for embodiments of the present invention;

[0041] Figure 6 A schematic diagram of the structure of a multi-scale convolutional neural network provided by an embodiment of the present invention;

[0042] Figure 7 The distribution of various categories in the original CICIDS2017 dataset provided by the embodiment of the present invention;

[0043] Figure 8 The distribution of various categories in the CICIDS2017 dataset after SMOTE-ENN provided by the embodiment of the present invention;

[0044] Fig. 9 The distribution of various categories in the original KDDCUP99 data set provided by the embodiment of the present invention;

[0045] Fig.10 The distribution of various categories in the KDDCUP99 data set after SMOTE-ENN provided by the embodiment of the present invention;

[0046] Fig.11 The multi-classification performance on the CICIDS2017 dataset provided by the embodiment of the present invention;

[0047] Fig.12 The multi-classification performance on the KDDCUP99 dataset provided by the embodiment of the present invention;

[0048] Fig.13 An example diagram of a confusion matrix provided by an embodiment of the present invention;

[0049] Fig.14 The accuracy and loss of the CICIDS2017 training process provided by the embodiment of the present invention;

[0050] Fig.15The accuracy and loss of the KDDCUP99 training process provided by the embodiment of the present invention;

[0051] Fig.16 This is a schematic diagram of the architecture of a high-precision intrusion detection system for network security communications based on a multi-scale convolutional neural network according to an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:

[0053] like Figure 1 As shown in the figure, a high-precision intrusion detection method for network security communication based on multi-scale convolutional neural network is proposed. First, we collect raw data from a wide range of network traffic data and perform necessary preprocessing on it to meet the needs of subsequent model training. Then, we introduce the denoising autoencoder (DAE) to reduce the noise and dimension of the data to obtain important features of the data. On the basis of ensuring data quality, we adjust the structure and parameters of the multi-scale convolutional neural network (MSCNN) through hyperparameter optimization technology to improve the performance and accuracy of the model. The method specifically includes:

[0054] S101: Collect network traffic data and pre-process the collected network traffic data; the pre-processing includes data cleaning, imbalance processing and data standardization;

[0055] S102: Based on the preprocessed network traffic data, information gain and feature importance score of random forest are used to reduce the search space of feature subsets, and then recursive feature elimination method is applied to further eliminate redundant features;

[0056] S103: performing noise reduction and dimension reduction processing on the network traffic data features processed by S102 through a denoising autoencoder;

[0057] S104: converting the data processed by S103 into a form suitable for input of a multi-scale convolutional neural network;

[0058] S105: Input the data converted in S104 into a multi-scale convolutional neural network, perform multi-scale feature fusion processing through the multi-scale convolutional neural network, and then obtain a network intrusion type recognition result.

[0059] 1 Preprocessing stage

[0060] In the process of building an intrusion detection system (IDS), the quality of data directly affects the accuracy and efficiency of the system. Therefore, this section is dedicated to explaining the key steps of data preprocessing, including data cleaning, imbalance processing, and feature normalization, aiming to provide a fully optimized dataset for model training.

[0061] The primary task of the data cleaning phase is to ensure the integrity of the data set. The present invention strictly screens the data set to identify and exclude records containing null values ​​or infinite values, such as NaN and Infinity. Then, the present invention performs a numerical conversion (such as One-hot encoding) operation on the categorical data to ensure that all variables are available for subsequent algorithm processing. After the numerical conversion is completed, the next step is the standardization process. The key to this process is to convert each eigenvalue to a uniform scale, laying a solid foundation for the subsequent stages.

[0062] With the completion of data cleaning, we have taken strategic measures to deal with the problem of unbalanced dataset. In the existing dataset, normal traffic records are significantly higher than abnormal traffic records, which may bias the IDS to over-focus on normal traffic and ignore potential abnormal activities. The present invention adopts synthetic minority oversampling technique (SMOTE) to increase the proportion of minority class samples. This technique relies on the K nearest neighbor algorithm (KNN) to generate synthetic minority class samples. Specifically, for the minority class sample x i , use the K nearest neighbor (KNN) method to find i The closest k minority class samples. Then, a KNN point is randomly selected and a new sample is generated using formula (1):

[0063]

[0064] in, is the selected neighboring point, and δ is a random number in the range [0,1].

[0065] Nevertheless, the SMOTE method may generate synthetic samples that overlap with the majority class samples, resulting in a decrease in the model recognition ability. To this end, the present invention further introduces the Edited Nearest Neighbor (ENN) algorithm to effectively remove samples that may cause class confusion, thereby reducing noise and improving data quality.

[0066] The ENN algorithm completes the downsampling operation by eliminating noise samples. It defines those samples that belong to different categories and are found by the sample according to the Euclidean distance as noise samples.

[0067] After dealing with imbalance, we then turn our attention to data normalization to ensure that all features are compared on the same scale. Data normalization is to scale the data so that it falls into a small specific range. In machine learning, this process is usually to ensure that the weights of different features are equivalent, making model training smoother and more efficient, and usually improving the convergence speed and performance of the algorithm. The specific formula is shown in formula (2):

[0068]

[0069] Where x is the original sample data in the dataset, x min and x max are the maximum and minimum values ​​in the data set, respectively, new is the result after standardization.

[0070] 2 Feature selection based on recursive feature elimination (RFE)

[0071] With the continuous evolution of network security threats, intrusion detection systems (IDS) have become a key component of network security. However, the existence of high-dimensional data and redundant features greatly increases the computational complexity of IDS, thus affecting its detection efficiency and accuracy. In this context, feature selection has become one of the effective means to improve intrusion detection performance. This section first uses information gain (IG) and feature importance scores of random forest (RF) to reduce the search space of feature subsets, and then applies RFE to further recursively eliminate redundant features.

[0072] Information gain (IG), as an entropy-based measurement method, is used to evaluate the contribution of features to class prediction ability. Information gain can be calculated by the following formula:

[0073] IG(T,f)=H(T)-H(T|f)(3)

[0074] Where H(T) is the entropy of the target variable T, and H(T|f) is the conditional entropy of T given feature f. This step first calculates the information gain value for each feature to help identify the importance of each feature in distinguishing categories. Features with high information gain are more important to the model because they provide more information to predict the output category. Typically, we select a subset of features with high information gain as candidate features. Next, use random forest to evaluate the impact of each feature on the model prediction. The importance of a feature can be calculated by observing the average error reduction when the feature is split, using the following formula:

[0075]

[0076] Among them, Δerror(f) represents the average error reduction caused by splitting feature f in all trees. The feature importance score of random forest further helps us to screen features. By comparing the importance scores of different features, we can reduce the feature subset and retain only the features that are most helpful for model prediction.

[0077] After determining the feature subset, we use the RFE method to eliminate redundant or unimportant features. RFE works by recursively reducing the feature set. It trains the model and removes the least important features at each step until the predetermined number of features is reached. This process involves multiple rounds of model training, and some features are eliminated in each round, which helps us find a more refined and efficient feature subset.

[0078] By combining information gain, random forest feature importance scoring, and RFE, we can significantly reduce the number of features while maintaining model performance. This method is particularly suitable for improving the generalization ability of the model and reducing the risk of overfitting, while also reducing the computational cost of model training and prediction. Especially when dealing with complex data sets that require a large number of features, this method can effectively screen out the most valuable features for the prediction task, thereby improving the prediction accuracy and efficiency of the model.

[0079] Table 1 shows the importance ranking of the features selected by our proposed IG-RF-RFE method. Among them, the CICIDS2017 dataset selected 20 relatively important features, and the KDDCUP99 dataset selected 13 relatively important features.

[0080] Table 1 Feature importance ranking in CICIDS2017 and KDDCUP99 datasets

[0081]

[0082] Figure 2 and Figure 3 It shows the importance of the selected features. Figure 2 This is the feature importance ranking result of the CICIDS2017 dataset. Figure 3 Feature importance ranking results for the KDDCUP99 dataset.

[0083] 3DAE feature learning

[0084] An autoencoder is an unsupervised neural network that aims to learn an encoder that compresses input data into a low-dimensional space representation, and then reconstructs an output that is as similar as possible to the original data through a decoder. This network is trained by minimizing the difference between the input and the reconstructed output, and can capture the most important features of the data. It is often used for tasks such as feature extraction, dimensionality reduction, or data denoising.

[0085] Denoising autoencoder (DAE) is an extension of the autoencoder. The denoising autoencoder reconstructs the input data corrupted by noise, making the model resistant to noise interference and learning a more robust data representation. This enables the denoising autoencoder to perform better when faced with noisy data. First, since the denoising autoencoder needs to restore the original, clean input from the input partially corrupted by noise, it can avoid the model's over-reliance on specific noise or other insignificant details in the training data, which helps prevent overfitting problems. Secondly, since the denoising autoencoder needs to learn the intrinsic structure of the input data from the noise, the features it learns can often better capture the underlying structure and distribution of the data, and are more expressive than the features learned by ordinary autoencoders. The basic structure of the denoising autoencoder is as follows: Figure 4 shown.

[0086] The denoising autoencoder (DAE) proposed in the present invention consists of an input layer, multiple hidden layers and an output layer. Both the input and output layers of DAE have n neurons. The input data x = (x0, ..., xn) is contaminated by BatchSwapNoise. Then it is introduced into the input layer of the encoder. BatchSwapNoise is an effective noise addition technology. In the intrusion detection system (IDS), the application of the BatchSwapNoise noise addition encoder can improve the system's ability to recognize abnormal patterns. In this way, the model not only learns the characteristics of normal traffic, but also enhances the ability to recognize abnormal or attack behaviors. The BatchSwapNoise operation introduces noise by exchanging a small number of features between samples in the same batch. This method can not only simulate the noise that data may encounter in the real world, but also select a small proportion (12%) of features when performing the BatchSwapNoise operation, and randomly select corresponding features from other samples in the same batch for replacement. This replacement process creates slightly distorted data instances, forcing the model to learn to distinguish which features are critical and which are negligible noise while learning the reconstruction task. First, the purpose of the encoder part is to map the noisy input data to a hidden layer, the dimension of which is usually lower than the input layer, in order to learn a compressed representation of the data, thereby forcing the model to capture the most important features of the data. The encoder receives corrupted input And map it to the hidden representation h. The formula is as follows:

[0087]

[0088] Where f is a nonlinear activation function, W and b are weights and biases. In the hidden layer of the encoder, the number of activated neurons decreases as the data is passed to the latent layer, which can extract latent features from the input data. The decoder reconstructs the output As close as possible to the uncorrupted input x, this is achieved by minimizing the reconstruction loss on the training set, which is done through the hidden layer features h. The decoding function is shown below:

[0089]

[0090] Where g is a nonlinear activation function, and are weights and biases.

[0091] The goal of training a denoising autoencoder is to minimize the reconstruction error (RE), that is, the error between the original input x and the reconstructed output The difference between.

[0092]

[0093] 4. Data Conversion

[0094] The purpose of this stage is to convert the standardized, missing value and outlier processed data set into an input suitable for the classification model. This method uses a multi-scale CNN model for final classification, and the two data sets CICIDS2017 and KDDCUP99 used in this invention are both tabular data types. Since the CNN model works better on image data sets, we consider converting the two data sets used into images. The preprocessed data is normalized to the appropriate dimension, and the pixel value range of the image is 0-255, so the network intrusion detection data set needs to be standardized to the range of 0-255.

[0095] For the CICIDS2017 dataset, after feature extraction, each sample has 20 significant features. Therefore, we choose to convert the data into three-channel RGB images with a size of 20×20×3, each containing 60 samples. Similarly, for the KDDCUP99 dataset, there are a total of 41 features, 13 of which are determined to be significant. Considering resource consumption, we choose to generate color images using these 13 features and convert them into three-channel images with a size of 13×13×3, containing 39 samples. Figure 5 The results of converting benign traffic and attack traffic into images from two datasets are shown, where (a) shows the results from the KDDCUP99 dataset and (b) shows the results from the CICIDS2017 dataset.

[0096] 5 Multi-scale feature fusion

[0097] CNN (Convolutional Neural Network) is a deep learning model that is widely used in image recognition, image classification, object detection and other fields. The core idea of ​​CNN is to extract image features through convolution layers. The convolution layer slides over the image through the convolution kernel (or filter) to extract local features, and learns more complex features by stacking multiple convolution layers. In addition, CNN also usually contains pooling layers (used to reduce feature dimensions and enhance the generalization ability of the model) and fully connected layers (for the final classification or regression tasks).

[0098] Multi-scale CNN is an improvement on traditional CNN, which aims to better handle features of different scales (sizes) in images. In traditional CNN, the size of the convolution kernel is usually fixed, which may cause the network to be insensitive to features of different scales. Multi-scale CNN is achieved by using convolution kernels of different sizes to capture features of different scales at the same time, or by downsampling the image to different degrees at different levels. This method can improve the robustness of the network to scale changes, thereby achieving better performance when processing tasks such as image classification and object detection.

[0099] In our model, a multi-scale feature fusion network combining parallel and serial is designed. In the design of multi-scale convolutional neural network (MSCNN), the present invention adopts a parallel architecture that integrates multi-scale feature extraction. The architecture uses parallel branches, each branch captures features of different scales through sequential convolutional layers, and finally fuses them to form a comprehensive feature representation. The structure of multi-scale convolutional neural network is as follows Figure 6 Specifically, the architecture includes the following key components:

[0100] 1) Basic convolutional branch: The starting point of each branch is a 1×1 convolutional layer, which is used for dimensionality reduction and cross-channel information integration. This step not only improves parameter efficiency, but also enhances the expressiveness of the model by introducing nonlinearity.

[0101] 2) Multi-scale feature extraction: After the 1×1 convolution, each branch applies convolution kernels of different scales. The first branch maintains the 1×1 convolution to capture local features; the second branch expands the 1×1 convolution to 3×3 convolution to obtain medium-range spatial context; the third branch further adopts 5×5 convolution to explore wider spatial features.

[0102] 3) Feature merging strategy: After feature extraction from each branch, these multi-scale features are merged through feature fusion operation. This strategy allows the network to integrate information of different scales at the decision level to capture the feature spectrum from fine to coarse.

[0103] 4) Network deepening and optimization: By performing deep serial convolution operations on each branch, the network can learn more abstract feature representations while retaining the ability to perceive different resolutions of the input data.

[0104] 6 Results and Discussion

[0105] This section introduces in detail the required environment for the experiment, the datasets used, the evaluation indicators adopted, and compares them with some other methods.

[0106] 6.1 Experimental Environment

[0107] The proposed framework is evaluated on an Intel system with a Core(TM) i9-13900HX CPU (2.20GHz) and 16GB RAM. The experimental environment runs a 64-bit Windows operating system and is equipped with an NVIDIARTX 4060 graphics card with 8GB RAM. The proposed model is implemented in the Python programming language using the TensorFlow and Keras libraries.

[0108] 6.2 Dataset and Data Preprocessing Description

[0109] In this section, we discuss the datasets used for this experiment. As an implementation option, we use the CICIDS2017 and KDDCUP99 datasets to evaluate the performance of the proposed model.

[0110] CICIDS2017 is a widely used network traffic dataset created by the Canadian Institute for Cyber ​​Security (CIC) in 2017. This dataset aims to provide a comprehensive, realistic, and standardized network traffic pattern for evaluating network intrusion detection systems (NIDS). The original dataset is a 5-day log from Monday, July 3, 2017 to Friday, July 7, 2017. The first day (Monday) contains only benign traffic, while the other days contain various types of attacks in addition to normal network traffic. Each network flow sample covers 79 attributes. The complete CICIDS2017 dataset contains 8 files, a total of 3,119,345 samples and 83 features with 15 class labels (1 normal label and 14 attack labels). The number of each category in the original CICIDS2017 dataset after data cleaning is shown in Table 2.

[0111] Table 2 Distribution of various categories in the original CICIDS2017 dataset

[0112]

[0113] For the CIC-IDS2017 dataset, we first merged similar labels, and then uniformly screened the data under each category to prevent the amount of data after processing from being too large. Subsequently, we used the SMOTE-ENN algorithm to process the data. The processed data is shown in Table 3.

[0114] Table 3 Distribution of various types of CIC-IDS2017 dataset after processing

[0115]

[0116]

[0117] The data visualization in Table 2 and Table 3 is as follows Figure 7 , Figure 8 shown.

[0118] The label encoding process of the processed CIC-IDS2017 dataset is shown in Table 4.

[0119] Table 4 Label encoding process of CIC-IDS2017 dataset

[0120]

[0121] The KDDCUP99 dataset is a network intrusion detection dataset introduced in the KDD (Knowledge Discovery and Data Mining) competition in 1999. It contains data of normal network traffic and different types of network attack traffic, which is used to evaluate the performance of network intrusion detection systems. The dataset consists of four types of attacks: denial of service attack (DoS), user-to-root attack (U2R), remote-to-local attack (R2L), and probing attack (Probing). It includes 494,021 training samples and 311,027 test samples, each of which consists of 41 network traffic features. Since the dataset is seriously unbalanced between attack samples and normal samples, 10% of the dataset is usually used as the training set to control the cost of the learning phase. The original dataset provides a reduced training set, called 10%KDDCUP99Train, which contains 10% of the training data extracted from the original dataset. In addition, the entire dataset is unbalanced in both the training set and the test set, with a higher proportion of attack traffic than normal traffic (80.3% vs. 19.7% in the training set and 80.5% vs. 19.5% in the test set). In this study, we consider using 10% KDDCUP99Train (kddcup.data_10_percent.gz) to reduce experimental time and cost. The number of each category in the original KDDCUP99 dataset is shown in Table 5.

[0122] Table 5 Distribution of each category in the KDDCUP99 dataset

[0123]

[0124] The distribution of each category after SMOTE-ENN processing is shown in Table 6.

[0125] Table 6 Distribution of various types of KDDCUP99 dataset after processing

[0126]

[0127]

[0128] The data visualization in Table 5 and Table 6 is as follows Fig. 9 , Fig.10 shown.

[0129] 6.3 Evaluation Metrics

[0130] To evaluate the performance of our model, we calculated the precision, recall, and false alarm rate. The experimental indicators are calculated from the confusion matrix in Table 7, where True Positive (TP) is the number of normal samples predicted as normal, True Negative (TN) is the number of abnormal samples predicted as abnormal, False Negative (FN) is the number of normal samples predicted as abnormal, and False Positive (FP) is the number of abnormal samples predicted as normal.

[0131] Table 7 Confusion matrix

[0132]

[0133] The evaluation indicators used in the experiment are mainly Accuracy (A), Precision (P), Recall (R) and F1-score. Accuracy represents the ratio of the number of samples that can be correctly classified by the model to the total number of samples, Precision represents the ratio of true positive samples to the number of samples determined as positive by the model, Recall represents the ratio of the number of correctly classified samples to the number of samples that should be correctly classified, and F1-score represents the harmonic mean based on Precision and Recall. The calculation formulas are shown in equations (8) to (11) respectively:

[0134]

[0135]

[0136]

[0137]

[0138] 6.4 Results Analysis

[0139] First, the proposed model is used to conduct multi-classification experiments on the CICIDS2017 dataset to prove the effectiveness of the proposed data preprocessing. The test results of the original dataset and the processed dataset are shown in Table 8, and the visualization results are shown in Fig.11 shown.

[0140] Table 8 Multi-classification results on the CICIDS2017 dataset

[0141]

[0142] In Table 8, we can see the original and processed precision, recall, and F1-score for various categories (such as Bot, Brute Force, DDoS, etc.). The processed data is significantly improved in all three aspects. In particular:

[0143] Regarding precision, the processed values ​​are improved in all categories, with the smallest improvement being in the "Normal" category (0.51%) and the largest improvement being in the "PortScan" category (10.4%).

[0144] In terms of recall, the processed data also showed improvements in all categories, ranging from 0.32% for "DDoS" to 59.49% for "Bot".

[0145] For the F1-score, the processed data also improves in all categories, with the smallest improvement in the "DDoS" category (0.28%) and the largest improvement in the "Bot" category (43.25%).

[0146] From these data, we can see that data processing has a significant positive impact on model performance, especially the improvement in recall and F1 score is huge for some categories. This shows that the class reorganization and SMOTE-ENN algorithm effectively enhance the model's ability to identify different categories of network security threats.

[0147] Next, the proposed model is used to conduct multi-classification experiments on the KDDCUP99 dataset to prove the effectiveness of the proposed data preprocessing. The test results of the original dataset and the processed dataset are shown in Table 9, and the visualization results are shown in Fig.12 shown.

[0148] Table 9 Multi-classification results on the KDDCUP99 dataset

[0149]

[0150] As can be seen in Table 9, after performing data balancing on the KDD CUP 99 dataset, we observed significant performance improvements, which is particularly evident in different categories of network traffic data.

[0151] The improvement in precision indicates that the processed model has made significant progress in the correct proportion of instances judged to be of a specific category. Among them, the most notable improvement occurred in the U2R category, where the precision increased significantly from 61.54% to 100%, showing a huge improvement in the detection ability of this specific threat type.

[0152] The increase in recall indicates that the model is now more accurate in identifying a specific category among all relevant instances. The improvement in this metric is particularly prominent for the U2R and R2L categories, with recall increasing from 66.67% and 65.70% to 100% and 99.97% respectively, indicating that the processed model has made significant progress in avoiding missing these categories.

[0153] The F1-Score is the harmonic mean of precision and recall, which comprehensively reflects the robustness of the model. On the processed data, the F1-scores of all categories have improved, especially the F1-score of the U2R category has increased from 64.00% to a perfect 100%, highlighting the key role of the data processing step in improving the overall performance of the model.

[0154] Fig.13 In the figure, (a) is the confusion matrix of the CICIDS2017 dataset without feature selection and data balancing, (b) is the confusion matrix of the CICIDS2017 dataset after feature selection and data balancing, (c) is the confusion matrix of the KDDCUP99 dataset without feature selection and data balancing, and (d) is the confusion matrix of the KDDCUP99 dataset after feature selection and data balancing.

[0155] contrast Fig.13 In the two confusion matrices (a) and (b), the accuracy of normal traffic classification is very high, and only a few are misclassified. After SMOTE+ENN processing, the classification accuracy of normal traffic decreases slightly, which indicates that when dealing with data imbalance, some normal traffic may be mistaken for attacks. In addition, Fig.13In (a), the number of samples of less frequently occurring categories such as 'Bot', 'Brute Force', 'DoS', 'PortScan', and 'Web Attack' is relatively small, which may lead to poor classification performance. Fig.13 In (b), the classification performance of these categories has improved. In particular, we can notice that the detection accuracy of the ‘Brute Force’ and ‘Web Attack’ categories has improved, while the accuracy of the ‘DDoS’ and ‘DoS’ categories has remained high.

[0156] contrast Fig.13 In the two confusion matrices (c) and (d), the recognition rate of ‘DoS’ (Class 3) is very low, and almost all samples are misclassified as ‘DDoS’. Fig.13 The values ​​on the main diagonal (i.e., the number of correctly classified) for all categories (except 'Normal') in (d) have increased significantly, indicating that the overall classification accuracy of the model has improved. There are almost no misclassifications for categories other than 'Normal'.

[0157] Fig.14 and Fig.15 The accuracy and loss changes of the model in the present invention during training are shown, and the training and validation losses decrease consistently with the increase in the number of iterations, indicating that the model effectively learns from the training data. Similarly, the training and validation accuracy also show consistent improvement. This shows that as more data is processed, the model becomes more accurate in predicting the correct results. As the number of iterations increases from 50 to 100, the accuracy of the model remains at a high level, which confirms its flexibility or scalability.

[0158] Table 10 Comparison with other models using CICIDS2017 dataset and KDDCUP99 dataset

[0159]

[0160] Among them, BC represents binary classification and MC represents multi-classification.

[0161] As can be seen from Table 10, the proposed method model is superior to some other models using the CICIDS2017 dataset and the KDDCUP99 dataset, and can accurately identify the type of malicious attacks. This shows that effective feature selection of the dataset is crucial. In addition, the class imbalance phenomenon in the intrusion detection dataset greatly affects the performance of the model. The SMOTE-ENN method used in the present invention can well overcome the class imbalance phenomenon in the dataset. In addition, multi-scale feature fusion enables the model to capture local details and global structures at the same time, which plays a key role in improving the final classification performance.

[0162] In this paper, we propose a network security communication intrusion detection method based on multi-scale convolutional neural network (MSCNN), aiming to improve the accuracy and efficiency of network intrusion detection. Our method effectively identifies potential malicious activities or violations from network traffic data by combining the powerful learning ability of deep learning and the feature extraction ability of MSCNN. Through extensive experiments on two public datasets CICIDS2017 and KDDCUP99, our method shows more than 95% detection accuracy, precision, recall and f1-score, proving the reliability of the method.

[0163] Based on the above embodiments, Fig.16 As shown, the present invention also proposes a high-precision intrusion detection system for network security communication based on a multi-scale convolutional neural network, comprising:

[0164] A data preprocessing module is used to collect network traffic data and preprocess the collected network traffic data; the preprocessing includes data cleaning, imbalance processing and data standardization;

[0165] A feature selection module is used to reduce the search space of feature subsets based on the preprocessed network traffic data using information gain and feature importance scores of random forests, and then recursive feature elimination is applied to further eliminate redundant features;

[0166] A denoising autoencoder processing module is used to perform denoising and dimension reduction processing on the network traffic data features processed by the feature selection module through a denoising autoencoder;

[0167] A data conversion module, used to convert the data processed by the denoising autoencoder processing module into a form suitable for multi-scale convolutional neural network input;

[0168] The network intrusion type identification module is used to input the data converted in the data conversion module into the multi-scale convolutional neural network, perform multi-scale feature fusion processing through the multi-scale convolutional neural network, and then obtain the network intrusion type identification result.

[0169] Furthermore, the imbalance processing includes: using synthetic minority oversampling technology to increase the sample ratio of the minority class, and introducing an edited nearest neighbor algorithm to remove samples that may cause category confusion.

[0170] Furthermore, in the feature selection module, the feature importance score of the random forest is calculated in the following manner:

[0171]

[0172] Where Δerror(f) represents the average error reduction caused by splitting feature f in all trees of the random forest model, and Importance(f) represents the feature importance score of f.

[0173] Furthermore, in the denoising autoencoder processing module, before the network traffic data features processed by the feature selection module are input into the denoising autoencoder, a BatchSwapNoise operation is performed on the network traffic data features processed by the feature selection module.

[0174] Furthermore, the multi-scale convolutional neural network includes multiple parallel basic convolution branches, and performs deep serial convolution operations on each branch. The starting point of each branch is a 1×1 convolution layer for dimensionality reduction and cross-channel information integration. After the 1×1 convolution, each branch applies convolution kernels of different scales to obtain features of different scales. After feature extraction of each branch, the multi-scale features are merged through feature fusion operation.

[0175] In summary, the present invention proposes a deep learning architecture designed specifically for network traffic data intrusion detection. By combining a denoising autoencoder (DAE) and a multi-scale convolutional neural network, the efficiency and accuracy of intrusion detection are effectively improved. Effectively handle class imbalance: The combination of SMOTE and ENN technology effectively solves the problem of class imbalance in the data set, while overcoming the problem of overlap between minority class samples and majority class samples in the SOMTE algorithm. Innovative feature screening method: A feature screening method combining information gain (IG), random forest (RF) feature importance score and recursive feature elimination (RFE) is introduced, aiming to significantly reduce the computational burden while optimizing model performance. The present invention not only demonstrates the application potential of deep learning technology in the field of intrusion detection, but also provides a new perspective for future network security research.

[0176] The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A high-precision intrusion detection method for network security communication based on multi-scale convolutional neural network, It is characterized in that include: Step 1: Collect network traffic data and pre-process the collected network traffic data; The preprocessing includes data cleaning, imbalance processing and data standardization; Step 2: Based on the preprocessed network traffic data, information gain and feature importance score of random forest are used to reduce the search space of feature subsets, and then recursive feature elimination method is applied to further eliminate redundant features; Step 3: Use the denoising autoencoder to perform denoising and dimensionality reduction on the network traffic data features processed in step 2; Step 4: Convert the data processed in step 3 into a form suitable for multi-scale convolutional neural network input; Step 5: Input the data converted in step 4 into the multi-scale convolutional neural network, perform multi-scale feature fusion processing through the multi-scale convolutional neural network, and then obtain the network intrusion type recognition result.

2. According to claim 1, the high-precision intrusion detection method for network security communication based on multi-scale convolutional neural network, It is characterized in that The imbalance processing includes: using synthetic minority oversampling technology to increase the sample ratio of the minority class, and introducing an edited nearest neighbor algorithm to remove samples that may cause category confusion.

3. According to claim 1, the high-precision intrusion detection method for network security communication based on multi-scale convolutional neural network, It is characterized in that In step 2, the feature importance score of the random forest is calculated as follows: Where Δerror(f) represents the average error reduction caused by splitting feature f in all trees of the random forest model, and Importance(f) represents the feature importance score of f.

4. According to claim 1, the high-precision intrusion detection method for network security communication based on multi-scale convolutional neural network, It is characterized in that In the step 3, before the network traffic data features processed in step 2 are input into the denoising autoencoder, the step 3 also includes performing a BatchSwapNoise operation on the network traffic data features processed in step 2.

5. According to claim 1, the high-precision intrusion detection method for network security communication based on multi-scale convolutional neural network, It is characterized in that The multi-scale convolutional neural network includes multiple parallel basic convolution branches, and performs deep serial convolution operations on each branch. The starting point of each branch is a 1×1 convolution layer for dimensionality reduction and cross-channel information integration. After the 1×1 convolution, each branch applies convolution kernels of different scales to obtain features of different scales. After feature extraction of each branch, the multi-scale features are merged through feature fusion operation.

6. A high-precision intrusion detection system for network security communication based on multi-scale convolutional neural network, It is characterized in that include: A data preprocessing module is used to collect network traffic data and preprocess the collected network traffic data; The preprocessing includes data cleaning, imbalance processing and data standardization; A feature selection module is used to reduce the search space of feature subsets based on the preprocessed network traffic data using information gain and feature importance scores of random forests, and then recursive feature elimination is applied to further eliminate redundant features; A denoising autoencoder processing module is used to perform denoising and dimension reduction processing on the network traffic data features processed by the feature selection module through a denoising autoencoder; A data conversion module, used to convert the data processed by the denoising autoencoder processing module into a form suitable for multi-scale convolutional neural network input; The network intrusion type identification module is used to input the data converted in the data conversion module into the multi-scale convolutional neural network, perform multi-scale feature fusion processing through the multi-scale convolutional neural network, and then obtain the network intrusion type identification result.

7. The high-precision intrusion detection system for network security communication based on multi-scale convolutional neural network according to claim 6, It is characterized in that The imbalance processing includes: using synthetic minority oversampling technology to increase the sample ratio of the minority class, and introducing an edited nearest neighbor algorithm to remove samples that may cause category confusion.

8. According to claim 6, the network security communication high-precision intrusion detection system based on multi-scale convolutional neural network, It is characterized in that In the feature selection module, the feature importance score of the random forest is calculated as follows: Where Δerror(f) represents the average error reduction caused by splitting feature f in all trees of the random forest model, and Importance(f) represents the feature importance score of f.

9. The high-precision intrusion detection system for network security communication based on multi-scale convolutional neural network according to claim 6, It is characterized in that In the denoising autoencoder processing module, before the network traffic data features processed by the feature selection module are input into the denoising autoencoder, a BatchSwapNoise operation is performed on the network traffic data features processed by the feature selection module.

10. The high-precision intrusion detection system for network security communication based on multi-scale convolutional neural network according to claim 6, It is characterized in that The multi-scale convolutional neural network includes multiple parallel basic convolution branches, and performs deep serial convolution operations on each branch. The starting point of each branch is a 1×1 convolution layer for dimensionality reduction and cross-channel information integration. After the 1×1 convolution, each branch applies convolution kernels of different scales to obtain features of different scales. After feature extraction of each branch, the multi-scale features are merged through feature fusion operation.

Citation Information

Cited By

  • Metabolite prediction method based on multi-scale feature enhancement and feature selection

    CN119380825A

  • Converter steelmaking endpoint carbon temperature prediction method and device based on adaptive data enhancement

    CN119514379A

  • Converter steelmaking end-point carbon and temperature prediction method and device based on adaptive data augmentation

    CN119514379B

  • Dacron fabric defect detection method and system based on visual image

    CN119648691A

  • A method and system for detecting defects in polyester fabrics based on visual images

    CN119648691B