Internet of Things malicious traffic data enhancement method based on VAE-WGAN

VAE-WGAN combined with GADF image conversion and MFFECA generation model, using soft pooling and coordinate attention mechanisms, the problem of sparse malicious data sets in the Internet of Things is solved, high-quality data is generated, and the recognition accuracy of the intrusion detection system is improved. Model performance.

CN118921189APending Publication Date: 2024-11-08CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202410918406.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The scarcity of malicious data sets of IoT traffic has led to limited performance improvement of intrusion detection systems, and there are privacy protection issues for sharing real network traffic data, and existing network traffic generation methods have insufficient information loss and high costs.

Method used

Using the Internet of Things malicious traffic data enhancement method based on VAE-WGAN, high-quality generation through GADF image conversion, MFFECA generation model and gamma correction algorithm, combined with soft pooled multi-scale feature fusion module and fusion coordinate attention mechanism residual module, to generate high-quality malicious data on IoT traffic reduces information loss and improves feature extraction capabilities.

Benefits of technology

Effectively expand the malicious traffic data set of the Internet of Things, improve the identification accuracy of the intrusion detection system, improve the generalization ability and performance of the model, and solve the problems of insufficient data and information loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921189A_ABST
    Figure CN118921189A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of network traffic data enhancement, and relates to an Internet of Things malicious traffic data enhancement method based on a generative adversarial network. The method comprises the following steps: S1) converting a one-dimensional (1D) time sequence trajectory into a two-dimensional (2D) GADF image; s2) adopting an MFFECA generation model to generate a GADF image; according to the Internet of Things traffic data enhancement method combining the MFFECA generation model, the GADF image conversion and the GADF image enhancement algorithm, the Internet of Things traffic data set is finally and effectively enhanced by generating high-quality Internet of Things malicious traffic, and the method has the advantages of being high in robustness and high in robustness. The problem of insufficient attack data in the field of Internet of Things is solved. And finally, performing classification on the expanded data set by using a CNN classifier so as to evaluate the effect of malicious composite traffic generation of the Internet of Things.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of network traffic data enhancement, and relates to a method for enhancing malicious traffic data of the Internet of Things based on VAE-WGAN. Background Art

[0002] The Internet of Things (IoT) expands the way humans perceive and interact with the world by connecting various sensors, actuators, and computing devices to the Internet. As an important field of independent innovation in China's information technology, the IoT has made significant breakthroughs in key technologies such as chip design, sensor technology, short-range communication, and big data processing, while also making great progress in comprehensive integration and application. However, the rapid development of the IoT has also brought new security challenges. Due to the general lack of security awareness among device manufacturers and end users, most smart devices have become targets of attack. Even if vulnerabilities are discovered, they are often not fixed in a timely manner because device manufacturers fail to optimize update strategies. Since 2016, IoT malware has continued to evolve and become more and more sophisticated.

[0003] To protect IoT networks, researchers are currently developing network intrusion detection systems (NIDS) designed specifically for IoT. Evaluating the ability of NIDS to detect intrusions requires the use of normal and malicious network traffic as training data. Malicious network traffic is used to evaluate the attack detection rate, while normal network traffic is used to evaluate the false alarm rate. However, the publicly available IoT malicious traffic datasets are very limited. To address this issue, one approach is to physically deploy real IoT devices to generate real network traffic data. However, this requires the inclusion of thousands of smart devices, which is costly. In addition, sharing real network traffic data may not be feasible for privacy protection reasons. Another solution is to synthesize IoT network traffic to enhance the data and train machine learning models using real and synthetic network traffic, thereby accelerating the convergence of the model and improving its performance.

[0004] With the development of artificial intelligence, researchers have begun to combine deep learning with traffic generation to achieve data enhancement. Generative adversarial networks (GANs), as a deep generative neural network, have shown great potential in learning complex data distributions (even to the packet level) and reproducing the same data distribution within the application domain. Due to its versatility and dynamic applicability, GANs are widely used in fields such as data generation and image editing. With the continuous increase and development of application scenarios, GANs have shown great potential in network traffic generation and scalable hybrid architectures. This architecture is able to integrate other supervised and unsupervised model component platforms while providing network training.

[0005] Although the above research on network traffic generation has achieved certain results, there are still various shortcomings. Therefore, designing a VAE-WGAN-based IoT malicious traffic data enhancement method is of great significance to improving the performance of IoT intrusion detection systems. Summary of the invention

[0006] In view of the above problems, the purpose of the present invention is to provide a method for data enhancement of malicious traffic of the Internet of Things based on VAE-WGAN. The present invention focuses on the situation that the real malicious traffic data set of the Internet of Things is scarce, and is mainly divided into three parts: data mode conversion part, image enhancement part and data generation part. First, the data mode conversion mainly uses the latest image data generation concept-GADF (Gramian Angle Difference Field) to convert 1D time series Internet of Things malicious network traffic data into 2D images. In addition, the image enhancement stage processes the initial GASF image by applying the power law expression for gamma correction to highlight the important pixel value distribution, thereby enhancing the quality and information content of the image. Finally, in the data generation stage, the MFFECA model is used to regenerate the GADF image. The model is a highly complex structure, and each component depends on each other. The generation system integrates the joint framework of VAE and WGAN, and introduces a soft pooling multi-scale feature fusion module and a residual module that integrates the coordinate attention mechanism. The comprehensive application of these innovative components not only optimizes the model performance, but also works together to generate high-quality data samples to achieve data enhancement, and gives the model a certain degree of generalization ability.

[0007] The traditional multi-scale feature fusion module SPP used in YOLOV5 uses the maximum pooling operation, which will lose most of the information in the image during pooling, reducing the performance of the entire network. In order to minimize the loss of information during the pooling operation, the present invention proposes a soft pooling multi-scale feature fusion module, introduces the idea of ​​soft pooling, and uses cascaded 3 5×5 pooling layers to replace the original parallel structure of different pooling sizes for feature extraction. Finally, the obtained feature maps are stacked (Concat) according to the channel dimension to achieve the effect of multi-scale feature fusion.

[0008] The load information between IoT traffic categories is strongly correlated with the field position, and the load information of traffic categories has different characteristics in different situations. After converting network traffic into GADF image data, its traffic information has different distributions in the horizontal and vertical directions. Therefore, the present invention proposes a residual module that integrates the coordinate attention mechanism to effectively extract the horizontal and vertical position information of the feature map, so that the model can accurately capture the position information to improve the traffic feature extraction capability.

[0009] Therefore, the present invention proposes an IoT traffic data enhancement method that combines the MFFECA generation model, GADF image conversion, and GADF image enhancement algorithm. This method generates high-quality IoT malicious traffic and ultimately effectively enhances the IoT traffic data set to solve the problem of insufficient attack data in the IoT field. Finally, a CNN classifier is used to classify the expanded data set to evaluate the effect of generating malicious synthetic traffic in the IoT.

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

[0011] A method for enhancing malicious traffic data of the Internet of Things based on VAE-WGAN, the method comprising the following steps:

[0012] Step 1) converting the one-dimensional (1D) time series trajectory into a two-dimensional (2D) GADF image;

[0013] Step 2) Generate GADF image using MFFECA generation model;

[0014] Step 3) Use a binary classifier to conduct classification experiments on the generated dataset.

[0015] Further, the step 1) specifically comprises the following steps:

[0016] Step 11) Preprocess the data and extract selected features from all malicious IoT traffic PCAP (Packet Capture) files to create a 1D signal. Since the original traffic length of IoT malicious traffic is variable, the traffic length needs to be kept at a fixed size, i.e., 300 packets. If the length is less than 300 samples, it is padded with 0; otherwise, the first 300 packets are truncated. After padding the signal with 0 or truncating 300 samples according to this mechanism, these 1D signals of all datasets are normalized to [0,1], which is the range required to reconstruct the 1D signal from the 2D image.

[0017] Step 12) GADF conversion: convert the preprocessed 1D signal into a 2D GADF image according to the GADF mechanism while retaining the relevant network traffic features. n (n = number of samples) represents the normalized one-dimensional flow. First, convert X to polar coordinates. The conversion formula is:

[0018] θ i =arccos(x i ),x i ∈X

[0019]

[0020] Among them, ti is the timestamp of the ith sample, and C is the constant factor of the regularization radius. Then, the polar coordinates are used to create the Gramian matrix (a matrix whose elements are the cosines of the sum of the angles of the time series in the polar coordinate system), which is the basis of GAF (a representation system for time series in polar coordinates).

[0021] The GADF field is created to eliminate the dependence on the radius in the Gramian matrix. The GADF image is obtained by trigonometric calculation between each sample point. The calculation formula is:

[0022]

[0023] Where I represents a row vector [1,1,…,1] whose elements are all 1, X′ is the transpose of X, and i,j=1,2,3…n.

[0024] Step 13) GADF image post-processing, in order to enhance the contrast of the image and highlight important features and reduce the influence of noise, gamma correction is applied to the initial GADF image using a power law expression. The important pixel value distribution is highlighted while performing image enhancement. The values ​​in the GADF image are then rescaled to [0,1] to avoid obtaining negative powers. The correction formula is:

[0025] GADF=A*GADF γ

[0026] Among them, A is a constant and γ is the power value used to control the brightness.

[0027] Further, the step 2) specifically includes the following steps:

[0028] Step 21) MFFECA (VAE-WGAN-Based Generative Model with Multi-scale Feature Fusion and Enhanced Coordinate Attention Mechanism) based on VAE-WGAN is mainly composed of an improved beta-VAE combined with WGAN. The traditional autoencoder consists of an encoder and a decoder. The encoder compresses the input to obtain its potential representation, and the decoder reconstructs the original input from its potential representation. Beta-VAE improves the loss function based on the traditional VAE, adding a hyperparameter β to the second term of the loss function, the KL divergence term. Therefore, the purpose of the training process is to minimize the reconstruction error and KL divergence between the input and output. The loss function calculation formula of the autoencoder is:

[0029] VAE loss =MSE+β*KLD

[0030] =∑||fake_x-x|| 2 -0.5*β*∑(1+log(var x )-mean x 2 -var x )

[0031] Among them, MSE represents the reconstruction error, that is, the mean square error between the reconstructed image fake_x and the original image x; KLD divergence is used to measure the difference between the distribution of x and the standard normal distribution.

[0032] The loss function calculation formula of the WGAN discriminant network (D network) is:

[0033] D loss =W distance +Gradient_penalty

[0034] =fake_x.mean()-x.mean()+λ·((||gred||2-1) 2 ).mean()

[0035] The discriminator loss function consists of two parts, where W distance Represents the difference between the average output of fake data and real data in the discriminator; Gradient_penalty represents the gradient penalty term that constrains the gradient size of the interpolated sample; λ is a hyperparameter.

[0036] The main purpose of MFFECA model training is to complete the update of the D network and VAE decoding network. The process is: first evaluate the real image and use it to update the discriminator network; by sampling a set of random latent variables, use the VAE decoder to learn the latent variables and finally generate false images. These false images are used to calculate the loss between the real image and the false image; finally update the VAE decoder.

[0037] Step 22) Use the multi-scale feature fusion module to learn feature information of different semantics. This module first introduces the idea of ​​soft pooling. Feature extraction is performed by cascading three 5×5 pooling layers, and finally the obtained feature maps are stacked according to the channel dimension to achieve the effect of multi-scale feature fusion. As a new pooling method, soft pooling can avoid the information loss caused by downsampling as much as possible while maintaining the original pooling function. Soft pooling uses the natural exponent e to adjust the region The specific feature value calculation weight parameter is in the form of Softmax function. Here, the natural exponent e can ensure that larger activation values ​​will have a greater impact on the output. The weight calculation formula is:

[0038]

[0039] In the above formula, w i represents the weight of the ith region; P i , P j Indicates the activation value of the current area; Represents the pooling area.

[0040] Soft pooling through w i To measure the importance of the activation value of the pooled area, at the same time, because soft pooling is differentiable, while ordinary pooling does not have this feature, the eigenvalues ​​will at least have a preset minimum gradient during back propagation. The final pooling result is obtained by weighting the weight information of the corresponding area, and its calculation formula is:

[0041]

[0042] in, This is the final soft pooling output.

[0043] Since the weight coefficient w in soft pooling i It is used as a nonlinear transformation combined with the corresponding activation value. In the feature map, the area with higher activation value will be more dominant. At the same time, since all activation values ​​in the pooled area contribute to the final output, and the higher activation value is dominant, soft pooling can overcome the shortcomings of maximum pooling and average pooling, and at the same time can take advantage of the favorable properties of both, thereby alleviating the information loss problem caused by the general pooling method.

[0044] Step 23) Use an adaptive coordinate attention mechanism to learn the position information of the flow graph in the horizontal and vertical directions. The traditional channel attention mechanism improves classification accuracy by assigning weights to channels of different importance. However, the channel features of the GADF flow image are not prominent, and there is no strong correlation between adjacent channels. Therefore, the channel attention mechanism is not suitable for flow image classification. The reference coordinate attention mechanism of the present invention embeds the spatial scale to obtain spatial feature information in the horizontal direction X and the vertical direction Y, so that our model can accurately capture the position information to improve the flow feature extraction capability. In order to adaptively select features in different directions, we introduce a weighting factor to improve the coordinate attention mechanism and propose an adaptive coordinate attention mechanism. First, we decompose the global average pooling to generate one-dimensional perceptual attention features on X and Y:

[0045]

[0046]

[0047] Where C is the number of channels, H and W are the height and width of the input features, Z is the output, x cIt is the two-dimensional feature set of the c-th channel, i and j represent the coordinate output features, and w and h are the convolution kernel weights of the c-th channel.

[0048] Secondly, the present invention connects the one-dimensional features of X and Y and sends them to the transformation function F1 to generate an intermediate feature f containing horizontal and vertical spatial information:

[0049]

[0050] Among them, [,] is the concatenation operation, f∈R c / r×(H+W) , is a nonlinear activation function and r is a hyperparameter that controls the module size.

[0051] Third, the present invention decomposes f into two separate tensors f h ∈R c / r×H and f w ∈R c / r×W , and then use the convolution transformation function F h and F w f h and f w Transformed into a tensor g with the same number of input feature channels h and g w :

[0052] g h =σ(F h (f h ))g h =δ(F h (f h ))

[0053] g w =σ(F w (f w ))g w =δ(F w (f w ))

[0054] Among them, δ is the sigmoid function.

[0055] Finally, we multiply the input feature by the horizontal weight and the vertical weight to get the feature of the coordinate attention output:

[0056]

[0057] Step 24) Use the residual module of the fusion attention mechanism for training. Due to the complex structure of the model of the present invention, the network structure of the entire encoder, decoder, and discriminator is connected using residual modules, and residual modules are used to alleviate the gradient vanishing problem in deep neural networks. In addition, the attention mechanism can perform effective information screening and weighted processing, dynamically adjust the weight of each part of the information, focus on the key parts of the input data, strengthen the model's capture of important features, and improve the flexibility and adaptability of the model. The above-mentioned adaptive coordinate attention mechanism is embedded in the residual module of the encoder to improve the feature extraction capability of the model.

[0058] Further, the step 3) specifically comprises the following steps:

[0059] Step 31) Use binary classification as anomaly detection task, randomly select categories from the original GADF image set and the synthetic GADF image set. Label them as normal and malicious, and use an unquantified amount of real samples for each category for training, while imitating the actual unbalanced dataset. Only undersample the original data, and then add more synthetic data to eliminate the imbalance between normal and malicious categories. Use the classification results on the balanced dataset to verify the effectiveness of the above data generation method.

[0060] Beneficial effects:

[0061] 1. Use the GADF (Gramian Angle Difference Field) method to convert 1D time series network traffic data into 2D images. The temporal correlation between sample points in the one-dimensional signal can be easily encoded into an image, thereby maintaining the continuity and integrity of the signal.

[0062] 2. The MFFECA generative model is used to generate GADF images, and the improved autoencoder is combined with Wasserstein GAN (WGAN) to generate malicious IoT traffic data. This model can generate synthetic traffic data similar to the original traffic, achieving an enhancement effect on malicious IoT traffic data.

[0063] 3. The IoT malicious network traffic data set used to train intrusion detection models has been expanded, and the accuracy of the IoT malicious network traffic identification task can be effectively improved, highlighting the practicality of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0065] Figure 1 The overall flow chart for the data conversion processing part and the MFFECA-based model generation

[0066] Figure 2 Generate model schematic for MFFECA DETAILED DESCRIPTION

[0067] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0068] The present invention proposes a method for generating malicious traffic of the Internet of Things based on VAE-WGAN. Figure 1 Shown is the overall flow chart of the data conversion processing part and the MFFECA-based model generation. Figure 2 Generate a model schematic for MFFECA, which aims to generate high-quality malicious IoT traffic. Figure 1 As shown in the overall flow chart of the intrusion detection model, the method includes the following steps:

[0069] Step 1: Use the IoT botnet dataset MedBIoT, which covers the deployment of three well-known botnet malware: BashLite, Mirai, and Torii. It contains network data between all endpoints and servers during the infection, propagation, and communication with the command and control (C&C) server of the botnet. In order to maintain the continuity and integrity of the traffic signal, the GADF transformation is used to convert the actual one-dimensional traffic data into a two-dimensional GADF image. After normalizing these 1D signals of the original IoT malicious to [0,1], the 1D signals are converted to polar coordinates, and then the polar coordinates are used to create a Gramian matrix. The GADF field is created to eliminate the dependence on the radius in the Gramian matrix, and the gamma correction is applied to the initial GADF image using a power law expression, and then the values ​​in the GADF image are rescaled to [0,1].

[0070] Step 2: The GADF images converted from the original dataset are input into the MFFECA model for further training to generate the corresponding category of IoT malicious traffic data.

[0071] Step 3: Use a binary classifier to train on the original GADF image set and the synthetic GADF image training set, and use the classification results on the balanced dataset to verify the effectiveness of the above generation method.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A VAE-WGAN-based IoT malicious traffic data enhancement method, characterized by: The method comprises the following steps: S1) Convert one-dimensional (1D) time series trajectory into two-dimensional (2D) GADF image; S2) Generate GADF image using MFFECA generation model; S3) Use a binary classifier to conduct classification experiments on the generated dataset.

2. The method for enhancing IoT malicious traffic data based on VAE-WGAN according to claim 1 is characterized in that: In step S1, GADF conversion includes the following steps: Step S11) preprocesses the data and extracts selected features from all malicious IoT traffic PCAP (PacketCapture) data files to create a one-dimensional signal. Since the original traffic length of IoT malicious traffic is variable, the traffic length needs to be kept at a fixed size, i.e., 300 packets. If the length is less than 300 samples, it is padded with 0; otherwise, the first 300 packets are truncated. After padding the signal with 0 or truncating 300 samples according to this mechanism, these 1D signals of all data sets are normalized to [0,1], which is the range required to reconstruct the 1D signal from the 2D image. Step S12) GADF conversion: convert the preprocessed 1D signal into a 2D GADF image according to the GADF mechanism while retaining the relevant network traffic features. n (n = number of samples) represents the normalized one-dimensional flow. First, convert X to polar coordinates. The conversion formula is: i i =arccos(x i ),x i ∈X Among them, t i is the timestamp of the ith sample, and C is the constant factor of the regularization radius. Then, the polar coordinates are used to create the Gramian matrix (a matrix whose elements are the cosines of the sum of the angles of the time series in the polar coordinate system), which is the basis of GAF (a representation system for time series in polar coordinates). The GADF field is created to eliminate the dependence on the radius in the Gramian matrix. The GADF image is obtained by trigonometric calculation between each sample point. The calculation formula is: Where I represents a row vector [1,1,…,1] whose elements are all 1, X′ is the transpose of X, and i,j=1,2,3…n. Step S13) GADF image post-processing: In order to enhance the contrast of the image and highlight important features and reduce the influence of noise, gamma correction is applied to the initial GADF image using a power law expression. The important pixel value distribution is highlighted while performing image enhancement. The values ​​in the GADF image are then rescaled to [0,1] to avoid obtaining negative powers. The correction formula is: GADF=A*GADF γ Among them, A is a constant and γ is the power value used to control the brightness.

3. The method for enhancing IoT malicious traffic data based on VAE-WGAN according to claim 1 is characterized in that: In step S2, generating the GASF image includes the following steps: Step S21) The VAE-WGAN-Based Generative Model with Multi-scale Feature Fusion and Enhanced Coordinate Attention Mechanism (MFFECA) is mainly composed of an improved beta-VAE combined with WGAN. The traditional autoencoder consists of an encoder and a decoder. The encoder compresses the input to obtain its potential representation, and the decoder reconstructs the original input from its potential representation. Beta-VAE improves the loss function based on the traditional VAE, and adds a hyperparameter β to the second KL divergence term of the loss function. Therefore, the purpose of the training process is to minimize the reconstruction error and KL divergence between the input and output. The loss function calculation formula of the autoencoder is: VAE loss =MSE+β*KLD =∑fakex-x 2 -0.5*β*∑(1+log(var x )-mean x 2 -our x ) Among them, MSE represents the reconstruction error, that is, the mean square error between the reconstructed image fakex and the original image x; KLD divergence is used to measure the difference between the distribution of x and the standard normal distribution. The loss function calculation formula of the WGAN discriminant network (D network) is: D loss =W distance +Gradientpenalty =fakex.mean()-x.mean()+λ·((||gred||2-1) 2 ).mean() The discriminator loss function consists of two parts, where W distance Represents the difference between the average output of fake data and real data in the discriminator; Gradientpenalty represents the gradient penalty term that constrains the gradient size of the interpolated sample; λ is a hyperparameter. The main purpose of MFFECA model training is to complete the update of the D network and VAE decoding network. The process is: first evaluate the real image and use it to update the discriminator network; by sampling a set of random latent variables, use the VAE decoder to learn the latent variables and finally generate false images. These false images are used to calculate the loss between the real image and the false image; finally update the VAE decoder. Step S22) Use a multi-scale feature fusion module to learn feature information of different semantics. The module first introduces the idea of ​​soft pooling. Feature extraction is performed by cascading three 5×5 pooling layers, and finally the obtained feature maps are stacked according to the channel dimension to achieve the effect of multi-scale feature fusion. As a new pooling method, soft pooling can avoid information loss caused by downsampling as much as possible while maintaining the original pooling function. Soft pooling uses the natural exponent e to calculate the weight parameters for the specific feature values ​​in region R, that is, the Softmax function form. Here, based on the natural exponent e, it can ensure that larger activation values ​​will have a greater impact on the output. The weight calculation formula is: In the above formula, w i represents the weight of the ith region; P i , P j Indicates the activation value of the current area; Represents the pooling area. Soft pooling through w i To measure the importance of the activation value of the pooled area, at the same time, because soft pooling is differentiable, while ordinary pooling does not have this feature, the eigenvalues ​​will at least have a preset minimum gradient during back propagation. The final pooling result is obtained by weighting the weight information of the corresponding area, and its calculation formula is: in, This is the final soft pooling output. Since the weight coefficient w in soft pooling i It is used as a nonlinear transformation combined with the corresponding activation value. In the feature map, the area with higher activation value will be more dominant. At the same time, since all activation values ​​in the pooled area contribute to the final output, and the higher activation value is dominant, soft pooling can overcome the shortcomings of maximum pooling and average pooling, and at the same time can take advantage of the favorable properties of both, thereby alleviating the information loss problem caused by the general pooling method. Step S23) uses an adaptive coordinate attention mechanism to learn the horizontal and vertical position information of the flow graph. The traditional channel attention mechanism improves classification accuracy by assigning weights to channels of different importance. However, the channel features of GADF traffic images are not prominent, and there is no strong correlation between adjacent channels. Therefore, the channel attention mechanism is not suitable for traffic image classification. The reference coordinate attention mechanism of this invention embeds the spatial scale to obtain spatial feature information in the horizontal direction X and the vertical direction Y, so that our model can accurately capture location information to improve the traffic feature extraction capability. In order to adaptively select features in different directions, we introduce a weighting factor to improve the coordinate attention mechanism and propose an adaptive coordinate attention mechanism. First, we decompose the global average pooling to generate one-dimensional perceptual attention features on X and Y: Where C is the number of channels, H and W are the height and width of the input features, Z is the output, x c It is the two-dimensional feature set of the c-th channel, i and j represent the coordinate output features, and w and h are the convolution kernel weights of the c-th channel. Secondly, the present invention connects the one-dimensional features of X and Y and sends them to the transformation function F1 to generate an intermediate feature f containing horizontal and vertical spatial information: Among them, [,] is the concatenation operation, f∈R c / r×(H+W) , is a nonlinear activation function and r is a hyperparameter that controls the module size. Third, the present invention decomposes f into two separate tensors f h ∈R c / r×H and f w ∈R c / r×W , and then use the convolution transformation function F h and F w f h and f w Transformed into a tensor g with the same number of input feature channels h and g w : g h =σ(F h (f h ))g h =δ(F h (f h )) g w =σ(F w (f w ))g w =δ(F w (f w )) Among them, δ is the sigmoid function. Finally, we multiply the input feature by the horizontal weight and the vertical weight to get the feature of the coordinate attention output: Step S24) Use the residual module of the fusion attention mechanism for training. Due to the complex structure of the model of the present invention, the entire encoder, decoder, and discriminator network structure are connected using residual modules, and residual modules are used to alleviate the gradient vanishing problem in deep neural networks. In addition, the attention mechanism can effectively filter and weight information, dynamically adjust the weight of each part of information, focus on the key parts of the input data, strengthen the model's capture of important features, and improve the flexibility and adaptability of the model. The above-mentioned adaptive coordinate attention mechanism is embedded in the residual module of the encoder to improve the model's feature extraction ability.

4. The method for enhancing IoT malicious traffic data based on VAE-WGAN according to claim 1 is characterized in that: In step S3, performing a classification experiment on the generated data set includes the following steps: Step S31) Use binary classification as anomaly detection task, randomly select categories from the original GADF image set and the synthetic GADF image set. Label them as normal and malicious, and use an unquantified amount of real samples for each category for training, while imitating the actual unbalanced dataset. Only the original data is undersampled, and then more synthetic data is added to eliminate the imbalance between normal and malicious categories. Use the classification results on the balanced dataset to verify the effectiveness of the above data generation method.

Citation Information

Patent Citations

  • Text abstract generation method based on key information selection and variational potential variable modeling

    CN111708877A

  • Rolling bearing fault identification method based on GAF-CNN-BiGRU network

    CN112179654A

  • Network intrusion detection method based on improved VAEGAN and deep neural network

    CN116405233A

  • Pedestrian re-identification method based on coordinate attention and soft pooling

    CN116631061A

  • Fusion feature and adaptive weight-based Internet of Things traffic classification method

    CN117473415A

Cited By

  • Method and device for detecting unknown attack of Internet of Things and medium

    CN120415924A