Unmanned aerial vehicle network intrusion detection method based on frequency domain disturbance and physical constraint

CN122554847APending Publication Date: 2026-08-11XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,现有对抗样本生成方法通常以诱导检测模型产生错误判别为主要目标,未充分考虑无人机通信流量中的物理约束关系,导致生成样本可能偏离真实通信规律,影响后续模型增强训练的有效性

Benefits of technology

[0014]本发明的有益效果是,基于频域扰动与物理约束的无人机网络入侵检测方法,为增强对抗样本的物理合理性,本发明引入报文大小、时间间隔和传输速率之间的通信物理约束。为提高对抗样本生成的隐蔽性和有效性,本发明利用频域扰动机制对不同频段的扰动进行调制。此外,本发明构建轻量级一维卷积入侵检测模型,降低了检测模型的参数规模和计算复杂度。并结合对抗样本进行增强训练,提高无人机网络入侵检测的鲁棒性和安全防护能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122554847A_ABST
    Figure CN122554847A_ABST
Patent Text Reader

Abstract

This invention discloses a UAV network intrusion detection method based on frequency domain perturbation and physical constraints. First, a UAV communication network traffic dataset is acquired, and the original traffic samples are preprocessed to obtain UAV network traffic feature sequences. Then, these feature sequences are input into a lightweight one-dimensional convolutional intrusion detection model for initial training, resulting in an initial intrusion detection model capable of distinguishing between normal and attack traffic. Using this initial intrusion detection model, adversarial examples that satisfy the physical laws of UAV communication are generated. Finally, the unperturbed UAV network traffic feature sequences are mixed with the adversarial examples to enhance the initial intrusion detection model, resulting in an enhanced intrusion detection model that enables intrusion detection of UAV network traffic. This invention helps improve the robustness and security protection capabilities of the detection model under adversarial perturbation environments, providing technical support for network security protection of resource-constrained UAV platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of UAV network security and intrusion detection technology, specifically relating to a UAV network intrusion detection method based on frequency domain perturbation and physical constraints. Background Technology

[0002] Intrusion detection of UAV communication network traffic helps to quickly identify abnormal behaviors such as network attacks, ensuring communication security and operational stability during UAV missions. However, existing adversarial example generation methods typically aim to induce incorrect judgments in detection models, failing to fully consider the physical constraints in UAV communication traffic. This can lead to generated samples deviating from real communication patterns, affecting the effectiveness of subsequent model enhancement training. Furthermore, existing perturbation generation processes usually modify the original traffic feature values ​​item by item without modeling and modulating the distribution characteristics of perturbations in different frequency bands, impacting the stealth and effectiveness of adversarial examples. In addition, some UAV network intrusion detection methods rely on complex deep neural networks, resulting in high parameter scale and computational overhead, making them unsuitable for the resource-constrained environment of UAV onboard platforms. Therefore, this invention proposes a UAV network intrusion detection method based on frequency domain perturbation and physical constraints. To improve the physical plausibility of adversarial examples, this invention introduces communication physical constraints between message size, time interval, and transmission rate. To optimize perturbation distribution, this invention utilizes a frequency domain perturbation mechanism to modulate perturbations in different frequency bands. To reduce the number of network model parameters, this invention constructs a lightweight one-dimensional convolutional intrusion detection model. It reduces the parameter size of convolutional layers through depthwise separable convolution and enhances the ability to express traffic features by combining residual feature reuse structures. Summary of the Invention

[0003] The purpose of this invention is to provide a method for detecting unmanned aerial vehicle (UAV) network intrusions based on frequency domain perturbation and physical constraints, which helps to improve the robustness and security protection capabilities of the detection model in the face of perturbation environments and provides technical support for the network security protection of resource-constrained UAV platforms.

[0004] The technical solution adopted in this invention is a UAV network intrusion detection method based on frequency domain perturbation and physical constraints, which is implemented according to the following steps: Step 1: Obtain the UAV communication network traffic dataset, preprocess the original traffic samples, and obtain the UAV network traffic feature sequence; Step 2: Input the UAV network traffic feature sequence into the lightweight one-dimensional convolutional intrusion detection model for initial training to obtain an initial intrusion detection model that can distinguish between normal traffic and attack traffic. Step 3: Construct feature importance weight vectors based on mutual information, and use the initial intrusion detection model, combined with frequency domain perturbation mechanism and physical constraints, to generate adversarial samples that satisfy the physical laws of UAV communication. Step 4: Mix the unperturbed UAV network traffic feature sequence with adversarial examples to enhance the initial intrusion detection model, thereby obtaining the enhanced intrusion detection model and realizing intrusion detection of UAV network traffic.

[0005] The invention is further characterized in that, Step 1 is implemented in the following steps: Step 1.1: Obtain the UAV communication network traffic dataset The original category labels in the UAV communication network traffic dataset include normal traffic, black hole attack, wormhole attack, flood attack, and Sybil attack. The original category labels are binarized, and samples with the original category label of normal traffic are marked as 0 as normal traffic samples, and samples with the original category label of black hole attack, wormhole attack, flood attack, or Sybil attack are marked as 1 as attack traffic samples. Step 1.2: Divide the UAV communication network traffic dataset obtained in Step 1.1 into a training set and a test set, with a ratio of 8:2. Impute the missing values ​​in the UAV network traffic samples. For the j-th feature, use the mean of the non-missing samples of the corresponding feature in the training set to impute the missing values ​​in that feature. The impute method is as shown in Formula (1): (1) in, Indicates the first The first sample 1 eigenvalue, Indicates the first training set The mean of each feature, Indicates the first training set A set of indices for samples with non-missing features. express The number of samples in the sample; Step 1.3: Perform outlier processing on the samples obtained in Step 1.2. Identify feature values ​​that deviate from the normal distribution range according to the three sigma criterion. For features related to message size, time interval, and transmission rate, determine the outlier judgment interval based on the quantile statistics of the corresponding features in the training set. Only samples that exceed the outlier judgment interval are treated as outlier samples to avoid removing samples with communication physical significance. Step 1.4: Normalize the UAV network traffic characteristics processed in Step 1.3, mapping features with different dimensions and value ranges to a unified scale. The normalization method is as shown in Formula (2): (2) in, Represents the normalized i-th 1 eigenvalue, and They represent the first The minimum and maximum values ​​of the i-th feature will be used to determine the i-th feature. The normalized features of each sample are combined in the original feature order to obtain the final sample. A sequence of network traffic characteristics of drones ,in, Indicates the feature dimension.

[0006] Step 2 is implemented in the following steps: Step 2.1: Construct a lightweight one-dimensional convolutional intrusion detection model, which includes an input layer, a depthwise separable convolutional feature extraction module, a residual feature reuse module, an adaptive pooling layer, and a fully connected classification layer connected in sequence. Step 2.2: Input the UAV network traffic feature sequence obtained in Step 1.4 into the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1, and obtain the convolutional features after processing by depth-separable convolutional layers; Step 2.3: Input the convolutional features obtained in Step 2.2 into the residual feature reuse block, and obtain the residual enhanced features after fusion with the residual branch transformation and identity mapping; Step 2.4: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer and the fully connected classification layer for classification training, and construct a loss function to iteratively optimize the model parameters to obtain the initial intrusion detection model; Step 2.2 is implemented according to the following steps: Step 2.2.1: Represent the UAV network traffic feature sequence obtained in Step 1.4 as a single-channel one-dimensional input sequence, as shown in formula (3): (3) in, Indicates the first A normalized sequence of drone network traffic characteristics. Indicates the dimension of the input features; Step 2.2.2: Input the single-channel one-dimensional input sequence obtained in step 2.2.1 into the depth convolution unit in the depthwise separable convolution feature extraction module, and extract local correlation features independently on each input channel to obtain depth convolution features. The depth convolution process is as shown in formula (4): (4) in, Indicates the first Features of each input channel Indicates the first Each channel corresponds to a depthwise convolutional kernel. Represents depthwise convolutional features; Step 2.2.3: Input the depthwise convolutional features obtained in Step 2.2.2 into the point convolutional unit in the depthwise separable convolutional feature extraction module, and perform information fusion in the channel dimension to obtain point convolutional features. The point convolution process is as shown in formula (5): (5) in, Indicates the first m The point convolution result corresponding to each output channel Indicates the number of output channels. Indicates the parameters of the point convolution kernel; Step 2.2.4: Perform batch normalization and nonlinear mapping on the point convolution features obtained in Step 2.2.3 to obtain convolution features; In step 2.3, the convolutional features obtained in step 2.2.4 are input into the residual feature reuse module. The residual feature reuse module includes a residual branch and an identity mapping branch. The residual branch performs depthwise separable convolution, batch normalization, and nonlinear mapping on the convolutional features to obtain transformed features. The identity mapping branch retains the input convolutional features and fuses the transformed features with the input convolutional features to obtain residual enhancement features. The expression of the residual enhancement features is as shown in formula (6): (6) Where H represents the input feature of the residual feature reuse block, R(H) represents a depthwise separable convolution operation, and R(H) represents a residual enhancement feature.

[0007] Step 2.4 is implemented according to the following steps: Step 2.4.1: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to compress the residual enhancement features into a fixed-dimensional global feature representation; Step 2.4.2: Input the global feature representation obtained in Step 2.4.1 into the fully connected classification layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to obtain the predicted probability that the UAV network traffic sample belongs to normal traffic and attack traffic. Step 2.4.3: Calculate the cross-entropy loss based on the predicted probability obtained in Step 2.4.2 and the binarized category label obtained in Step 1.1, and update the parameters of the lightweight one-dimensional convolutional intrusion detection model through backpropagation. After training is completed, the lightweight one-dimensional convolutional intrusion detection model that has completed the initial training is used as the initial intrusion detection model.

[0008] Step 3 is implemented in the following steps: Step 3.1: Calculate the importance of each traffic feature based on mutual information and normalize it to construct a feature importance weight vector. This is used to limit the perturbation amplitude on key discriminative features in subsequent perturbation constraints; Step 3.2: Construct an adversarial example generation module, and set up the generator, frequency domain perturbation unit, physical constraint unit and discriminator in sequence, and connect it to the initial intrusion detection model obtained in step 2.4; Step 3.3: Input the UAV network traffic feature sequence obtained in Step 1.4 into the generator, and modulate the generated perturbation through the frequency domain perturbation unit in Step 3.2 to obtain the frequency domain modulated perturbation; Step 3.4: Superimpose the frequency-domain modulated perturbation obtained in Step 3.3 onto the UAV network traffic feature sequence obtained in Step 1.4, and perform constraint correction through the physical constraint unit in Step 3.2 to obtain the adversarial sample to be optimized. Step 3.5: Input the adversarial samples to be optimized obtained in Step 3.4 into the discriminator in Step 3.2 and the initial intrusion detection model obtained in Step 2.4 respectively. Combine the loss and constraints to iteratively optimize the generator parameters to obtain the optimized generator. Then, use the optimized generator to generate adversarial samples that satisfy the physical laws of UAV communication.

[0009] Step 3.3 is implemented in accordance with the following steps: Step 3.3.1: Input the UAV network traffic feature sequence obtained in step 1.4 into the generator, and output the corresponding initial perturbation, expressed as in formula (7): (7) in, Represents a generator. Indicates generator parameters, Indicates the first A sequence of network traffic characteristics of unmanned aerial vehicles (UAVs). Indicates the first The initial perturbation corresponding to each sample; Step 3.3.2: Perform a Fast Fourier Transform on the initial perturbation obtained in Step 3.3.1 to transform the initial perturbation from the original feature space to the frequency domain space, as shown in Equation (8): (8) in, This represents the first half of the initial disturbance. Represents the Fast Fourier Transform. Indicates frequency domain perturbation; Step 3.3.3: Perform differentiated frequency band modulation on the frequency domain perturbation obtained in step 3.3.2, and perform inverse fast Fourier transform to obtain the frequency domain modulated perturbation. The differentiated frequency band modulation is shown in formula (9): (9) in, This indicates a spectrum index. , and These represent the low-frequency, mid-frequency, and high-frequency modulation coefficients, respectively. This represents the frequency domain disturbance after modulation.

[0010] Step 3.4 is implemented in accordance with the following steps: Step 3.4.1: Superimpose the frequency-domain modulated perturbation obtained in step 3.3 onto the UAV network traffic feature sequence obtained in step 1.4 to obtain the sample to be constrained; Step 3.4.2: Extract message size, time interval, and transmission rate related features from the sample to be constrained obtained in Step 3.4.1, and calculate the perturbed transmission rate, as shown in formula (10): (10) in, Indicates the size of the message after the disturbance. Indicates the time interval after the disturbance. Indicates the minimum time interval. Indicates the transmission rate after the disturbance; Step 3.4.3: When the relevant features in step 3.4.2 do not satisfy the communication physical relationship, that is, when the transmission rate exceeds the upper limit of the rate, the message size-related features in the sample to be constrained are constrained and corrected to obtain the adversarial sample to be optimized. The correction method is as shown in formula (11): (11) in, Indicates the upper bound of the transmission rate. To prevent extremely small constants with a denominator of zero, Indicates the first The message size feature values ​​before and after constraint correction in a sample to be constrained.

[0011] Step 3.5 shall be implemented in accordance with the following steps: Step 3.5.1: Input the adversarial sample to be optimized obtained in step 3.4 and the unsuperimposed perturbation UAV network traffic feature sequence obtained in step 1.4 into the discriminator so that the adversarial sample to be optimized approximates the real sample in distribution; Step 3.5.2: Input the adversarial sample to be optimized obtained in Step 3.4 into the initial intrusion detection model whose parameters are not updated in Step 2.4, and calculate the classification loss in the adversarial generation process; Step 3.5.3: Based on the feature importance weight vector obtained in Step 3.1 Constructing weighted perturbation constraint loss This limits the amplitude of perturbations on highly important features, and the weighted perturbation constraint loss is shown in formula (12): (12) in, This indicates element-wise multiplication, where perturbations on highly important features are preferentially suppressed; Step 3.5.4: Construct the generator optimization objective based on the discriminator constraint, classification loss, weighted perturbation constraint, and physical constraint. The generator optimization objective is shown in formula (13): (13) in, This represents the total loss of the generator. This represents the discriminator constraint loss. Represents classification loss. This represents the weighted perturbation constraint loss. Represents physical constraint loss. , , , This represents the weighting coefficient of each loss term.

[0012] Step 3.5.5: Based on the generator optimization objective constructed in Step 3.5.4, the generator parameters are iteratively updated and optimized. The UAV network traffic feature sequence from Step 1.4 is input into the optimized generator to obtain adversarial samples that satisfy the physical laws of UAV communication.

[0013] Step 4 is implemented in the following steps: The unperturbed UAV network traffic feature sequence obtained in step 1.4 is mixed with the adversarial sample obtained in step 3 to obtain an enhanced training set, which is then input into the initial intrusion detection model obtained in step 2 to enhance the initial intrusion detection model and obtain an enhanced intrusion detection model for intrusion detection of UAV network traffic.

[0014] The beneficial effects of this invention are as follows: The UAV network intrusion detection method based on frequency domain perturbation and physical constraints introduces communication physical constraints between message size, time interval, and transmission rate to enhance the physical plausibility of adversarial examples. To improve the concealment and effectiveness of adversarial example generation, this invention utilizes a frequency domain perturbation mechanism to modulate perturbations in different frequency bands. Furthermore, this invention constructs a lightweight one-dimensional convolutional intrusion detection model, reducing the parameter scale and computational complexity of the detection model. Combined with adversarial examples for enhanced training, this improves the robustness and security protection capabilities of UAV network intrusion detection. Attached Figure Description

[0015] Figure 1 This is a general framework diagram of the UAV network intrusion detection method based on frequency domain perturbation and physical constraints of the present invention; Figure 2 This is a structural diagram of a lightweight one-dimensional convolutional intrusion detection model for the UAV network intrusion detection method based on frequency domain perturbation and physical constraints of the present invention. Figure 3 is a comparison of the adversarial sample quality and attack effect of the UAV network intrusion detection method based on frequency domain perturbation and physical constraints in this invention under different adversarial attack methods on the example UAV communication network traffic dataset. Figure 3(a) is a comparison of the L1 norm of adversarial samples under different adversarial attack methods in the example UAV communication network traffic dataset based on frequency domain perturbation and physical constraints of the present invention. Figure 3(b) is a comparison of the L2 norm of adversarial samples under different adversarial attack methods in the example UAV communication network traffic dataset based on frequency domain perturbation and physical constraints of the present invention. Figure 3(c) is a comparison of the signal-to-noise ratio (SNR) of the UAV network intrusion detection method based on frequency domain perturbation and physical constraints in the example UAV communication network traffic dataset under different adversarial attack methods. Figure 3(d) is a comparison of the attack success rate (ASR) of the UAV network intrusion detection method based on frequency domain perturbation and physical constraints in the example UAV communication network traffic dataset under different adversarial attack methods. Figure 4(a) is a comparison of the confusion matrix of the UAV network intrusion detection method based on frequency domain perturbation and physical constraints before enhancement training on the example UAV communication network traffic dataset. Figure 4(b) is a comparison of the confusion matrix of the UAV network intrusion detection method based on frequency domain perturbation and physical constraints of the present invention after enhancement training on the example UAV communication network traffic dataset. Detailed Implementation

[0016] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0017] Example 1 This invention relates to a UAV network intrusion detection method based on frequency domain perturbation and physical constraints, combined with... Figure 1 The specific steps are as follows: Step 1: Obtain the UAV communication network traffic dataset, preprocess the original traffic samples, and obtain the UAV network traffic feature sequence; Step 2: Input the UAV network traffic feature sequence into the lightweight one-dimensional convolutional intrusion detection model for initial training to obtain an initial intrusion detection model that can distinguish between normal traffic and attack traffic. Step 3: Construct feature importance weight vectors based on mutual information, and use the initial intrusion detection model, combined with frequency domain perturbation mechanism and physical constraints, to generate adversarial samples that satisfy the physical laws of UAV communication. Step 4: Mix the unperturbed UAV network traffic feature sequence with adversarial examples to enhance the initial intrusion detection model, thereby obtaining the enhanced intrusion detection model and realizing intrusion detection of UAV network traffic.

[0018] Example 2 This invention relates to a UAV network intrusion detection method based on frequency domain perturbation and physical constraints, combined with... Figure 1 The specific steps are as follows: Step 1: Obtain the UAV communication network traffic dataset, preprocess the original traffic samples, and obtain the UAV network traffic feature sequence; Step 1 is implemented in the following steps: Step 1.1: Obtain the UAV communication network traffic dataset The original category labels in the UAV communication network traffic dataset include normal traffic, black hole attack, wormhole attack, flood attack, and Sybil attack. The original category labels are binarized, and samples with the original category label of normal traffic are marked as 0 as normal traffic samples, and samples with the original category label of black hole attack, wormhole attack, flood attack, or Sybil attack are marked as 1 as attack traffic samples. Step 1.2: Divide the UAV communication network traffic dataset obtained in Step 1.1 into a training set and a test set, with a ratio of 8:2. Impute the missing values ​​in the UAV network traffic samples. For the j-th feature, use the mean of the non-missing samples of the corresponding feature in the training set to impute the missing values ​​in that feature. The impute method is as shown in Formula (1): (1) in, Indicates the first The first sample 1 eigenvalue, Indicates the first training set The mean of each feature, Indicates the first training set A set of indices for samples with non-missing features. express The number of samples in the sample; Step 1.3: Perform outlier processing on the samples obtained in Step 1.2. Identify feature values ​​that deviate from the normal distribution range according to the three sigma criterion. For features related to message size, time interval, and transmission rate, determine the outlier judgment interval based on the quantile statistics of the corresponding features in the training set. Only samples that exceed the outlier judgment interval are treated as outlier samples to avoid removing samples with communication physical significance. Step 1.4: Normalize the UAV network traffic characteristics processed in Step 1.3, mapping features with different dimensions and value ranges to a unified scale. The normalization method is as shown in Formula (2): (2) in, Represents the normalized i-th 1 eigenvalue, and They represent the first The minimum and maximum values ​​of the i-th feature will be used to determine the i-th feature. The normalized features of each sample are combined in the original feature order to obtain the final sample. A sequence of network traffic characteristics of drones ,in, Indicates the feature dimension.

[0019] Step 2: Input the UAV network traffic feature sequence into the lightweight one-dimensional convolutional intrusion detection model for initial training to obtain an initial intrusion detection model that can distinguish between normal traffic and attack traffic. Step 3: Construct feature importance weight vectors based on mutual information, and use the initial intrusion detection model, combined with frequency domain perturbation mechanism and physical constraints, to generate adversarial samples that satisfy the physical laws of UAV communication. Step 4: Mix the unperturbed UAV network traffic feature sequence with adversarial examples to enhance the initial intrusion detection model, thereby obtaining the enhanced intrusion detection model and realizing intrusion detection of UAV network traffic.

[0020] Example 3 This invention relates to a UAV network intrusion detection method based on frequency domain perturbation and physical constraints, combined with... Figure 1 The specific steps are as follows: Step 1: Obtain the UAV communication network traffic dataset, preprocess the original traffic samples, and obtain the UAV network traffic feature sequence; Step 1 is implemented in the following steps: Step 1.1: Obtain the UAV communication network traffic dataset The original category labels in the UAV communication network traffic dataset include normal traffic, black hole attack, wormhole attack, flood attack, and Sybil attack. The original category labels are binarized, and samples with the original category label of normal traffic are marked as 0 as normal traffic samples, and samples with the original category label of black hole attack, wormhole attack, flood attack, or Sybil attack are marked as 1 as attack traffic samples. Step 1.2: Divide the UAV communication network traffic dataset obtained in Step 1.1 into a training set and a test set, with a ratio of 8:2. Impute the missing values ​​in the UAV network traffic samples. For the j-th feature, use the mean of the non-missing samples of the corresponding feature in the training set to impute the missing values ​​in that feature. The impute method is as shown in Formula (1): (1) in, Indicates the first The first sample 1 eigenvalue, Indicates the first training set The mean of each feature, Indicates the first training set A set of indices for samples with non-missing features. express The number of samples in the sample; Step 1.3: Perform outlier processing on the samples obtained in Step 1.2. Identify feature values ​​that deviate from the normal distribution range according to the three sigma criterion. For features related to message size, time interval, and transmission rate, determine the outlier judgment interval based on the quantile statistics of the corresponding features in the training set. Only samples that exceed the outlier judgment interval are treated as outlier samples to avoid removing samples with communication physical significance. Step 1.4: Normalize the UAV network traffic characteristics processed in Step 1.3, mapping features with different dimensions and value ranges to a unified scale. The normalization method is as shown in Formula (2): (2) in, Represents the normalized i-th 1 eigenvalue, and They represent the first The minimum and maximum values ​​of the i-th feature will be used to determine the i-th feature. The normalized features of each sample are combined in the original feature order to obtain the final sample. A sequence of network traffic characteristics of drones ,in, Indicates the feature dimension.

[0021] Step 2: Input the UAV network traffic feature sequence into the lightweight one-dimensional convolutional intrusion detection model for initial training to obtain an initial intrusion detection model that can distinguish between normal traffic and attack traffic. Step 2 is implemented in the following steps: Step 2.1: Construct a lightweight one-dimensional convolutional intrusion detection model, which includes an input layer, a depthwise separable convolutional feature extraction module, a residual feature reuse module, an adaptive pooling layer, and a fully connected classification layer connected in sequence. Step 2.2: Input the UAV network traffic feature sequence obtained in Step 1.4 into the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1, and obtain the convolutional features after processing by depth-separable convolutional layers; Step 2.2 is implemented according to the following steps: Step 2.2.1: Represent the UAV network traffic feature sequence obtained in Step 1.4 as a single-channel one-dimensional input sequence, as shown in formula (3): (3) in, Indicates the first A normalized sequence of drone network traffic characteristics. Indicates the dimension of the input features; Step 2.2.2: Input the single-channel one-dimensional input sequence obtained in step 2.2.1 into the depth convolution unit in the depthwise separable convolution feature extraction module, and extract local correlation features independently on each input channel to obtain depth convolution features. The depth convolution process is as shown in formula (4): (4) in, Indicates the first Features of each input channel Indicates the first Each channel corresponds to a depthwise convolutional kernel. Represents depthwise convolutional features; Step 2.2.3: Input the depthwise convolutional features obtained in Step 2.2.2 into the point convolutional unit in the depthwise separable convolutional feature extraction module, and perform information fusion in the channel dimension to obtain point convolutional features. The point convolution process is as shown in formula (5): (5) in, Indicates the first m The point convolution result corresponding to each output channel Indicates the number of output channels. Indicates the parameters of the point convolution kernel; Step 2.2.4: Perform batch normalization and nonlinear mapping on the point convolution features obtained in Step 2.2.3 to obtain convolution features; In step 2.3, the convolutional features obtained in step 2.2.4 are input into the residual feature reuse module. The residual feature reuse module includes a residual branch and an identity mapping branch. The residual branch performs depthwise separable convolution, batch normalization, and nonlinear mapping on the convolutional features to obtain transformed features. The identity mapping branch retains the input convolutional features and fuses the transformed features with the input convolutional features to obtain residual enhancement features. The expression of the residual enhancement features is as shown in formula (6): (6) Where H represents the input feature of the residual feature reuse block, R(H) represents a depthwise separable convolution operation, and R(H) represents a residual enhancement feature.

[0022] Step 2.3: Input the convolutional features obtained in Step 2.2 into the residual feature reuse block, and obtain the residual enhanced features after fusion with the residual branch transformation and identity mapping; Step 2.4: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer and the fully connected classification layer for classification training, and construct a loss function to iteratively optimize the model parameters to obtain the initial intrusion detection model; Step 2.4 is implemented according to the following steps: Step 2.4.1: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to compress the residual enhancement features into a fixed-dimensional global feature representation; Step 2.4.2: Input the global feature representation obtained in Step 2.4.1 into the fully connected classification layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to obtain the predicted probability that the UAV network traffic sample belongs to normal traffic and attack traffic. Step 2.4.3: Calculate the cross-entropy loss based on the predicted probability obtained in Step 2.4.2 and the binarized category label obtained in Step 1.1, and update the parameters of the lightweight one-dimensional convolutional intrusion detection model through backpropagation. After training is completed, the lightweight one-dimensional convolutional intrusion detection model that has completed the initial training is used as the initial intrusion detection model.

[0023] Step 3: Construct feature importance weight vectors based on mutual information, and use the initial intrusion detection model, combined with frequency domain perturbation mechanism and physical constraints, to generate adversarial samples that satisfy the physical laws of UAV communication. Step 4: Mix the unperturbed UAV network traffic feature sequence with adversarial examples to enhance the initial intrusion detection model, thereby obtaining the enhanced intrusion detection model and realizing intrusion detection of UAV network traffic.

[0024] Example 4 This invention relates to a UAV network intrusion detection method based on frequency domain perturbation and physical constraints, combined with... Figure 1 The specific steps are as follows: Step 1: Obtain the UAV communication network traffic dataset, preprocess the original traffic samples, and obtain the UAV network traffic feature sequence; Step 1 is implemented in the following steps: Step 1.1: Obtain the UAV communication network traffic dataset The original category labels in the UAV communication network traffic dataset include normal traffic, black hole attack, wormhole attack, flood attack, and Sybil attack. The original category labels are binarized, and samples with the original category label of normal traffic are marked as 0 as normal traffic samples, and samples with the original category label of black hole attack, wormhole attack, flood attack, or Sybil attack are marked as 1 as attack traffic samples. Step 1.2: Divide the UAV communication network traffic dataset obtained in Step 1.1 into a training set and a test set, with a ratio of 8:2. Impute the missing values ​​in the UAV network traffic samples. For the j-th feature, use the mean of the non-missing samples of the corresponding feature in the training set to impute the missing values ​​in that feature. The impute method is as shown in Formula (1): (1) in, Indicates the first The first sample 1 eigenvalue, Indicates the first training set The mean of each feature, Indicates the first training set A set of indices for samples with non-missing features. express The number of samples in the sample; Step 1.3: Perform outlier processing on the samples obtained in Step 1.2. Identify feature values ​​that deviate from the normal distribution range according to the three sigma criterion. For features related to message size, time interval, and transmission rate, determine the outlier judgment interval based on the quantile statistics of the corresponding features in the training set. Only samples that exceed the outlier judgment interval are treated as outlier samples to avoid removing samples with communication physical significance. Step 1.4: Normalize the UAV network traffic characteristics processed in Step 1.3, mapping features with different dimensions and value ranges to a unified scale. The normalization method is as shown in Formula (2): (2) in, Represents the normalized i-th 1 eigenvalue, and They represent the first The minimum and maximum values ​​of the i-th feature will be used to determine the i-th feature. The normalized features of each sample are combined in the original feature order to obtain the final sample. A sequence of network traffic characteristics of drones ,in, Indicates the feature dimension.

[0025] Step 2: Input the UAV network traffic feature sequence into the lightweight one-dimensional convolutional intrusion detection model for initial training to obtain an initial intrusion detection model that can distinguish between normal traffic and attack traffic. Step 2 is implemented in the following steps: Step 2.1: Construct a lightweight one-dimensional convolutional intrusion detection model, which includes an input layer, a depthwise separable convolutional feature extraction module, a residual feature reuse module, an adaptive pooling layer, and a fully connected classification layer connected in sequence. Step 2.2: Input the UAV network traffic feature sequence obtained in Step 1.4 into the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1, and obtain the convolutional features after processing by depth-separable convolutional layers; Step 2.2 is implemented according to the following steps: Step 2.2.1: Represent the UAV network traffic feature sequence obtained in Step 1.4 as a single-channel one-dimensional input sequence, as shown in formula (3): (3) in, Indicates the first A normalized sequence of drone network traffic characteristics. Indicates the dimension of the input features; Step 2.2.2: Input the single-channel one-dimensional input sequence obtained in step 2.2.1 into the depth convolution unit in the depthwise separable convolution feature extraction module, and extract local correlation features independently on each input channel to obtain depth convolution features. The depth convolution process is as shown in formula (4): (4) in, Indicates the first Features of each input channel Indicates the first Each channel corresponds to a depthwise convolutional kernel. Represents depthwise convolutional features; Step 2.2.3: Input the depthwise convolutional features obtained in Step 2.2.2 into the point convolutional unit in the depthwise separable convolutional feature extraction module, and perform information fusion in the channel dimension to obtain point convolutional features. The point convolution process is as shown in formula (5): (5) in, Indicates the first m The point convolution result corresponding to each output channel Indicates the number of output channels. Indicates the parameters of the point convolution kernel; Step 2.2.4: Perform batch normalization and nonlinear mapping on the point convolution features obtained in Step 2.2.3 to obtain convolution features; In step 2.3, the convolutional features obtained in step 2.2.4 are input into the residual feature reuse module. The residual feature reuse module includes a residual branch and an identity mapping branch. The residual branch performs depthwise separable convolution, batch normalization, and nonlinear mapping on the convolutional features to obtain transformed features. The identity mapping branch retains the input convolutional features and fuses the transformed features with the input convolutional features to obtain residual enhancement features. The expression of the residual enhancement features is as shown in formula (6): (6) Where H represents the input feature of the residual feature reuse block, R(H) represents a depthwise separable convolution operation, and R(H) represents a residual enhancement feature.

[0026] Step 2.3: Input the convolutional features obtained in Step 2.2 into the residual feature reuse block, and obtain the residual enhanced features after fusion with the residual branch transformation and identity mapping; Step 2.4: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer and the fully connected classification layer for classification training, and construct a loss function to iteratively optimize the model parameters to obtain the initial intrusion detection model; Step 2.4 is implemented according to the following steps: Step 2.4.1: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to compress the residual enhancement features into a fixed-dimensional global feature representation; Step 2.4.2: Input the global feature representation obtained in Step 2.4.1 into the fully connected classification layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to obtain the predicted probability that the UAV network traffic sample belongs to normal traffic and attack traffic. Step 2.4.3: Calculate the cross-entropy loss based on the predicted probability obtained in Step 2.4.2 and the binarized category label obtained in Step 1.1, and update the parameters of the lightweight one-dimensional convolutional intrusion detection model through backpropagation. After training is completed, the lightweight one-dimensional convolutional intrusion detection model that has completed the initial training is used as the initial intrusion detection model.

[0027] Step 3: Construct feature importance weight vectors based on mutual information, and use the initial intrusion detection model, combined with frequency domain perturbation mechanism and physical constraints, to generate adversarial samples that satisfy the physical laws of UAV communication. Step 3 is implemented in the following steps: Step 3.1: Calculate the importance of each traffic feature based on mutual information and normalize it to construct a feature importance weight vector. This is used to limit the perturbation amplitude on key discriminative features in subsequent perturbation constraints; Step 3.2: Construct an adversarial example generation module, and set up the generator, frequency domain perturbation unit, physical constraint unit and discriminator in sequence, and connect it to the initial intrusion detection model obtained in step 2.4; Step 3.3: Input the UAV network traffic feature sequence obtained in Step 1.4 into the generator, and modulate the generated perturbation through the frequency domain perturbation unit in Step 3.2 to obtain the frequency domain modulated perturbation; Step 3.3 is implemented in accordance with the following steps: Step 3.3.1: Input the UAV network traffic feature sequence obtained in step 1.4 into the generator, and output the corresponding initial perturbation, expressed as in formula (7): (7) in, Represents a generator. Indicates generator parameters, Indicates the first A sequence of network traffic characteristics of unmanned aerial vehicles (UAVs). Indicates the first The initial perturbation corresponding to each sample; Step 3.3.2: Perform a Fast Fourier Transform on the initial perturbation obtained in Step 3.3.1 to transform the initial perturbation from the original feature space to the frequency domain space, as shown in Equation (8): (8) in, This represents the first half of the initial disturbance. Represents the Fast Fourier Transform. Indicates frequency domain perturbation; Step 3.3.3: Perform differentiated frequency band modulation on the frequency domain perturbation obtained in step 3.3.2, and perform inverse fast Fourier transform to obtain the frequency domain modulated perturbation. The differentiated frequency band modulation is shown in formula (9): (9) in, This indicates a spectrum index. , and These represent the low-frequency, mid-frequency, and high-frequency modulation coefficients, respectively. This represents the frequency domain disturbance after modulation.

[0028] Step 3.4: Superimpose the frequency-domain modulated perturbation obtained in Step 3.3 onto the UAV network traffic feature sequence obtained in Step 1.4, and perform constraint correction through the physical constraint unit in Step 3.2 to obtain the adversarial sample to be optimized. Step 3.4 is implemented in accordance with the following steps: Step 3.4.1: Superimpose the frequency-domain modulated perturbation obtained in step 3.3 onto the UAV network traffic feature sequence obtained in step 1.4 to obtain the sample to be constrained; Step 3.4.2: Extract message size, time interval, and transmission rate related features from the sample to be constrained obtained in Step 3.4.1, and calculate the perturbed transmission rate, as shown in formula (10): (10) in, Indicates the size of the message after the disturbance. Indicates the time interval after the disturbance. Indicates the minimum time interval. Indicates the transmission rate after the disturbance; Step 3.4.3: When the relevant features in step 3.4.2 do not satisfy the communication physical relationship, that is, when the transmission rate exceeds the upper limit of the rate, the message size-related features in the sample to be constrained are constrained and corrected to obtain the adversarial sample to be optimized. The correction method is as shown in formula (11): (11) in, Indicates the upper bound of the transmission rate. To prevent extremely small constants with a denominator of zero, Indicates the first The message size feature values ​​before and after constraint correction in a sample to be constrained.

[0029] Step 3.5: Input the adversarial samples to be optimized obtained in Step 3.4 into the discriminator in Step 3.2 and the initial intrusion detection model obtained in Step 2.4 respectively. Combine the loss and constraints to iteratively optimize the generator parameters to obtain the optimized generator. Then, use the optimized generator to generate adversarial samples that satisfy the physical laws of UAV communication.

[0030] Step 3.5 shall be implemented in accordance with the following steps: Step 3.5.1: Input the adversarial sample to be optimized obtained in step 3.4 and the unsuperimposed perturbation UAV network traffic feature sequence obtained in step 1.4 into the discriminator so that the adversarial sample to be optimized approximates the real sample in distribution; Step 3.5.2: Input the adversarial sample to be optimized obtained in Step 3.4 into the initial intrusion detection model whose parameters are not updated in Step 2.4, and calculate the classification loss in the adversarial generation process; Step 3.5.3: Based on the feature importance weight vector obtained in Step 3.1 Constructing weighted perturbation constraint loss This limits the amplitude of perturbations on highly important features, and the weighted perturbation constraint loss is shown in formula (12): (12) in, This indicates element-wise multiplication, where perturbations on highly important features are preferentially suppressed; Step 3.5.4: Construct the generator optimization objective based on the discriminator constraint, classification loss, weighted perturbation constraint, and physical constraint. The generator optimization objective is shown in formula (13): (13) in, This represents the total loss of the generator. This represents the discriminator constraint loss. Represents classification loss. This represents the weighted perturbation constraint loss. Represents physical constraint loss. , , , This represents the weighting coefficient of each loss term.

[0031] Step 3.5.5: Based on the generator optimization objective constructed in Step 3.5.4, the generator parameters are iteratively updated and optimized. The UAV network traffic feature sequence from Step 1.4 is input into the optimized generator to obtain adversarial samples that satisfy the physical laws of UAV communication.

[0032] Step 4: Mix the unperturbed UAV network traffic feature sequence with adversarial examples to enhance the initial intrusion detection model, thereby obtaining the enhanced intrusion detection model and realizing intrusion detection of UAV network traffic.

[0033] Example 5 This invention relates to a UAV network intrusion detection method based on frequency domain perturbation and physical constraints, combined with... Figure 1 The specific steps are as follows: Step 1: Obtain the UAV communication network traffic dataset, preprocess the original traffic samples, and obtain the UAV network traffic feature sequence; Step 1 is implemented in the following steps: Step 1.1: Obtain the UAV communication network traffic dataset The original category labels in the UAV communication network traffic dataset include normal traffic, black hole attack, wormhole attack, flood attack, and Sybil attack. The original category labels are binarized, and samples with the original category label of normal traffic are marked as 0 as normal traffic samples, and samples with the original category label of black hole attack, wormhole attack, flood attack, or Sybil attack are marked as 1 as attack traffic samples. Step 1.2: Divide the UAV communication network traffic dataset obtained in Step 1.1 into a training set and a test set, with a ratio of 8:2. Impute the missing values ​​in the UAV network traffic samples. For the j-th feature, use the mean of the non-missing samples of the corresponding feature in the training set to impute the missing values ​​in that feature. The impute method is as shown in Formula (1): (1) in, Indicates the first The first sample 1 eigenvalue, Indicates the first training set The mean of each feature, Indicates the first training set A set of indices for samples with non-missing features. express The number of samples in the sample; Step 1.3: Perform outlier processing on the samples obtained in Step 1.2. Identify feature values ​​that deviate from the normal distribution range according to the three sigma criterion. For features related to message size, time interval, and transmission rate, determine the outlier judgment interval based on the quantile statistics of the corresponding features in the training set. Only samples that exceed the outlier judgment interval are treated as outlier samples to avoid removing samples with communication physical significance. Step 1.4: Normalize the UAV network traffic characteristics processed in Step 1.3, mapping features with different dimensions and value ranges to a unified scale. The normalization method is as shown in Formula (2): (2) in, Represents the normalized i-th 1 eigenvalue, and They represent the first The minimum and maximum values ​​of the i-th feature will be used to determine the i-th feature. The normalized features of each sample are combined in the original feature order to obtain the final sample. A sequence of network traffic characteristics of drones ,in, Indicates the feature dimension.

[0034] Step 2: Input the UAV network traffic feature sequence into the lightweight one-dimensional convolutional intrusion detection model for initial training to obtain an initial intrusion detection model that can distinguish between normal traffic and attack traffic. Step 2 is implemented in the following steps: Step 2.1: Construct a lightweight one-dimensional convolutional intrusion detection model, which includes an input layer, a depthwise separable convolutional feature extraction module, a residual feature reuse module, an adaptive pooling layer, and a fully connected classification layer connected in sequence. Step 2.2: Input the UAV network traffic feature sequence obtained in Step 1.4 into the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1, and obtain the convolutional features after processing by depth-separable convolutional layers; Step 2.2 is implemented according to the following steps: Step 2.2.1: Represent the UAV network traffic feature sequence obtained in Step 1.4 as a single-channel one-dimensional input sequence, as shown in formula (3): (3) in, Indicates the first A normalized sequence of drone network traffic characteristics. Indicates the dimension of the input features; Step 2.2.2: Input the single-channel one-dimensional input sequence obtained in step 2.2.1 into the depth convolution unit in the depthwise separable convolution feature extraction module, and extract local correlation features independently on each input channel to obtain depth convolution features. The depth convolution process is as shown in formula (4): (4) in, Indicates the first Features of each input channel Indicates the first Each channel corresponds to a depthwise convolutional kernel. Represents depthwise convolutional features; Step 2.2.3: Input the depthwise convolutional features obtained in Step 2.2.2 into the point convolutional unit in the depthwise separable convolutional feature extraction module, and perform information fusion in the channel dimension to obtain point convolutional features. The point convolution process is as shown in formula (5): (5) in, Indicates the first m The point convolution result corresponding to each output channel Indicates the number of output channels. Indicates the parameters of the point convolution kernel; Step 2.2.4: Perform batch normalization and nonlinear mapping on the point convolution features obtained in Step 2.2.3 to obtain convolution features; In step 2.3, the convolutional features obtained in step 2.2.4 are input into the residual feature reuse module. The residual feature reuse module includes a residual branch and an identity mapping branch. The residual branch performs depthwise separable convolution, batch normalization, and nonlinear mapping on the convolutional features to obtain transformed features. The identity mapping branch retains the input convolutional features and fuses the transformed features with the input convolutional features to obtain residual enhancement features. The expression of the residual enhancement features is as shown in formula (6): (6) Where H represents the input feature of the residual feature reuse block, R(H) represents a depthwise separable convolution operation, and R(H) represents a residual enhancement feature.

[0035] Step 2.3: Input the convolutional features obtained in Step 2.2 into the residual feature reuse block, and obtain the residual enhanced features after fusion with the residual branch transformation and identity mapping; Step 2.4: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer and the fully connected classification layer for classification training, and construct a loss function to iteratively optimize the model parameters to obtain the initial intrusion detection model; Step 2.4 is implemented in accordance with the following steps: Step 2.4.1: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to compress the residual enhancement features into a fixed-dimensional global feature representation; Step 2.4.2: Input the global feature representation obtained in Step 2.4.1 into the fully connected classification layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to obtain the predicted probability that the UAV network traffic sample belongs to normal traffic and attack traffic. Step 2.4.3: Calculate the cross-entropy loss based on the predicted probability obtained in Step 2.4.2 and the binarized category label obtained in Step 1.1, and update the parameters of the lightweight one-dimensional convolutional intrusion detection model through backpropagation. After training is completed, the lightweight one-dimensional convolutional intrusion detection model that has completed the initial training is used as the initial intrusion detection model.

[0036] Step 3: Construct feature importance weight vectors based on mutual information, and use the initial intrusion detection model, combined with frequency domain perturbation mechanism and physical constraints, to generate adversarial samples that satisfy the physical laws of UAV communication. Step 3 is implemented in the following steps: Step 3.1: Calculate the importance of each traffic feature based on mutual information and normalize it to construct a feature importance weight vector. This is used to limit the perturbation amplitude on key discriminative features in subsequent perturbation constraints; Step 3.2: Construct an adversarial example generation module, and set up the generator, frequency domain perturbation unit, physical constraint unit and discriminator in sequence, and connect it to the initial intrusion detection model obtained in step 2.4; Step 3.3: Input the UAV network traffic feature sequence obtained in Step 1.4 into the generator, and modulate the generated perturbation through the frequency domain perturbation unit in Step 3.2 to obtain the frequency domain modulated perturbation; Step 3.3 is implemented in accordance with the following steps: Step 3.3.1: Input the UAV network traffic feature sequence obtained in step 1.4 into the generator, and output the corresponding initial perturbation, expressed as in formula (7): (7) in, Represents a generator. Indicates generator parameters, Indicates the first A sequence of network traffic characteristics of unmanned aerial vehicles (UAVs). Indicates the first The initial perturbation corresponding to each sample; Step 3.3.2: Perform a Fast Fourier Transform on the initial perturbation obtained in Step 3.3.1 to transform the initial perturbation from the original feature space to the frequency domain space, as shown in Equation (8): (8) in, This represents the first half of the initial disturbance. Represents the Fast Fourier Transform. Indicates frequency domain perturbation; Step 3.3.3: Perform differentiated frequency band modulation on the frequency domain perturbation obtained in step 3.3.2, and perform inverse fast Fourier transform to obtain the frequency domain modulated perturbation. The differentiated frequency band modulation is shown in formula (9): (9) in, This indicates a spectrum index. , and These represent the low-frequency, mid-frequency, and high-frequency modulation coefficients, respectively. This represents the frequency domain disturbance after modulation.

[0037] Step 3.4: Superimpose the frequency-domain modulated perturbation obtained in Step 3.3 onto the UAV network traffic feature sequence obtained in Step 1.4, and perform constraint correction through the physical constraint unit in Step 3.2 to obtain the adversarial sample to be optimized. Step 3.4 is implemented in accordance with the following steps: Step 3.4.1: Superimpose the frequency-domain modulated perturbation obtained in step 3.3 onto the UAV network traffic feature sequence obtained in step 1.4 to obtain the sample to be constrained; Step 3.4.2: Extract message size, time interval, and transmission rate related features from the sample to be constrained obtained in Step 3.4.1, and calculate the perturbed transmission rate, as shown in formula (10): (10) in, Indicates the size of the message after the disturbance. Indicates the time interval after the disturbance. Indicates the minimum time interval. Indicates the transmission rate after the disturbance; Step 3.4.3: When the relevant features in step 3.4.2 do not satisfy the communication physical relationship, that is, when the transmission rate exceeds the upper limit of the rate, the message size-related features in the sample to be constrained are constrained and corrected to obtain the adversarial sample to be optimized. The correction method is as shown in formula (11): (11) in, Indicates the upper bound of the transmission rate. To prevent extremely small constants with a denominator of zero, Indicates the first The message size feature values ​​before and after constraint correction in a sample to be constrained.

[0038] Step 3.5: Input the adversarial samples to be optimized obtained in Step 3.4 into the discriminator in Step 3.2 and the initial intrusion detection model obtained in Step 2.4 respectively. Combine the loss and constraints to iteratively optimize the generator parameters to obtain the optimized generator. Then, use the optimized generator to generate adversarial samples that satisfy the physical laws of UAV communication.

[0039] Step 3.5 shall be implemented in accordance with the following steps: Step 3.5.1: Input the adversarial sample to be optimized obtained in step 3.4 and the unsuperimposed perturbation UAV network traffic feature sequence obtained in step 1.4 into the discriminator so that the adversarial sample to be optimized approximates the real sample in distribution; Step 3.5.2: Input the adversarial sample to be optimized obtained in Step 3.4 into the initial intrusion detection model whose parameters are not updated in Step 2.4, and calculate the classification loss in the adversarial generation process; Step 3.5.3: Based on the feature importance weight vector obtained in Step 3.1 Constructing weighted perturbation constraint loss This limits the amplitude of perturbations on highly important features, and the weighted perturbation constraint loss is shown in formula (12): (12) in, This indicates element-wise multiplication, where perturbations on highly important features are preferentially suppressed; Step 3.5.4: Construct the generator optimization objective based on the discriminator constraint, classification loss, weighted perturbation constraint, and physical constraint. The generator optimization objective is shown in formula (13): (13) in, This represents the total loss of the generator. This represents the discriminator constraint loss. Represents classification loss. This represents the weighted perturbation constraint loss. Represents physical constraint loss. , , , This represents the weighting coefficient of each loss term.

[0040] Step 3.5.5: Based on the generator optimization objective constructed in Step 3.5.4, the generator parameters are iteratively updated and optimized. The UAV network traffic feature sequence from Step 1.4 is input into the optimized generator to obtain adversarial samples that satisfy the physical laws of UAV communication.

[0041] Step 4: Mix the unperturbed UAV network traffic feature sequence with adversarial examples to enhance the initial intrusion detection model, thereby obtaining the enhanced intrusion detection model and realizing intrusion detection of UAV network traffic.

[0042] Step 4 is implemented in the following steps: The unperturbed UAV network traffic feature sequence obtained in step 1.4 is mixed with the adversarial sample obtained in step 3 to obtain an enhanced training set, which is then input into the initial intrusion detection model obtained in step 2 to enhance the initial intrusion detection model and obtain an enhanced intrusion detection model for intrusion detection of UAV network traffic.

[0043] Example 6 Due to factors such as open communication links, complex wireless environments, and limited onboard computing resources, UAV networks are vulnerable to threats such as black hole, wormhole, flood, and Sybil attacks. Existing intrusion detection methods still suffer from high computational overhead, insufficient adaptability to adversarial disturbances, and a lack of physical plausibility in generating adversarial examples. To improve detection accuracy and robustness, and enhance the physical consistency, concealment, and effectiveness of adversarial examples, this embodiment adopts a UAV network intrusion detection method based on frequency domain perturbation and physical constraints. The main steps of this method are as follows: First, acquire the UAV communication network traffic dataset, perform label binarization, missing value imputation, outlier processing, and normalization on the original traffic samples to obtain the UAV network traffic feature sequence; Second, construct a lightweight one-dimensional convolutional intrusion detection model, extract local correlation features using depthwise separable convolution, and enhance feature representation capabilities through residual feature reuse blocks, training an initial intrusion detection model capable of distinguishing between normal traffic and attack traffic; Then, construct feature importance weight vectors based on mutual information, generate initial perturbations using a generator, and perform frequency band modulation on the perturbations using frequency domain perturbation units, then constrain and correct the perturbation samples by combining the communication physical relationship between message size, time interval, and transmission rate, generating adversarial samples that satisfy the physical laws of UAV communication; Finally, mix the UAV network traffic feature sequence without superimposed perturbations with the adversarial samples to construct an enhanced training set, enhance the initial intrusion detection model, and obtain the enhanced intrusion detection model, thereby realizing intrusion detection of UAV network traffic.

[0044] Example 7 like Figure 2As shown in Figures 3(a) to 3(d), the lightweight one-dimensional convolutional intrusion detection model constructed in this invention extracts UAV network traffic features through one-dimensional depthwise separable convolution and residual feature reuse blocks. On the example UAV communication network traffic dataset, the adversarial examples generated by the method of this invention perform well in terms of perturbation amplitude, signal-to-noise ratio, and attack success rate, indicating that frequency domain perturbation and physical constraints can improve the concealment and effectiveness of adversarial examples. As shown in Figures 4(a) and 4(b), after enhanced training, the prediction results in the confusion matrix are more concentrated in the diagonal region, and the number of misjudged samples is reduced, indicating that this invention can improve the detection accuracy and robustness of the UAV network intrusion detection model.

[0045] To verify the feasibility of this invention, it is further described in conjunction with the embodiments and accompanying drawings. The data selected in this study is the UAVIDS-2025 unmanned aerial vehicle (UAV) communication network traffic dataset, which includes normal traffic as well as attack traffic such as black hole attacks, wormhole attacks, flood attacks, and Sybil attacks. This invention marks normal traffic as 0 and attack traffic as 1.

[0046] First, the raw data undergoes missing value imputation, outlier handling, and normalization to obtain the UAV network traffic feature sequence. Then, the preprocessed UAV network traffic feature sequence is input into a lightweight one-dimensional convolutional intrusion detection model. Traffic features are extracted through depthwise separable convolution and residual feature reuse blocks to obtain the initial intrusion detection model, such as... Figure 2 As shown in Figure 3, a feature importance weight vector is constructed based on mutual information. A generator is used to generate perturbations, and frequency domain perturbation units and physical constraint units are combined to generate adversarial samples that satisfy the physical laws of UAV communication. The adversarial samples generated by this invention are compared with other adversarial attack methods in terms of L1 norm, L2 norm, SNR, and ASR, as shown in Figure 3. The results show that this invention can improve the concealment and rationality of adversarial samples while maintaining the attack effect. Finally, the UAV network traffic feature sequence without superimposed perturbations is mixed with the adversarial samples to enhance the initial intrusion detection model. The confusion matrices before and after training are shown in Figures 4(a) and 4(b). The results show that the number of misjudged samples is reduced after enhanced training, the model's ability to distinguish between normal traffic and attack traffic is improved, and the accuracy and robustness of UAV network intrusion detection are enhanced.

Claims

1. A method for detecting unmanned aerial vehicle (UAV) network intrusion based on frequency domain perturbation and physical constraints, characterized in that, The specific steps are as follows: Step 1: Obtain the UAV communication network traffic dataset and preprocess it to obtain the UAV network traffic feature sequence; Step 2: Input the UAV network traffic feature sequence into the lightweight one-dimensional convolutional intrusion detection model for initial training to obtain an initial intrusion detection model that can distinguish between normal traffic and attack traffic. Step 3: Generate adversarial examples that satisfy the physical laws of UAV communication; Step 4: Mix the unperturbed UAV network traffic feature sequence with adversarial examples to enhance the initial intrusion detection model, thereby obtaining the enhanced intrusion detection model and realizing intrusion detection of UAV network traffic.

2. The UAV network intrusion detection method based on frequency domain perturbation and physical constraints according to claim 1, characterized in that, Step 1 is implemented in the following steps: Step 1.1, obtaining a drone communication network traffic dataset The original class labels in the drone communication network traffic dataset include normal traffic, blackhole attack, wormhole attack, flood attack, and Sybil attack. The original category labels are binarized. Samples with the original category label of normal traffic are marked as 0 and are used as normal traffic samples. Samples with the original category label of black hole attack, wormhole attack, flood attack or Sybil attack are marked as 1 and are used as attack traffic samples. Step 1.2: Divide the UAV communication network traffic dataset obtained in Step 1.1 into a training set and a test set, with a ratio of 8:

2. Impute the missing values ​​in the UAV network traffic samples. For the j-th feature, use the mean of the non-missing samples of the corresponding feature in the training set to impute the missing values ​​in that feature. The impute method is as shown in Formula (1): (1) in, Indicates the first The first sample 1 eigenvalue, Indicates the first training set The mean of each feature, Indicates the first training set A set of indices for samples with non-missing features. express The number of samples in the sample; Step 1.3: Perform outlier processing on the samples obtained in Step 1.

2. Identify feature values ​​that deviate from the normal distribution range according to the three sigma criterion. For features related to message size, time interval, and transmission rate, determine the outlier judgment interval based on the quantile statistics of the corresponding features in the training set. Only samples that exceed the outlier judgment interval are treated as outlier samples to avoid removing samples with communication physical significance. Step 1.4: Normalize the UAV network traffic characteristics processed in Step 1.3, mapping features with different dimensions and value ranges to a unified scale. The normalization method is as shown in Formula (2): (2) in, Represents the normalized i-th 1 eigenvalue, and They represent the first The minimum and maximum values ​​of the i-th feature will be used to determine the i-th feature. The normalized features of each sample are combined in the original feature order to obtain the final sample. A sequence of network traffic characteristics of drones ,in, Indicates the feature dimension. 3.The method of claim 2, wherein, Step 2 is implemented in the following steps: Step 2.1: Construct a lightweight one-dimensional convolutional intrusion detection model, which includes an input layer, a depthwise separable convolutional feature extraction module, a residual feature reuse module, an adaptive pooling layer, and a fully connected classification layer connected in sequence. Step 2.2: Input the UAV network traffic feature sequence obtained in Step 1.4 into the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1, and obtain the convolutional features after processing by depth-separable convolutional layers; Step 2.3: Input the convolutional features obtained in Step 2.2 into the residual feature reuse block, and obtain the residual enhanced features after fusion with the residual branch transformation and identity mapping; Step 2.4: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer and the fully connected classification layer for classification training, and construct a loss function to iteratively optimize the model parameters to obtain the initial intrusion detection model.

4. The method of claim 3, wherein, Step 2.2 is implemented in the following steps: Step 2.2.1: Represent the UAV network traffic feature sequence obtained in Step 1.4 as a single-channel one-dimensional input sequence, as shown in formula (3): (3) wherein, represents the i-th normalized UAV network traffic feature sequence, represents the input feature dimension;​ Step 2.2.2: Input the single-channel one-dimensional input sequence obtained in step 2.2.1 into the depth convolution unit in the depthwise separable convolution feature extraction module, and extract local correlation features independently on each input channel to obtain depth convolution features. The depth convolution process is as shown in formula (4): (4) wherein, represents a feature of the th input channel, represents a depth convolution kernel corresponding to the th channel, represents a depth convolution feature; Step 2.2.3: Input the depthwise convolutional features obtained in Step 2.2.2 into the point convolutional unit in the depthwise separable convolutional feature extraction module, and perform information fusion in the channel dimension to obtain point convolutional features. The point convolution process is as shown in formula (5): (5) in, Indicates the first m The point convolution result corresponding to each output channel Indicates the number of output channels. Indicates the parameters of the point convolution kernel; Step 2.2.4: Perform batch normalization and nonlinear mapping on the point convolution features obtained in Step 2.2.3 to obtain convolution features; In step 2.3, the convolutional features obtained in step 2.2.4 are input into the residual feature reuse module. The residual feature reuse module includes a residual branch and an identity mapping branch. The residual branch performs depthwise separable convolution, batch normalization, and nonlinear mapping on the convolutional features to obtain transformed features. The identity mapping branch retains the input convolutional features and fuses the transformed features with the input convolutional features to obtain residual enhancement features. The expression of the residual enhancement features is as shown in formula (6): (6) wherein H represents an input feature of the residual feature reuse block, denotes a depthwise separable convolution operation, and R(H) represents a residual enhancement feature.

5. The method of claim 4, wherein, Step 2.4 is implemented in the following steps: Step 2.4.1: Input the residual enhancement features obtained in Step 2.3 into the adaptive pooling layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to compress the residual enhancement features into a fixed-dimensional global feature representation; Step 2.4.2: Input the global feature representation obtained in Step 2.4.1 into the fully connected classification layer in the lightweight one-dimensional convolutional intrusion detection model constructed in Step 2.1 to obtain the predicted probability that the UAV network traffic sample belongs to normal traffic and attack traffic. Step 2.4.3: Calculate the cross-entropy loss based on the predicted probability obtained in Step 2.4.2 and the binarized category label obtained in Step 1.1, and update the parameters of the lightweight one-dimensional convolutional intrusion detection model through backpropagation. After training is completed, the lightweight one-dimensional convolutional intrusion detection model that has completed the initial training is used as the initial intrusion detection model.

6. The method of claim 5, wherein, Step 3 is implemented in the following steps: Step 3.1: Calculate the importance of each traffic feature based on mutual information and normalize it to construct a feature importance weight vector. This is used to limit the perturbation amplitude on key discriminative features in subsequent perturbation constraints; Step 3.2: Construct an adversarial example generation module, and set up the generator, frequency domain perturbation unit, physical constraint unit and discriminator in sequence, and connect it to the initial intrusion detection model obtained in step 2.4; Step 3.3: Input the UAV network traffic feature sequence obtained in Step 1.4 into the generator, and modulate the generated perturbation through the frequency domain perturbation unit in Step 3.2 to obtain the frequency domain modulated perturbation; Step 3.4: Superimpose the frequency-domain modulated perturbation obtained in Step 3.3 onto the UAV network traffic feature sequence obtained in Step 1.4, and perform constraint correction through the physical constraint unit in Step 3.2 to obtain the adversarial sample to be optimized. Step 3.5: Input the adversarial samples to be optimized obtained in Step 3.4 into the discriminator in Step 3.2 and the initial intrusion detection model obtained in Step 2.4 respectively. Combine the loss and constraints to iteratively optimize the generator parameters to obtain the optimized generator. Then, use the optimized generator to generate adversarial samples that satisfy the physical laws of UAV communication.

7. The UAV network intrusion detection method based on frequency domain perturbation and physical constraints according to claim 6, characterized in that, Step 3.3 is implemented in the following steps: Step 3.3.1: Input the UAV network traffic feature sequence obtained in step 1.4 into the generator, and output the corresponding initial perturbation, expressed as in formula (7): (7) in, Represents a generator. Indicates generator parameters, Indicates the first A sequence of network traffic characteristics of unmanned aerial vehicles (UAVs). Indicates the first The initial perturbation corresponding to each sample; Step 3.3.2: Perform a Fast Fourier Transform on the initial perturbation obtained in Step 3.3.1 to transform the initial perturbation from the original feature space to the frequency domain space, as shown in Equation (8): (8) wherein denotes the first half of the initial perturbation, denotes a fast Fourier transform, denotes the frequency domain perturbation; Step 3.3.3: Perform differentiated frequency band modulation on the frequency domain perturbation obtained in step 3.3.2, and perform inverse fast Fourier transform to obtain the frequency domain modulated perturbation. The differentiated frequency band modulation is shown in formula (9): (9) wherein, represents a spectral index, , and represent low, mid and high frequency modulation coefficients, respectively, represents the modulated frequency domain perturbation.

8. The method of claim 7, wherein, Step 3.4 is implemented in the following steps: Step 3.4.1: Superimpose the frequency-domain modulated perturbation obtained in step 3.3 onto the UAV network traffic feature sequence obtained in step 1.4 to obtain the sample to be constrained; Step 3.4.2: Extract message size, time interval, and transmission rate related features from the sample to be constrained obtained in Step 3.4.1, and calculate the perturbed transmission rate, as shown in formula (10): (10) in, Indicates the size of the message after the disturbance. Indicates the time interval after the disturbance. Indicates the minimum time interval. Indicates the transmission rate after the disturbance; Step 3.4.3: When the relevant features in step 3.4.2 do not satisfy the communication physical relationship, that is, when the transmission rate exceeds the upper limit of the rate, the message size-related features in the sample to be constrained are constrained and corrected to obtain the adversarial sample to be optimized. The correction method is as shown in formula (11): (11) in, Indicates the upper bound of the transmission rate. To prevent extremely small constants with a denominator of zero, Indicates the first The message size feature values ​​before and after constraint correction in a sample to be constrained.

9. The UAV network intrusion detection method based on frequency domain perturbation and physical constraints according to claim 8, characterized in that, Step 3.5 is implemented in the following steps: Step 3.5.1: Input the adversarial sample to be optimized obtained in step 3.4 and the unsuperimposed perturbation UAV network traffic feature sequence obtained in step 1.4 into the discriminator so that the adversarial sample to be optimized approximates the real sample in distribution; Step 3.5.2: Input the adversarial sample to be optimized obtained in Step 3.4 into the initial intrusion detection model whose parameters are not updated in Step 2.4, and calculate the classification loss in the adversarial generation process; Step 3.5.3: Based on the feature importance weight vector obtained in Step 3.1 Constructing weighted perturbation constraint loss This limits the amplitude of perturbations on highly important features, and the weighted perturbation constraint loss is shown in formula (12): (12) wherein, represents element-wise multiplication, and perturbations on high importance features are prioritized to be suppressed; Step 3.5.4: Construct the generator optimization objective based on the discriminator constraint, classification loss, weighted perturbation constraint, and physical constraint. The generator optimization objective is shown in formula (13): (13) wherein, denotes the generator total loss, denotes the discriminator constraint loss, denotes the classification loss, denotes the weighted perturbation constraint loss, denotes the physical constraint loss, , , , denotes the weight coefficient of each loss term; Step 3.5.5: Based on the generator optimization objective constructed in Step 3.5.4, the generator parameters are iteratively updated and optimized. The UAV network traffic feature sequence from Step 1.4 is input into the optimized generator to obtain adversarial samples that satisfy the physical laws of UAV communication.

10. The method of claim 9, wherein, Step 4 is implemented in the following steps: The unperturbed UAV network traffic feature sequence obtained in step 1.4 is mixed with the adversarial sample obtained in step 3 to obtain an enhanced training set, which is then input into the initial intrusion detection model obtained in step 2 to enhance the initial intrusion detection model and obtain an enhanced intrusion detection model for intrusion detection of UAV network traffic.