Network intrusion detection method, terminal equipment and storage medium
Through LightGBM feature selection and dual-channel residual convolution module, combined with genetic algorithm to optimize the network structure, the GA-RCBA-Net model is constructed, which solves the problems of low intrusion detection accuracy and poor generalization ability in the existing technology, and achieves high accuracy Network intrusion detection with low false alarm rate.
Patent Information
- Application Number
- CN202411315456.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-20
AI Technical Summary
The existing network intrusion detection technology cannot effectively deal with complex network attack models, and there are problems such as high false positive rate, large system resource consumption and poor model generalization capabilities.
The LightGBM model is used to calculate the feature importance, select the importance score to filter the features, and design the dual-channel residual convolution module and the residual BA module. Combined with the genetic algorithm to optimize the network structure parameters, and build the GA-RCBA-Net model.
It significantly improves the accuracy of intrusion detection, enhances the generalization ability and interpretability of the model, reduces the false positive rate, and achieves an accuracy rate of 99.31% and a false positive rate of 0.22%, which is better than the existing technology.
Smart Images

Figure CN119007401A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to network security detection technology, in particular to a network intrusion detection method, terminal equipment and storage medium. Background Art
[0002] Traditional intrusion detection technology cannot cope with the increasingly complex network attack patterns. Traditional signature-based intrusion detection systems rely heavily on matching known attack patterns and cannot detect unknown attack patterns. Traditional anomaly-based intrusion detection systems have problems such as high false positive rate and high system resource consumption. Although hybrid intrusion detection systems have the advantages of both modes by combining the above two modes, they still have problems such as poor real-time performance and high complexity. Machine learning-based detection methods can cope with increasingly complex network attack patterns to a certain extent and automatically learn complex attack patterns in traffic. However, they still cannot avoid the limitations brought by manual feature extraction. With the development of deep learning, deep learning methods are used in network intrusion detection to automatically extract features. Although some deep learning models have been applied to the field of network intrusion detection and have achieved certain results, due to the existence of redundant features in the data set, it is easy to cause the model to overfit the wrong data, resulting in poor model generalization ability. In addition, traditional network structures have limitations such as gradient disappearance. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a network intrusion detection method, terminal equipment and storage medium to improve the accuracy of intrusion detection in view of the deficiencies in the prior art.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: a network intrusion detection method, comprising the following steps:
[0005] S1, preprocessing the intrusion detection data set to obtain a preprocessed data set;
[0006] S2. Use the preprocessed data set to construct a training set, use the training set as the input of the LightGBM model, train the LightGBM model, obtain the importance score of each feature, select the features corresponding to the importance score greater than the set threshold, and construct a feature set;
[0007] S3. Use the feature set as the input of the intrusion detection network, train the intrusion detection network, and obtain the intrusion detection model; wherein the intrusion detection network includes a dual-channel residual convolution module, and the dual-channel residual convolution module is connected to the residual BA module; the dual-channel residual convolution module includes a first convolution layer, a first maximum pooling layer, and a first batch of normalization layers connected in sequence, the first batch of normalization layers are connected to the second convolution layer and the third convolution layer, the second convolution layer is sequentially connected to the second batch of normalization layers, the fourth convolution layer, the second maximum pooling layer, and the third batch of normalization layers, and the third convolution layer is connected to the third maximum pooling layer; the outputs of the third batch of normalization layers and the third maximum pooling layers are spliced as the input of the residual BA module.
[0008] The present invention calculates the importance of features based on the feature selection method of LightGBM, screens features according to the importance score, improves the interpretability of IDS (Intrusion Detection System), and experimental verification shows that the method of the present invention significantly improves the accuracy of intrusion detection. The present invention performs dual-channel convolution feature extraction through an enhanced convolutional network, and uses residual connections to ensure that the accuracy of the model increases with the increase in depth. The dual-channel design of the present invention effectively solves the gradient vanishing problem, optimizes the feature fusion mechanism, and improves the generalization ability of the model.
[0009] The specific implementation process of step S1 includes:
[0010] Perform one-hot encoding on the categorical feature fields in the intrusion detection dataset to obtain numerical feature fields;
[0011] The numerical feature fields are normalized to obtain a preprocessed data set.
[0012] For the categorical feature fields in the data set, the present invention converts them into numerical values through unique hot encoding so as to serve as the input of the network model. The dimension gap between different features is large. The present invention uses normalization technology to convert the range of feature values into a standardized interval, thereby reducing the impact of the dimension gap.
[0013] The residual BA module includes a BiGRU layer and a self-attention layer connected in sequence, and the output of the BiGRU layer is spliced with the output of the self-attention layer. In view of the high computational complexity and difficulty in capturing deep-level dependencies faced by ordinary self-attention modules when processing long sequences, a residual BA module is designed. By introducing residual connections, the model is easier to learn the residual between input and output, and the model's ability to capture deep-level features and dependencies is enhanced.
[0014] The BiGRU layer includes a cascaded forward GRU and a backward GRU.
[0015] When training the intrusion detection network, the process of optimizing the parameters of the intrusion detection network includes:
[0016] 1) Define the intrusion detection network parameter set P = {p1, p2, ..., p n}, where each parameter p i The domain of D i ; n is the number of intrusion detection network parameters; the number of initialization iterations t is 0;
[0017] 2) Initialize the population G0 = {g1, g2, ... g n}, each individual g i ∈G0, each individual is a combination of elements in the parameter set P;
[0018] 3) For the population G of the tth iteration t Each individual g in i Calculate the fitness f(g i ), according to the fitness f(g i ), using the roulette algorithm from the population G t Select individuals for reproduction and generate population subsets
[0019] 4) From G t 'Select parent individuals g1 and g2, and generate offspring g3 through the crossover operator;
[0020] 5) Apply mutation operator to g3 to randomly change some of its parameters;
[0021] 6) Use the generated offspring g3 to replace or supplement the original population G t , forming a new generation of population G t+1 ;
[0022] 7) The value of t is increased by 1, and steps 3) to 6) are repeated until the maximum number of iterations is reached to obtain the final population;
[0023] 8) Select the individual g with the highest fitness from the final population * As the optimal solution.
[0024] The present invention optimizes the network structure parameters and uses the genetic algorithm GA to determine the optimal parameter combination of the network. By determining the optimal parameter combination through GA, the optimal parameter combination can be automatically determined, eliminating the trouble of manually adjusting parameters one by one and improving the efficiency and reliability of parameter optimization.
[0025] As an inventive concept, the present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the steps of the above method.
[0026] As an inventive concept, the present invention also provides a computer-readable storage medium having a computer program / instruction stored thereon; characterized in that the computer program / instruction implements the steps of the above method when executed by a processor.
[0027] As an inventive concept, the present invention also provides a computer program product, including a computer program / instruction; when the computer program / instruction is executed by a processor, the steps of the above method are implemented.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1. The present invention proposes a feature selection method based on LightGBM, which calculates the feature importance and sets the threshold for feature screening to ensure the interpretability of the model. Experiments have also verified that compared with other feature selection methods, the method of the present invention significantly improves the accuracy of the model.
[0030] 2. The present invention proposes a new deep learning model as a classifier for abnormal traffic detection. In this model, a new dual-channel residual convolution module is designed. The dual-channel design effectively solves the gradient vanishing problem, optimizes the feature fusion mechanism, and improves the generalization ability of the model. In addition, in view of the high computational complexity and difficulty in capturing deep dependencies faced by ordinary self-attention modules when processing long sequences, a residual BA module is designed. By introducing residual connections, the model is easier to learn the residual between input and output, enhancing the model's ability to capture deep features and dependencies.
[0031] 3. The present invention optimizes the complete network structure parameters and uses the genetic algorithm GA to determine the optimal parameter combination of the network.
[0032] 4. The performance of the model is verified using the network intrusion detection benchmark dataset NSL-KDD. The experimental results prove the effectiveness of the model. The accuracy of the model of the present invention on the NSL-KDD dataset reaches 99.31%, and the false alarm rate is extremely low, only 0.22%. The comprehensive performance is better than the existing advanced work and reaches the most advanced level. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a flow chart of the detection method according to an embodiment of the present invention;
[0034] Figure 2 This is a structural diagram of GA-RCBA-Net according to an embodiment of the present invention;
[0035] Figure 3 This is a structural diagram of a dual-channel residual convolution block according to an embodiment of the present invention;
[0036] Figure 4 This is a structural diagram of a residual BA module according to an embodiment of the present invention;
[0037] Figure 5 This is a BiGRU principle diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] In the embodiment of the present invention, the terms "first", "second" and other similar words are not intended to imply any order, quantity and importance, but are only used to distinguish different elements. In the embodiment of the present invention, the terms "one", "an" and other similar words are not intended to indicate that there is only one of the things described, but indicate that the relevant description is only for one of the things described, and the things described may have one or more. In the embodiment of the present invention, the terms "comprise", "include" and other similar words are intended to indicate logical relationships, and cannot be regarded as indicating spatial structural relationships. For example, "A includes B" is intended to indicate that B logically belongs to A, but does not mean that B is located inside A in space. In addition, the meanings of the terms "comprise", "include" and other similar words should be regarded as open, not closed. For example, "A includes B" is intended to indicate that B belongs to A, but B does not necessarily constitute the whole of A, and A may also include other elements such as C, D, and E.
[0040] Example 1
[0041] The embodiment of the present invention provides an intrusion detection method, such as Figure 1 As shown, the following steps are included:
[0042] Step 1: Preprocess the benchmark intrusion detection dataset NSL-KDD
[0043] (1) One-hot encoding: Represents a given data set, which contains n data consisting of q features. The categorical feature fields in the data set need to be converted to numerical types through one-hot encoding so that they can be used as input for the network model.
[0044] (2) Normalization: When the dimensions of different features differ greatly, the min-max normalization technique is used to convert the feature value range into a standardized interval, thereby reducing the impact of the dimension difference.
[0045]
[0046] (3) Dataset Division
[0047] In order to ensure the distribution consistency among the training set, validation set, and test set, we resampled and partitioned the dataset. The ratio of the training set, validation set, and test set is 3:1:1 respectively.
[0048] Step 2: Feature selection based on LightGBM
[0049] LightGBM evaluates the importance of each feature through a gradient boosted decision tree (GBDT) to identify the features that contribute most to the prediction target. The goal of LightGBM is to build an additive model consisting of a series of decision trees, with the core goal of minimizing the loss function.
[0050] make represents the preprocessed data set, let F(x) be the predicted value of the model, and the loss function is defined as L(y,F(x)), where. The training process of GBDT can be described as follows:
[0051] F t (x) = F t-1 (x)+ηh t (x)
[0052] where F t (x) is the model after the tth iteration, h t (x) represents the tth decision tree, and η is the learning rate. The goal of each round of training is to find a decision tree that minimizes the loss function, and its mathematical expression is:
[0053]
[0054] After training, LightGBM will output the importance score of each feature. This score is usually based on the number of splits or split gains of the feature in all trees. Let the importance score of the jth feature be I j , then the calculation method is:
[0055]
[0056] Where T represents the total number of trees, N t The set of nodes that constitute the tth tree, Indicates the importance of feature j to node n in the tth tree.
[0057] Finally, the most important features are selected based on the importance scores of the features. A threshold k is set and the top k most important features are selected to form a new feature subset.
[0058] Step 3: Build the intrusion detection model GA-RCBA-Net
[0059] The embodiment of the present invention proposes a new deep learning network architecture Genetic Algorithm-optimized Residual Convolutional-BiGRU-Attention network (GA-RCBA-Net), such as Figure 2 As shown in the figure, the network architecture mainly consists of two parts: dual-channel residual convolution module and residual BA module. In addition to improving the network structure, we optimized the parameters of the model and used the GA algorithm to determine the optimal parameter combination of the network.
[0060] 1) Dual-channel residual convolution module
[0061] The dual-channel residual convolution block is as follows Figure 3 shown.
[0062] The convolution layer in the block has a kernel size of 3, and the filter size gradually increases to 64, 128, and 256 with the depth of the layer, which is used to quickly extract features. The dual-channel design effectively solves the gradient vanishing problem, optimizes the feature fusion mechanism, and ensures that the accuracy of the model increases with the increase of depth. The calculation of a single-layer convolution is as follows:
[0063]
[0064] Where W represents the weight of the convolution kernel, b is the bias term, Represents the convolution operation, σ represents the activation function, and the rectified linear unit (ReLU) is used here. The ReLU function introduces nonlinear properties. If the input is negative, the output of the ReLU function is zero. This sparse activation feature helps alleviate the problem of overfitting.
[0065] The convolutional layer is followed by a pooling layer and batch normalization (BN) to improve the stability of the model. Batch normalization (BN) adjusts the intermediate representation of the network by normalizing the input data of each batch to prevent its value from being too large or too small, accelerate network convergence, eliminate the problem of gradient disappearance, and improve the stability of the model. The calculation process is as follows:
[0066] h2=MaxPooling(h1)
[0067]
[0068] Among them, μ is the mean of h2, σ 2is the variance of h2, γ and β are learnable scaling and shifting parameters, and ∈ is a small constant for numerical stability.
[0069] After dual-channel feature extraction, the outputs of the two channels are connected, and the calculation process is as follows:
[0070] C3=C1(h3)+C2(h3)
[0071] C1(h3)=BN(MaxPooling(conv(BN(conv(h3)))))
[0072] C2(h3)=MaxPooling(conv(h3))
[0073] (2) Residual BA module
[0074] The residual BA module includes a BiGRU layer and a self-attention layer, such as Figure 4 As shown. BiGRU consists of a forward GRU and a reverse GRU. The forward GRU starts from the first time step of the sequence and processes each time step in sequence to calculate the forward hidden state sequence. In contrast, the reverse GRU starts from the last time step of the sequence and processes each time step in the sequence in reverse to calculate the backward hidden state sequence. The forward and backward hidden states are summed element by element to obtain a bidirectional hidden state sequence, as shown in Figure 5 shown.
[0075] The BiGRU layer enhances the model's understanding of context by combining forward and backward sequence information. Each GRU unit contains an update gate, a reset gate, and a hidden state. Through these gating mechanisms, GRU can dynamically learn long-term dependencies of input sequences. Given the output of the dual-channel residual convolution module C3 = (x1, x2, ..., x t ), the calculation of the BiGRU unit is as follows:
[0076] z t =sigmoid(W z ·[h t-1 ,x t ]+b z );
[0077] r t =sigmoid(W r ·[h t-1 ,x t ]+b r );
[0078]
[0079]
[0080] Where W z ,W r ,W h is the weight parameter, b z ,b r ,b h is the bias term. t-1 ,x t ] represents the hidden layer state h of the previous time step t-1 and the input x at the current time step t A batch normalization layer is added after the BiGRU layer to prevent overfitting and enhance the stability of the model.
[0081] H=BN(h t )
[0082] Through the self-attention mechanism, the residual BA module focuses "attention" on the important parts of the sequence, so as to learn in a targeted manner and improve the model's ability to understand sequence data. In order to solve the problem that ordinary attention layers are difficult to capture deep dependencies, the model introduces residual connections, which makes it easier to learn the residual between input and output, and enhances the model's ability to capture deep features and dependencies. Given the output of the BN layer H = (h1, h2, ... h t ), and the query vector q used for attention calculation, the calculation method of additive attention is as follows:
[0083] e t =v T tanh(W1·h t +W2·q).
[0084] Where W1, W2 and v are all learnable parameters. The calculation process of attention weight is as follows:
[0085]
[0086] exp(e t ) Calculate e t The exponential value of , produces a non-negative value about the attention score. These attention scores are then normalized into a probability distribution by dividing each score by the sum of all attention scores in all time steps to ensure that the sum of the attention weights is equal to 1. The weight vector c is defined as:
[0087] The output of the self-attention layer is connected to the input of the self-attention layer through a residual connection. This structure helps the model preserve information, promote gradient flow, and improve overall training and learning efficiency. The output vector O is defined as: t =c t +h t .
[0088] Step 4 GA parameter optimization
[0089] GA is used to select the parameter combination that optimizes the model effect. The optimized parameters include the kernel size of the Conv layer, the filter size, the number of units in the BiGRU layer, the discard rate of the dropout layer of the MLP module, and other parameters.
[0090] First, initialize the parameters and define the parameter set P = {p1, p2, ..., p n}, where each parameter p i The domain of D i , indicating the selection range of the parameter.
[0091] Initialize the population G0 = {g1, g2, ... g n}, each individual g i ∈G0, is a combination of parameter sets P, for the population G t Each individual g in i Calculate the fitness f(g i ): Performance of the GA-RCBA-Net model on the validation set under this parameter combination.
[0092] f(g i )=PerformanceMeasure(g i )
[0093] According to the fitness f(g i ), using the roulette algorithm from the population G t Select individuals for reproduction and generate population subsets
[0094] From G t 'Select parent individuals g1 and g2, and generate offspring g3 through the crossover operator.
[0095] Apply a mutation operator to g3 to randomly change some of its parameters to increase the diversity of the population.
[0096] Use the generated offspring g3 to replace or supplement the original population G t , forming a new generation of population G t+1 .
[0097] The above process is repeated until the maximum number of iterations T is reached, and then the algorithm stops.
[0098] From the final population G t Select the individual g with the highest fitness * As the optimal solution.
[0099]
[0100] The effectiveness of the method of the embodiment of the present invention is verified by experiments as follows.
[0101] First, we use LightGBM for feature selection. In the NSL-KDD dataset, there are 41 features in total, and 20 key features are selected through LightGBM.
[0102] Subsequently, we compared the feature selection algorithm based on LightGBM with several classic feature selection algorithms, including RF (Random Forest), RFE (Recursive Feature Elimination), MI (Mutual Information), f-classif, Chi-Squre and XGBoost algorithms. Table 1 shows the accuracy comparison results of different feature selection algorithms.
[0103] Table 1 Performance of GA-RCBA-Net using different feature selection methods on the NSL-KDD dataset
[0104]
[0105]
[0106] On the NSL-KDD dataset, GA-RCBA-Net achieves 99.31% accuracy on a reduced feature subset, which is 1%-2% higher than other classic feature selection methods.
[0107] Precision and recall are key indicators for evaluating classification techniques. The accuracy and recall of this model on the NSL-KDD dataset increased by about 1%, reaching 99.33% and 99.29% respectively.
[0108] The F1 score is an important metric for evaluating the performance of classification techniques on imbalanced datasets. It is a metric that weighs precision and recall. On the NSL-KDD dataset, the F1 score obtained by this model is 99.31%, which is about 1% higher than other feature selection methods.
[0109] Compared to other feature selection techniques, our method significantly reduces the false positive rate (FPR), which indicates that the number of false positives of our model is almost negligible. The FPR of our model on the NSL-KDD dataset is 0.22%, which is the lowest false positive rate compared to other feature selection methods.
[0110] The model of the embodiment of the present invention is compared with the existing advanced models, including the DNN model based on statistical importance feature selection (SI+DNN) (Thakkar A, Lohiya R. Fusion of statistical importance for feature selection in Deep Neural Network-based Intrusion Detection System[J]. Information Fusion, 2023, 90: 353-363.), the BWO-CONV-LSTM network based on ABC feature selection (Kanna PR, Santhi P. Hybrid Intrusion Detection using MapReduce based BlackWidow Optimized Convolutional Long Short-Term Memory Neural Networks[J]. Expert Systems with Applications, 2022, 194.), the DT based on PIO feature selection (Alazzam H, Sharieh A, Sabri K EA feature selection algorithm for intrusion detection system based on Pigeon Inspired Optimizer[J]. Expert Systems with Applications, 2020, 148.), the BiLSTM (Imrana Y, Xiang Y, Ali L,et al.A bidirectionalLSTM deep learning approach for intrusion detection[J].Expert Systems withApplications,2021,185.),DNN+Dropout(Thakkar A,Lohiya R.Analyzing fusion ofregularization techniques in the deep learning-based intrusion detectionsystem[J].International Journal of Intelligent Systems, 2021, 36(12):7340-7388.), RNN variant based on XGBoost feature selection (Kasongo S M.A deep learning technique for intrusion detection system using a Recurrent Neural Networks based framework[J].Computer Communications,2023,199:113-125.), optimized CNN (OCNN) and hierarchical multi-scale LSTM (HMLSTM) (Kanna PR, Santhi P. Unified deep learning approach for efficient intrusion detection system using integrated spatial–temporal features[J]. Knowledge-Based Systems,2021,226:107132.). Due to the excellent performance of these models, the embodiments of the present invention selected them for evaluation and comparison. Table 2 shows the comparison of the results of this model and the existing methods on the NSL-KDD dataset. .
[0111] Table 2 Performance comparison between the method of the present invention and the existing method on the NSL-KDD dataset
[0112]
[0113] On the NSL-KDD dataset, the comprehensive performance of this model in various indicators exceeds that of existing advanced models. Among them, the accuracy rate is improved by about 1% to 14%, the precision is improved by about 1% to 13%, the recall rate is improved by about 1% to 8%, and the F1 score is improved by about 1% to 11%. The FPR value of this model is as low as 0.22%, and the recall rate is 99.29%, indicating that this model has a very low false alarm rate, which is very important for network intrusion detection tasks.
[0114] Example 2
[0115] Embodiment 2 of the present invention provides a terminal device corresponding to the above-mentioned embodiment 1. The terminal device may be a processing device for a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of the above-mentioned embodiment.
[0116] The terminal device of this embodiment includes a memory, a processor, and a computer program stored in the memory; the processor executes the computer program in the memory to implement the steps of the method in the above-mentioned embodiment 1.
[0117] In some implementations, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0118] In some other implementations, the processor may be a central processing unit (CPU), a digital signal processor (DSP), or other general-purpose processors of various types, which are not limited herein.
[0119] Example 3
[0120] Embodiment 3 of the present invention provides a computer-readable storage medium corresponding to the above embodiment 1, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the method of the above embodiment 1 are implemented.
[0121] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.
[0122] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0123] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0125] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0126] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A network intrusion detection method, characterized in that: The following steps are involved: S1, preprocessing the intrusion detection data set to obtain a preprocessed data set; S2. Use the preprocessed data set to construct a training set, use the training set as the input of the LightGBM model, train the LightGBM model, obtain the importance score of each feature, select the features corresponding to the importance score greater than the set threshold, and construct a feature set; S3. Use the feature set as the input of the intrusion detection network, train the intrusion detection network, and obtain the intrusion detection model; wherein the intrusion detection network includes a dual-channel residual convolution module, and the dual-channel residual convolution module is connected to the residual BA module; the dual-channel residual convolution module includes a first convolution layer, a first maximum pooling layer, and a first batch of normalization layers connected in sequence, the first batch of normalization layers are connected to the second convolution layer and the third convolution layer, the second convolution layer is sequentially connected to the second batch of normalization layers, the fourth convolution layer, the second maximum pooling layer, and the third batch of normalization layers, and the third convolution layer is connected to the third maximum pooling layer; the outputs of the third batch of normalization layers and the third maximum pooling layers are spliced as the input of the residual BA module.
2. The network intrusion detection method according to claim 1, characterized in that: The specific implementation process of step S1 includes: Perform one-hot encoding on the categorical feature fields in the intrusion detection dataset to obtain numerical feature fields; The numerical feature fields are normalized to obtain a preprocessed data set.
3. The network intrusion detection method according to claim 1, characterized in that: The residual BA module includes a BiGRU layer and a self-attention layer connected in sequence, and the output of the BiGRU layer is spliced with the output of the self-attention layer.
4. The network intrusion detection method according to claim 3, characterized in that: The BiGRU layer includes a cascaded forward GRU and a backward GRU.
5. The network intrusion detection method according to claim 1, characterized in that: When training the intrusion detection network, the process of optimizing the parameters of the intrusion detection network includes: 1) Define the intrusion detection network parameter set P = {p1, p2, ..., p n }, where each parameter p i The domain of D i , represents the range of parameter selection; n is the number of intrusion detection network parameters; the number of initialization iterations t is 0; 2) Initialize the population G0 = {g1, g2, ... g n }, each individual g i ∈G0, each individual is a combination of elements in the parameter set P; 3) For the population G of the tth iteration t Each individual g in i Calculate the fitness f(g i ), according to the fitness f(g i ), using the roulette algorithm from the population G t Select individuals for reproduction and generate population subsets 4) From G t 'Select parent individuals g1 and g2, and generate offspring g3 through the crossover operator; 5) Apply mutation operator to g3 to randomly change some of its parameters; 6) Use the generated offspring g3 to replace or supplement the original population G t , forming a new generation of population G t+1 ; 7) The value of t is increased by 1, and steps 3) to 6) are repeated until the maximum number of iterations is reached to obtain the final population; 8) Select the individual g with the highest fitness from the final population * As the optimal solution.
6. A terminal device comprising a memory, a processor and a computer program stored in the memory; characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program / instruction stored thereon; characterized in that: When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 5 are implemented.
8. A computer program product comprising a computer program / instructions; characterized in that: When the computer program / instructions are executed by a processor, the steps of the method of any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Intrusion detection method and system based on multi-channel deep convolution
CN115062300A
Network intrusion detection method and system based on flow feature fusion
CN116506210A
Intrusion detection method and system based on multi-scale spatial-temporal feature residual fusion
CN117375896A
Intrusion detection method and system based on feature selection and transformer-BiGRU
CN118199933A
Flat bottom resin zipper
KR1020240149766A
Cited By
Intelligent assessment and transformation management system for scientific and technological achievements
CN120197826A
