A DDos detection method in edge computing environment based on deep learning
By building a lightweight deep learning model in an edge computing environment, the challenges of DDoS detection, such as limited computing power, small storage space, and large network fluctuations at edge nodes, are solved, achieving efficient and accurate DDoS detection results.
Patent Information
- Application Number
- CN202211453973.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-11-21
AI Technical Summary
Existing DDoS detection technologies are difficult to deploy in edge computing environments due to limited computing power, small storage space, and large network fluctuations. They also suffer from low detection accuracy, high false alarm rate, and long latency, failing to meet the needs of edge nodes.
A lightweight DDoS detection method based on deep learning is adopted, including a preprocessing layer, a convolutional layer, a BiLSTM layer, and an output layer. Through data preprocessing, lightweight model construction and deployment, the Smote algorithm is used to balance the label categories, and the spatial and temporal features of network traffic are extracted by combining one-dimensional convolution and BiLSTM. The Softmax layer is used for classification.
It achieves high accuracy, low false positive rate and low latency DDoS detection in edge computing environment. The model accuracy, precision and recall reach 0.968, 0.96 and 0.96 respectively. The total number of parameters is 1*106. It has strong adaptability and can effectively detect modern DDoS attacks.
Smart Images

Figure CN115712972B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of network security, edge computing and artificial intelligence, and provides a DDos detection method in an edge computing environment based on deep learning. Background Art
[0002] Edge computing is a new computing paradigm that reduces computing pressure on central nodes and is closer to terminal devices and data sources. It meets the needs of sinking computing services, but also brings security issues. Among them, the biggest threat to edge computing security and the one that has caused huge economic losses and security accidents is the distributed denial of service attack (DDos). In the edge computing environment, due to limited computing power and storage space, traditional defense methods are difficult to apply. Therefore, it is of great practical significance to propose a lightweight DDos detection algorithm that adapts to the edge computing environment.
[0003] As IoT technology and cloud computing concepts become more mature, the previous cloud computing and fog computing cannot meet the growing demand for computing business sinking. In order to reduce the computing pressure of the central node and make more use of the computing power and storage resources of the edge node, edge computing is born. Edge computing is infinitely close to the terminal device and can receive information from the data source in real time. It is a computing paradigm that solves the problem of computing and storage offloading. As an extension of cloud computing, it makes up for the shortcomings of centralization, achieves high continuity and low latency, and is more suitable for deploying intelligent tasks with high real-time performance. With the application and deployment of edge computing, related network security and attack defense issues have emerged. Distributed denial of service attack (DDos) is a highly concealed large-scale distributed network attack. Attackers can form distributed botnets to launch attacks. Usually, attackers will forge source IPs, which makes the attack extremely concealed and makes it more difficult to detect attacks. IoT devices under edge computing are often difficult to defend against DDos attacks. Some typical DDos attack cases, such as the Mirai botnet attack on KrebsOnSecurity and the Dyn attack, have caused huge economic losses and security threats. As the connectivity and openness of IoT facilities increase, the attack surface of the entire IoT has also expanded. Edge nodes have limited computing power and storage space and lack effective security protection, making them very vulnerable to DDos attacks.
[0004] Traditional defense and detection technologies are difficult to apply to edge nodes. Although edge nodes can isolate most of the data from the edge of the network and can detect and intercept the latest DDos attacks in the first place, the existing cloud-based DDos detection methods are difficult to meet the needs of edge nodes. This solution usually does not take into account the characteristics of edge nodes such as limited computing power, small storage space, and large network fluctuations. Therefore, it is necessary to design a lightweight DDos attack detection solution based on the edge computing environment to overcome the problems of low detection accuracy, high false alarm rate, extended time, insufficient computing power and storage capacity.
[0005] Recently, the field of network security has also begun to use deep learning, which has shined in the fields of images and languages, to solve some difficult security problems. Deep learning is a new research direction in the field of machine learning. It is introduced into machine learning to make it closer to its original goal - artificial intelligence. Deep learning is the inherent laws and representation levels of learning sample data. The information obtained in the learning process is of great help in the interpretation of data such as text, images and sounds. Its ultimate goal is to enable machines to have analytical learning capabilities like humans and to be able to recognize data such as text, images and sounds. Deep learning is a complex machine learning algorithm that has achieved results in speech and image recognition that far exceed previous related technologies. The combination of deep learning technology and the field of network security provides new solutions to some difficult problems.
[0006] In Proceedings of the 2017IEEE 4th International Conference on CyberSecurity and Cloud Computing (CSCloud), in 2017, He et al. published a paper titled "MachineLearning Based DDoS Attack Detection from Source Side in Cloud", which proposed a DDoS detection method for cloud servers based on machine learning technology. The methods used by He et al. include linear regression, support vector machine, decision tree, naive Bayes, random forest, unsupervised K-means, and Gaussian expectation maximization. Each method is tested on a set of self-generated data containing four attacks and the scores of these methods are compared. The highest score is the random forest method. The designed algorithm can roughly meet the detection requirements of DDos, but the index score of the detection result is not high.
[0007] South African Institute for Computer Scientists & Information Technologists Conference, 2013, [5] Staudemeyer RC et al. published a paper titled "Evaluating performance of long short-term memory recurrent neural networks on intrusion detection data", which attempts to combine the field of network traffic anomaly detection with the LSTM algorithm. The experimental results show that LSTM has a good ability to detect abnormal traffic, proving the usability of the network in the field of traffic analysis. The dataset used in this paper has fewer DDos attack categories and lacks some of the latest DDos attack category data, which cannot prove that the algorithm can adapt well to the current environmental requirements.
[0008] In the 2021 issue of Electronics, Ferrag et al. published a paper titled "Deep Learning-Based Intrusion Detection for Distributed Denial of Service Attack in Agriculture 4.0". They used several classic networks of deep learning to train the CIC-DDos-2019 dataset, and compared the index scores of each network and analyzed the pros and cons. The applications of several classic networks have not been optimized in a targeted manner, and it may be difficult to deploy applications in an environment where edge nodes have limited computing power, small storage space, and large network fluctuations.
[0009] In Applied Sciences, in 2021, Chartuni A et al. published a paper titled "Multi-Classifier of DDoS Attacks in Computer Networks Built on Neural Networks", which preprocessed and labeled the CIC-DDos-2019 dataset and trained a DDoS multi-classifier based on a DNN network. This application is also not optimized specifically, and it may be difficult to deploy the application in an environment with limited edge node computing power, small storage space, and large network fluctuations.
[0010] In summary, there is still a lack of a means to efficiently detect DDos in edge computing environments. It is imperative to design a DDos detection algorithm that can be deployed in an environment with limited edge node computing power, small storage space, and large network fluctuations, and to make the algorithm have high accuracy and high recall rate. Summary of the invention
[0011] The purpose of the present invention is to solve the problem that the existing DDos detection technology cannot be deployed due to environmental problems such as limited edge node computing power, small storage space, and large network fluctuations.
[0012] In order to overcome the above technical problems, the present invention adopts the following technical means:
[0013] A DDos detection method in an edge computing environment based on deep learning includes the following steps:
[0014] Step 1: A preprocessing layer was built to filter dirty data, normalize, and perform statistical analysis on attack type labels on the input network traffic data. The Smote algorithm was used to upsample sparse classes and downsample dense classes to balance label categories and avoid the long-tail effect to obtain preprocessed network traffic data.
[0015] Step 2: Model construction: In the edge computing environment, edge nodes have problems such as small memory space, limited computing power, and large network fluctuations. In order to better meet the needs, the model should be as lightweight and simple as possible.
[0016] Step 3: Divide the preprocessed network traffic data into a training set and a test set, input the training set and the test set into the model for training, and obtain a trained model;
[0017] Step 4: Deploy the trained model to the edge node, collect the network traffic data in the node, use the preprocessing layer to process the traffic data, and then send it to the deployed model for real-time DDos prediction.
[0018] In the above technical solution, the filtering in step 1 specifically includes the following steps: screening out redundant attributes, anonymous attributes, and socket attributes that cannot be used for classification.
[0019] In the above technical solution, each column of network traffic data is normalized by L2 norm, and after L2 norm normalization, the data is subjected to quantile mapping to transform the attribute value of each data so that the attribute value is mapped to a normal distribution, wherein the formula for L2 normalization is as follows:
[0020]
[0021] Where n is the dimension of the feature, x is the n-dimensional feature X = (x1, x2, x3, ... x n ).
[0022] In the above technical solution, the attack label classification method of Dos attack performs subset summary statistical processing of strong similarity labels on DDos attack labels to obtain a highly targeted attack label classification method.
[0023] In the above technical solution, the model construction in step 2 specifically includes the following steps:
[0024] Step 2.1, use the preprocessing layer in step 1 as the input layer;
[0025] Step 2.2, build the convolution layer:
[0026] The convolution layer consists of three composite one-dimensional convolution layers, where the number of output filters in the one-dimensional convolution is 20, 40, and 60 respectively, the size of the convolution kernel is 4*1, and the padding method is "same"; after the one-dimensional convolution, Relu is used as the activation function, and a BN layer is connected to form a composite one-dimensional convolution layer, where,
[0027] The one-dimensional convolution operation formula is as follows:
[0028]
[0029] In the formula, x j is the jth input feature map (a feature map is a function that takes a feature vector in one space and converts it into a feature vector in another space, here it refers to the output activation of a given filter), i is the number of one-dimensional convolution layers, k ij is the convolution kernel used, * represents the convolution operation and the "same" filling method is used, f() is the activation function, ReLU is used for nonlinear processing, and no bias is added to the convolution layer;
[0030] The calculation formula of the BN layer is as follows:
[0031]
[0032] In the formula, y j It is the feature map of the BN layer after nonlinearization. for y j The average value of for y j The variance value of , γ is the parameter for scaling again after standardization, and β is the parameter for translation after standardization;
[0033] Step 2.3, build the BiLSTM layer, extract the feature graphs of each dimension of the network traffic data through the convolution layer, transform the shape to adaptively input the BiLSTM layer. The network architecture of the BiLSTM model includes: the BiLSTM unit is equipped with an input gate i, a forget gate f and an output gate o. The current data x at time t tWhen entering, combined with internal storage unit C t-1 And output h t-1 Calculate the current output h t , and then promptly update the internal storage unit C t
[18] , the operation formula of the forget gate is as follows:
[0034] f t =sigmoid(W f ·[h t-1 , x t ]+b f )
[0035] W f To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, b f is the corresponding bias.
[0036] i is Each unit in generates a corresponding value in the interval [0, 1] to control the amount of new information added. The operation formula of the input gate can be expressed as:
[0037]
[0038] i t =sigmoid(W i ·[h t-1 , x t ]+b t )
[0039]
[0040] W i , W c To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, b t , b c is the corresponding bias;
[0041] i is used to filter the number of current unit states, which can be expressed as:
[0042] o t =sigmoid(W o ·[h t-1 , x t ]+b o )
[0043] o t =sigmoid(W xo x t +W ho h t-1 +b o )
[0044] H t =O t tanh(C t )
[0045] W in this form o To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, b o is the corresponding bias, H τ Represents the value of the hidden state.
[0046] For the BiLSTM model at time t, the output h t , and It can be expressed as:
[0047]
[0048]
[0049]
[0050] original To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, is the corresponding bias, x represents the input, W represents the connection weight between units, b is the bias vector, and “·” represents the dot product operation;
[0051] Step 2.3: Build the output layer. The output layer consists of a fully connected layer with an output space dimension of 320 and a Softmax layer. After passing through BiLSTM, the data is flattened and enters the fully connected layer and the Softmax layer. The Softmax layer is a multi-classifier, and the expression is as follows:
[0052]
[0053] Softmax is also called the normalized exponential function. The base is e, input x i is the exponent of the power;
[0054] This layer can convert the classification result values within the real number range, and then evaluate the detection results of the model of the present invention through the cross entropy loss function.
[0055] Because the present invention adopts the above technical solution, it has the following beneficial effects:
[0056] 1. The model accuracy, precision, recall rate and F1-Score of the model after training of the present invention are significantly improved compared with the previous solutions, and the indicators of the eight classification tasks reach 0.968, 0.96, 0.96 and 0.96 respectively.
[0057] 2. The model of the present invention is adaptable to the edge computing environment and is lightweight, and the total number of parameters of the model is 1*106.
[0058] 3. The data set used in the training process of the present invention is more in line with the actual production of the edge computing environment. Taking into account the environmental characteristics of edge computing, an attack label fusion method based on statistical analysis of strong similarity subset labels is proposed, and an experimental scenario is proposed based on this. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a network structure model diagram of the present invention;
[0060] Figure 2 is the attack label distribution statistics diagram of the present invention;
[0061] Figure 3 It is a BiLSTM layer network architecture diagram of the present invention;
[0062] Figure 4 It is a simplified flowchart of the algorithm of the present invention. DETAILED DESCRIPTION
[0063] The present invention investigated the existing network traffic data sets and selected the CIC-DDos-2019 data set to simulate the network traffic data in the edge computing environment. Its content is that the CIC organization uses the latest DDos attack method to conduct attack tests in different time periods within two days. Some time periods in the data set add interference factors such as network restrictions and network fluctuations, which can be closer to the network traffic data in the edge computing environment. For this data set, the present invention designs a highly targeted preprocessing step and builds a preprocessing layer to process the CIC-DDos-2019 data set:
[0064] (1) In view of the high dimension of data features, we first screen out two redundant attributes named "Fwd Header Length.1", a column of anonymous attributes named "Unnamed", and socket attributes that cannot be used for classification, such as "Source Port", "Destination Port", "Source IP", "Destination IP", "Flow ID", "Timestamp", and "SimilarHTTP", to reduce the feature dimension of the experimental data without affecting model training.
[0065] (2) To address the problem of uneven distribution of data attribute features, uneven distribution of attribute values, and excessively large distribution intervals, preprocessing requires normalization of the data. L2 norm normalization is performed on each column of data (i.e., each feature). The formula for L2 normalization is shown in formula (13). After normalization, quantile mapping is performed on the data. This method transforms the attribute value of each data item so that the attribute value is mapped to a normal distribution. Attribute values that obey a normal distribution can effectively shorten the training convergence time.
[0066]
[0067] Where n is the dimension of the feature, x is the n-dimensional feature X = (x1, x2, x3, ... x n ).
[0068] (3) To address the imbalanced distribution of classes in the dataset, the statistics of attack type labels are as follows: Figure 2 As shown, the Smote algorithm is used for oversampling
[0069] Experiments have shown that this preprocessing method can increase the detection accuracy of the model and accelerate the convergence of the model.
[0070] In view of the serious attack label classification confusion problem in 13 categories in the CIC-DDos-2019 dataset, the present invention counted and analyzed the subsets of 12 attack types (excluding benign classes) with strong similarities in the attribute space as shown in Table 1 below. The present invention designed an attack label classification method for modern DDos attacks and an experimental scenario suitable for edge computing scenarios.
[0071] Table 1 Summary of subsets of strong similarity labels
[0072]
[0073]
[0074] Table 1 divides four subsets, and other attack labels remain independent. In the table, ACV refers to attributes with constant values, AFRO refers to attributes with high frequency of zero values, and ASAH refers to attributes with deviations due to strong homogeneity of attribute values. Therefore, the corresponding subsets with strong similarity are subjected to label fusion operations. The corresponding attack labels are fused into "DNS / LDAP / SNMP", "NetBIOS / Portmap", "SSDP / UDP", and "UDPLag / Syn". After label fusion, there are 8 categories including various types of DDos attacks and benign ones. Therefore, the experimental process can be converted into an eight-classification task of network traffic under a DDos attack. Based on the CIC-DDos-2019 dataset, this paper proposes this attack label classification method for modern DDos attacks for the first time, and designs an experimental scenario for edge computing environments based on this. The present invention proposes a highly targeted classification scheme to improve the accuracy of neural networks and reduce category confusion.
[0075] Combining deep learning theories such as one-dimensional convolution and BiLSTM, a lightweight DDos detection model suitable for edge computing environments is designed and built. Through model comparison experiments, the model structure is pruned to simplify the model structure on the basis of achieving the task objectives, so as to obtain the best lightweight model structure and its optimal hyperparameter list. The construction idea of this model is: the network traffic data is sent to the convolution layer composed of three layers of one-dimensional convolution to extract spatial features, and then flattened and sent to the BiLSTM layer to extract temporal features, and finally output through the fully connected layer and the Softmax layer. The model proposed in the present invention can not only effectively extract and learn the spatial and temporal features of network traffic data, but also adjust the parameter amount through pruning operations to lightweight the model. For the hyperparameters in the model, the present invention uses a particle swarm algorithm to optimize. Experiments have shown that this model can better complete the tasks of defending and detecting DDos attacks in edge computing environments with limited computing power and storage space. The network structure model of the present invention is as follows: Figure 1 shown.
[0076] S1. Build the input layer
[0077] The network traffic data is input into the model after the data preprocessing step uniquely designed by the present invention.
[0078] S2. Build convolutional layer
[0079] The convolution layer is an effective method for extracting local features in deep learning, and one-dimensional convolution is often used to process sequence data. The attributes of network traffic data are usually serialized numerical strings, so the present invention does not use the common two-dimensional convolution method to extract features. One-dimensional convolution layers are more effective in extracting local feature maps of such data. The extracted feature map is used as the input of the next layer of the network. As the depth of the convolution layer increases, the neural network will learn features of different dimensions.
[0080] The convolution layer of the present invention is composed of three composite one-dimensional convolution layers. The number of output filters in the one-dimensional convolution is 20, 40, and 60 respectively, the size of the convolution kernel is 4*1, and the filling method is "same"; after the one-dimensional convolution, Relu is used as the activation function, and a BN layer is connected to form a composite one-dimensional convolution layer.
[0081] The one-dimensional convolution operation formula is shown in formula (1):
[0082]
[0083] In formula (1), x j is the jth input feature map, i is the number of one-dimensional convolution layers, k ij is the convolution kernel used, * represents the convolution operation and adopts the "same" filling method, f() is the activation function, the present invention adopts ReLU for nonlinear processing, and the convolution layer does not add bias.
[0084] Each convolution activation layer is followed by a BN (Batch Normalization) layer. Through the processing of the BN layer, the eigenvalues of the layer can be made to conform to the standard normal distribution, reducing the possibility of gradient-related problems (vanishing or exploding) during training and accelerating the convergence of the model. The calculation formula of the BN layer is shown in formula (2):
[0085]
[0086] In formula (2), y j It is the feature map of the BN layer after nonlinearization. for y j The average value of for y j The variance value of , γ is the parameter for scaling again after standardization, and β is the parameter for translation after standardization.
[0087] S3. Build the BiLSTM layer
[0088] After extracting the feature maps of each dimension of the network traffic data through the convolution layer, the shape is transformed to adaptively input into the BiLSTM layer.
[0089] This layer consists of a BiLSTM layer with an output space dimension of 80.
[0090] The BiLSTM layer (bidirectional long short-term memory layer) is a special recurrent neural network structure. Compared with the general RNN, it can take into account the network traffic data information input in both the forward and backward directions. This bidirectional information collection property greatly enhances the globality, enabling it to effectively extract the time characteristics of the data. The network architecture of the BiLSTM model of the present invention is as follows: Figure 3 Shown
[0091] The BiLSTM unit is set with input gate i, forget gate f and output gate o. The current data x at time t t When entering, combined with internal storage unit C t-1 And output h t-1 Calculate the current output h t , and then promptly update the internal storage unit C t
[18] , where W is the neuron parameter value, b is the corresponding bias, and the calculation formula of the forget gate is as follows:
[0092] f t =sigmoid(W f ·[h t-1 , x t ]+b f )
[0093] W f To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, b f is the corresponding bias.
[0094] i is Each unit in generates a corresponding value in the interval [0, 1] to control the amount of new information added. The operation formula of the input gate can be expressed as:
[0095]
[0096] i t =sigmoid(W i ·[h t-1 , x t ]+b t )
[0097]
[0098] W i , W c To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, b t , b c is the corresponding bias;
[0099] i is used to filter the number of current unit states, which can be expressed as:
[0100] o t =sigmoid(W o ·[h t-1 , x t ]+b o )
[0101] o t =sigmoid(W x o xt +W ho h t -1+b0)
[0102] H t =O t tanh(C t )
[0103] W in this form o To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, b o is the corresponding bias, H t Represents the value of the hidden state.
[0104] For the BiLSTM model at time t, the output h t , and It can be expressed as
[0105]
[0106]
[0107]
[0108] original To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, is the corresponding bias, x represents the input, W represents the connection weight between units, b is the bias vector, and “·” represents the dot product operation;
[0109] S3. Build the output layer
[0110] After passing through BiLSTM, the data is flattened and enters the fully connected layer and the Softmax layer. The optimizer of the present invention uses Adam, and the loss function used is multi-classification cross entropy.
[0111] This layer consists of a fully connected layer with an output space dimension of 320 and a Softmax layer.
[0112] The Softmax layer is a multi-classifier, and its expression is shown in formula (11):
[0113]
[0114] This layer can convert the classification result values within the real number range, and then evaluate the detection results of the model of the present invention through the cross entropy loss function. DETAILED DESCRIPTION
[0116] The first step, data preprocessing, reduces the number of parameters while selecting and retaining the optimal and most effective model structure.
[0117] The original CIC-DDos-2019 contains NaN and Infinite values, which are not conducive to model training. Therefore, after merging all CSV files, dirty data needs to be cleaned up and the data containing NaN and Infinite are deleted as dirty data. The data is then sent to the input layer for preprocessing.
[0118] Step 2: Model Construction
[0119] The present invention uses Python language and Tensorflow framework to build the DDos detection model of the present invention.
[0120] Step 3: Model Training
[0121] Data is extracted from the preprocessed data in proportion to each attack and benign data, and a total of 200,000 data sets are synthesized for model training. The total data set is divided into a training set and a test set in an 8:2 ratio. The training set is divided into a validation set using a four-fold cross-validation method to verify model accuracy and adjust model hyperparameters. Multi-classification cross entropy is used as the loss function, and the instantiated optimizer uses Adam. The eight-classification experimental scenario designed by the present invention is used for corresponding training. The particle swarm algorithm is used to optimize the model's hyperparameters. The model flow chart is as follows: Figure 4 The parameter list of the model is shown in Table 2
[0122] Table 2 Model parameter list
[0123]
[0124]
[0125] Step 4: Model Evaluation
[0126] Statistically compare the accuracy, precision, recall, and F1-Score values of the training models, draw a regression matrix, select the model with the best effect, and save it.
[0127] Step 5: Model deployment
[0128] Deploy the trained model to the edge node, collect the network traffic data in the node, use the CICFlowMeter-V3 plug-in to process the traffic data, delete the dirty data and send it to the deployed model for real-time DDos prediction.
Claims
1. A DDos detection method in an edge computing environment based on deep learning, characterized in that: The following steps are involved: Step 1: A preprocessing layer was built to filter dirty data, normalize, and perform statistical analysis on attack type labels on the input network traffic data. The Smote algorithm was used to upsample sparse classes and downsample dense classes to balance label categories and avoid the long-tail effect to obtain preprocessed network traffic data. Step 2: Model construction; Step 2.1, use the preprocessing layer in step 1 as the input layer; Step 2.2, build the convolution layer: The convolution layer is composed of three composite one-dimensional convolution layers, in which the number of output filters in the one-dimensional convolution is 20, 40, and 60 respectively, the size of the convolution kernel is 4*1, and the filling method is "same"; after the one-dimensional convolution, Relu is used as the activation function, and a BN layer is connected to form a composite one-dimensional convolution layer, in which, The one-dimensional convolution operation formula is as follows: In the formula, is the jth input feature map. A feature map is a function that obtains a feature vector in one space and converts it into a feature vector in another space. Here, it refers to the output activation of a given filter. i is the number of one-dimensional convolution layers. is the convolution kernel used, * represents the convolution operation and uses the "same" filling method, As the activation function, ReLU is used for nonlinear processing, and no bias is added to the convolutional layer; The calculation formula of the BN layer is as follows: In the formula, It is the feature map of the BN layer after nonlinearization. for The average value of for The variance value of is the parameter that is scaled again after normalization, is the parameter for translation after normalization; Step 2.3, build the BiLSTM layer, extract the feature graphs of each dimension of network traffic data through the convolution layer, transform the shape to adaptively input the BiLSTM layer. The network architecture of the BiLSTM model includes: the BiLSTM unit is equipped with an input gate i, a forget gate f and an output gate o. The data at the current time t When entering, combined with internal storage units and output Calculate the current output , and then update the internal storage unit in time [18], the operation formula of the forget gate is as follows: To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, is the corresponding bias; i is Each unit in generates a corresponding value in the interval [0,1] to control the amount of new information added. The operation formula of the input gate can be expressed as: , To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, , is the corresponding bias; i is used to filter the number of current unit states, which can be expressed as: original To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, is the corresponding bias, Represents a value for the hidden state; For the BiLSTM model at time t, the output , and It can be expressed as original , To correspond to the neuron parameters, the input can be adjusted to the same dimension as the hidden layer at time t, , is the corresponding bias, x represents the input, W represents the connection weight between units, b is the bias vector, and "·" represents the dot product operation; Step 2.3: Build the output layer. The output layer consists of a fully connected layer with an output space dimension of 320 and a Softmax layer. After passing through BiLSTM, the data is flattened and enters the fully connected layer and the Softmax layer. The Softmax layer is a multi-classifier, and the expression is as follows: Softmax is also called the normalized exponential function. The base is e, input is the exponent of the power; This layer can convert the classification result values within the real number range, and then evaluate the detection results of the model through the cross entropy loss function; Step 3: Divide the preprocessed network traffic data into a training set and a test set, input the training set and the test set into the model for training, and obtain a trained model; Step 4: Deploy the trained model to the edge node, collect the network traffic data in the node, use the preprocessing layer to process the traffic data, and then send it to the deployed model for real-time DDos prediction.
2. According to a DDos detection method in an edge computing environment based on deep learning according to claim 1, it is characterized in that: The filtering in step 1 specifically includes the following steps: filtering out redundant attributes, anonymous attributes, and socket attributes that cannot be used for classification.
3. According to a DDos detection method in an edge computing environment based on deep learning according to claim 1, it is characterized in that: Each column of network traffic data is normalized by L2 norm. After L2 norm normalization, the data is quantile mapped to transform the attribute value of each data so that the attribute value is mapped to a normal distribution. The formula for L2 normalization is as follows: In the formula n is the dimension of the feature, yes n Dimensional Features .
4. According to a DDos detection method in an edge computing environment based on deep learning according to claim 1, it is characterized in that: The attack label classification method of Dos attack performs subset summary statistics processing on DDos attack labels with strong similarity labels to obtain a highly targeted attack label classification method.
