A network intrusion detection method, system, medium and device based on seagull optimized extreme learning machine

Through the combination of Seagull optimization algorithm and extreme learning machine, automatic feature selection and model training are realized, which solves the problem of insufficient feature selection and model training of traditional methods in network intrusion detection, and improves detection accuracy and adversarial attack identification capabilities.

CN117459250BActive Publication Date: 2024-10-11GUANGZHOU UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311231473.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2024-10-11
Estimated Expiration
2043-09-22

AI Technical Summary

Technical Problem

Traditional machine learning methods have problems in network intrusion detection, such as difficulty in feature selection, insufficient model training, and insufficient noise processing capabilities, resulting in poor detection results, especially in the case of complex network attacks.

Method used

The Seagull optimization algorithm is combined with the extreme learning machine to realize automatic feature selection and model training, and improves detection capabilities through adversarial training to cope with adversarial attacks.

Benefits of technology

It improves the accuracy and robustness of detection, avoids the difficulty of manual feature selection, enhances the model generalization ability under limited data, and effectively responds to adversarial attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117459250B_ABST
    Figure CN117459250B_ABST
Patent Text Reader

Abstract

The present invention discloses a network intrusion detection method, system, medium and equipment based on Seagull optimized extreme learning machine, including the following steps: S1, data training, by obtaining a training data set, performing data preprocessing, performing data dimension reduction on the preprocessed training data set, then selecting features through an improved Seagull optimization algorithm, and using adversarial samples to train an effective extreme learning machine model; S2, data detection, by performing data preprocessing and data dimension reduction on the acquired traffic data, and then using the trained effective extreme learning machine model for prediction, and finally outputting the prediction result. The present invention realizes automatic feature selection and model training of network traffic data by combining the Seagull optimization algorithm and the extreme learning machine algorithm, and adds adversarial training links to effectively respond to adversarial attacks, thereby improving the accuracy and reliability of network intrusion detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network intrusion detection, and in particular to a network intrusion detection method, system, medium and equipment based on a Seagull optimized extreme learning machine. Background Art

[0002] Currently, network intrusion detection technology has become one of the important research directions in the field of network security. At present, many network intrusion detection methods based on machine learning, deep learning and other technologies have been proposed, such as support vector machines, naive Bayes, decision trees, etc. These methods can effectively detect malicious traffic and improve network security by learning the characteristics of network traffic data.

[0003] However, these traditional machine learning methods have many defects when dealing with complex network attacks. First, these methods have the problem of difficult feature selection. Due to the complexity of network traffic data, existing intrusion detection technologies often need to perform feature selection on the data in order to process the data. However, this process often requires a lot of manual participation, and it is difficult to determine the best feature set, resulting in poor detection results. Secondly, these methods have the problem of insufficient model training. Intrusion detection technology based on machine learning requires a large amount of data for training, but the data obtained in reality is often limited, and there is a lot of noise and interference in the data, which makes the trained model often insufficient and the detection effect poor. In addition, traditional machine learning methods also lack effective processing methods for noise and outliers in the data. Attackers can evade the detection of detectors through various means, making the detectors ineffective.

[0004] In order to overcome the shortcomings of traditional machine learning methods, some new technologies and algorithms have emerged in recent years, such as extreme learning machines and artificial immune systems. Extreme Learning Machine (ELM) is a single hidden layer feedforward neural network algorithm, which has the advantages of fast learning speed, high accuracy and strong generalization ability, and has achieved remarkable results in many fields. The Seagull Optimization Algorithm is an emerging optimization algorithm that can effectively find the optimal solution to high-dimensional nonlinear problems. Combining it with ELM can further improve the accuracy and robustness of network intrusion detection. Summary of the invention

[0005] In order to solve the technical problems existing in the prior art, the present invention provides a network intrusion detection method, system, medium and equipment based on Seagull optimized extreme learning machine. By combining the Seagull optimization algorithm and the extreme learning machine algorithm, automatic feature selection and model training of network traffic data are realized, and an adversarial training link is added to effectively deal with adversarial attacks, thereby improving the accuracy and reliability of network intrusion detection.

[0006] The method of the present invention is implemented by the following technical scheme: a network intrusion detection method based on seagull optimized extreme learning machine, comprising the following steps:

[0007] S1. Perform data training by obtaining a training data set, performing data preprocessing, reducing the dimension of the preprocessed training data set, and then selecting features through the improved Seagull optimization algorithm, and using adversarial samples to train an effective extreme learning machine model;

[0008] S2. Perform data detection by preprocessing and reducing the dimension of the acquired traffic data, and then use the trained effective extreme learning machine model to make predictions, and finally output the prediction results.

[0009] The system of the present invention is implemented by the following technical scheme: a network intrusion detection system based on Seagull optimized extreme learning machine, comprising:

[0010] The data training module obtains the training data set, performs data preprocessing, reduces the dimension of the preprocessed training data set, selects features through the improved Seagull optimization algorithm, and uses adversarial samples to train an effective extreme learning machine model;

[0011] The data detection module performs data preprocessing and data dimension reduction on the acquired traffic data, and then uses the trained effective extreme learning machine model to make predictions and finally output the prediction results.

[0012] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the network intrusion detection method of the present invention are implemented.

[0013] The present invention also provides a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the network intrusion detection method of the present invention is implemented.

[0014] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0015] 1. The present invention realizes adaptive feature selection by adopting the improved Seagull optimization algorithm, thereby avoiding the difficulty of manual feature selection, and can adaptively select the optimal feature set, thereby improving the detection effect.

[0016] 2. The present invention adopts an effective extreme learning machine algorithm for model training, which can realize model training with a smaller amount of data, and improves the generalization ability of the model and the detection accuracy.

[0017] 3. The present invention increases the ability to recognize adversarial attacks by utilizing the adversarial training method, and can effectively deal with adversarial attacks in real application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0019] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0020] Example

[0021] like Figure 1 As shown, this embodiment provides a network intrusion detection method based on Seagull optimized extreme learning machine, including the following steps:

[0022] S1. Perform data training by obtaining a training data set, performing data preprocessing, reducing the dimension of the preprocessed training data set, and then selecting features through the improved Seagull optimization algorithm, and using adversarial samples to train an effective extreme learning machine model;

[0023] S2. Perform data detection by preprocessing and reducing the dimension of the acquired traffic data, and then use the trained effective extreme learning machine model to make predictions, and finally output the prediction results.

[0024] Specifically, in this embodiment, the specific process of data preprocessing is as follows:

[0025] The NSL-KDD dataset is used as the training dataset. Each dataset contains 42 features. The first 41 features are used to describe the attributes of the dataset, and the last feature represents the label of the dataset. Specifically, the label includes normal data and 39 different types of attacks. These 39 attack types belong to four main attack categories: denial of service (DOS), user-to-root attack (U2R), remote-to-local attack (R2L), and reconnaissance (Probe).

[0026] The training set and the validation set are divided into two sets. The training set covers 30 different types of intrusion attacks, while the test set contains 9 intrusion attack types that do not appear in the training set.

[0027] Convert the character type in the feature into a numeric type; first, record TCP, UDP, and TCMP in the second dimension as 1, 2, and 3 respectively; second, record the 67 service types in the third feature as 1 to 67 in alphabetical order; finally, assign label values ​​0 to 4 to normal traffic and the four intrusion attack types;

[0028] The digitized data is normalized, and the formula is as follows:

[0029]

[0030] Among them, x ij represents the normalized value of the jth feature in the i-th sample; x ij ′ represents x ij Initial value; x′ j (max) and x′ j (min) represent the maximum and minimum values ​​of the j-th feature in the unnormalized samples, respectively.

[0031] Specifically, in this embodiment, the specific process of the improved Seagull optimization algorithm is as follows:

[0032] The population of the existing seagull algorithm is randomly generated and has high uncertainty. Therefore, the convergence speed is slow when dealing with complex problems. For complex feature selection problems, this embodiment uses chaotic sine mapping to initialize the seagull population. Its mathematical model is as follows:

[0033]

[0034] Among them, δ is the control factor in the range of [0,4], x n is a chaotic variable; in this embodiment, the use of chaotic sine mapping to initialize the seagull population can enable the seagull population to achieve better spatial distribution during the initialization process and accelerate the convergence speed of the seagull optimization algorithm;

[0035] The spiral search method of the Seagull optimization algorithm is improved by using a hybrid attack strategy. The attack formula is split into sine and cosine to obtain:

[0036] P s (t) = rad 2 ·sin(θ)·θ·D+P best (t) = x·z·D+P best (t)

[0037] P s (t) = rad 2 ·cos(θ)·θ·D+P best (t) = y·z·D+P best (t)

[0038] After fusion and arrangement, we can get:

[0039]

[0040] Among them, P s (t) represents the current position of the search agent; rad is the radius of each spiral revolution; θ is a random value in the range [0,2π]; D is the distance that the seagull individual updates about its optimal position; Pbest (t) is the position of the current optimal seagull individual; x, y, z are the motion descriptions of the three planes; pr is the attack selection probability, which is set to 0.3 based on experience.

[0041] Specifically, in this embodiment, an effective extreme learning machine is used as a learning model. Before calculating the weights of the output layer, the weights and biases of the input layer are adjusted so that the output matrix of the hidden layer satisfies the column full rank condition. This improvement can reduce the training time and improve the classification accuracy of the model. Suppose the training data set is The radial basis activation function is g(x)=e-x2, the number of hidden layer nodes is n0, and the specific process is as follows:

[0042] Choose the weight W i and bias b i (i=1,2,…,n0); permutation is satisfied, then the first n0 samples are changed accordingly The order of the data is as follows: i ,t i )(i=1,2,...,n) and X i =(x i1 ,x i2 ,...,x id )(i=1,2,...,n);

[0043] When j=1,2,...,d, the calculation is as follows:

[0044]

[0045]

[0046]

[0047] δ=lg d+lg 2

[0048]

[0049]

[0050] set up Let M = 1, M = max{g(x)|x∈R} = g(x0)(x0∈R) and

[0051] Calculate external rights

[0052] make and

[0053]

[0054] Calculate the output weights:

[0055] Specifically, in this embodiment, in order to improve the robustness of the model, this embodiment adds an adversarial training method to the model to increase the ability to identify adversarial attacks. The specific process of using adversarial samples in this embodiment is as follows:

[0056] The JSMA similarity algorithm is used to slightly change the features in the source data to construct adversarial samples. By using the gradient of the forward derivative, only one important feature value is changed each time.

[0057] The distance between the original sample and the adversarial sample is measured by the number of feature modifications described by the 0-norm, in order to find the perturbation vector that changes the minimum feature quantity. Its mathematical model is as follows:

[0058]

[0059] Among them, △r is the expected perturbation of the adversarial sample, r is any existing perturbation, f is the classifier, and x ′ is the original sample;

[0060] After the adversarial samples are obtained using the JSMA algorithm, they are added to the source data for adversarial training.

[0061] Based on the same inventive concept, the present invention proposes a network intrusion detection system based on Seagull optimized extreme learning machine, comprising:

[0062] The data training module obtains the training data set, performs data preprocessing, reduces the dimension of the preprocessed training data set, selects features through the improved Seagull optimization algorithm, and uses adversarial samples to train an effective extreme learning machine model;

[0063] The data detection module performs data preprocessing and data dimension reduction on the acquired traffic data, and then uses the trained effective extreme learning machine model to make predictions and finally output the prediction results.

[0064] In addition, the present invention also proposes a storage medium and a computer device. The storage medium stores a computer program, and when the computer program is executed by the processor, steps S1-S2 of the network intrusion detection method of the present invention are implemented. The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the network intrusion detection method of the present invention is implemented, that is, the process including the above steps S1-S2.

[0065] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A network intrusion detection method based on Seagull optimized extreme learning machine, characterized in that: The following steps are involved: S1. Perform data training by obtaining a training data set, performing data preprocessing, reducing the dimension of the preprocessed training data set, and then selecting features through the improved Seagull optimization algorithm, and using adversarial samples to train an effective extreme learning machine model; S2, perform data detection, preprocess and reduce the dimension of the acquired traffic data, and then use the trained effective extreme learning machine model to make predictions, and finally output the prediction results; The specific process of the improved Seagull optimization algorithm is as follows: The chaotic sine mapping is used to initialize the seagull population, and its mathematical model is as follows: Among them, δ is the control factor in the range of [0,4], x n is a chaotic variable; The spiral search method of the Seagull optimization algorithm is improved by using a hybrid attack strategy. The attack formula is split into sine and cosine to obtain: P s (t)=rad 2 ·sin(θ)·θ·D+P best (t)=x·z·D+P best (t) P s (t)=rad 2 ·cos(θ)·θ·D+P best (t)=y·z·D+P best (t) After fusion and arrangement, we can get: Among them, P s (t) represents the current position of the search agent; rad is the radius of each spiral revolution; θ is a random value in the range [0,2π]; D is the distance that the seagull individual updates to the optimal position; P best (t) is the position of the current optimal seagull individual; x, y, z are the motion descriptions of three planes; pr is the attack selection probability; The effective extreme learning machine is used as the learning model. Before calculating the output layer weights, the weights and bias of the input layer are adjusted so that the output matrix of the hidden layer satisfies the column full rank condition. Suppose the training data set The radial basis activation function is The number of hidden layer nodes is n0, and the specific process is as follows: Choose the weight W i and bias b i (i=1,2,…,n0); permutation is satisfied, then the first n0 samples are changed accordingly order; using the following marked and arranged data (X i ,t i )(i=1,2,...,n) and X i =(x i1 ,x i2 ,...,x id )(i=1,2,...,n); When j=1,2,...,d, the calculation is as follows: set up Let M = 1, M = max{g(x)|x∈R} = g(x0)(x0∈R) and Calculate output weights make and Calculate the output weights:

2. A network intrusion detection method based on Seagull optimized extreme learning machine according to claim 1, characterized in that: The specific process of data preprocessing is as follows: The NSL-KDD dataset is used as the training dataset. Each dataset contains 42 features. The first 41 features are used to describe the attributes of the dataset, and the last feature represents the label of the dataset. The labels include normal data Normal and 39 different types of attacks. These 39 attack types belong to four attack categories: denial of service DOS, user-to-root attack U2R, remote-to-local attack R2L, and reconnaissance Probe. Divide into training set and test set. The training set covers 30 different types of attacks, while the test set contains 9 attack types that do not appear in the training set. Convert the character type in the feature to a numeric type; first, record TCP, UDP, and TCMP in the second dimension as 1, 2, and 3 respectively; second, record the 67 service types in the third feature as 1 to 67 in alphabetical order; finally, assign label values ​​0 to 4 to normal traffic and the four attack categories respectively; The digitized data is normalized, and the formula is as follows: Among them, x ij represents the normalized value of the jth feature in the i-th sample; x ij ′ represents x ij Initial value; x′ j (max) and x′ j (min) represent the maximum and minimum values ​​of the j-th feature in the unnormalized samples, respectively.

3. A network intrusion detection method based on Seagull optimized extreme learning machine according to claim 1, characterized in that: The specific process of using adversarial samples is as follows: The JSMA similarity algorithm is used to change the features in the source data to construct adversarial samples. By using the gradient of the forward derivative, only one important feature value is changed each time. The distance between the original sample and the adversarial sample is measured by the number of feature modifications described by the 0-norm, in order to find the perturbation vector that changes the minimum feature quantity. Its mathematical model is as follows: Where △r is the expected perturbation of the adversarial sample, r is any existing perturbation, f is the classifier, and x′ is the original sample; After the adversarial samples are obtained using the JSMA algorithm, they are added to the source data for adversarial training.

4. A network intrusion detection system based on the network intrusion detection method based on seagull optimized extreme learning machine according to claim 1, characterized in that: include: The data training module obtains the training data set, performs data preprocessing, reduces the dimension of the preprocessed training data set, selects features through the improved Seagull optimization algorithm, and uses adversarial samples to train an effective extreme learning machine model; The data detection module performs data preprocessing and data dimension reduction on the acquired traffic data, and then uses the trained effective extreme learning machine model to make predictions and finally output the prediction results.

5. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the network intrusion detection method according to any one of claims 1 to 3 are implemented.

6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the network intrusion detection method according to any one of claims 1 to 3 is implemented.