Unmanned aerial vehicle GPS spoofing attack detection and identification method under small sample
Through federated learning collaborative training of shrinking autoencoder and improved AdaBoost-CNN algorithm, the problem of low detection and recognition accuracy of UAV GPS spoofing attacks under small samples is solved, and high accuracy detection and detection under small samples are achieved. The identification effect ensures the safety of the drone's flight.
Patent Information
- Application Number
- CN202411339981.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-10
AI Technical Summary
The prior art drone GPS spoofing attack detection and recognition accuracy in small samples, and the detection accuracy based on rules is not high, and the generalization is not strong, so it cannot effectively deal with discontinuous and hidden GPS spoofing attacks.
The federated learning collaborative training of the shrinkage autoencoder and the improved AdaBoost-CNN algorithm are adopted to improve the accuracy of detection and recognition through multiple base stations collaborative training of detection models and identifying GPS spoofing attack types.
Under small sample conditions, the accuracy of GPS spoofing attack detection and recognition is significantly improved, the ability to identify GPS spoofing attack types is improved, and the safety of drone flight is ensured.
Smart Images

Figure CN119293604A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technology, and in particular to a method for detecting and identifying unmanned aerial vehicle GPS spoofing attacks under a small sample size. Background Art
[0002] GPS spoofing attacks are a common type of malicious attack against drones. During the implementation of GPS spoofing attacks, attackers forward delayed GPS signals or generate false GPS signals to induce drones to obtain incorrect positioning information, thereby deceiving drones to deviate from their normal flight paths. Drones that are spoofed by GPS are prone to collision accidents, seriously affecting the flight safety of other drones and aircraft in the airspace. In order to ensure the safety of drone flight airspace, it is urgent to accurately and timely detect and identify GPS spoofing attacks, so as to take corresponding measures to effectively combat GPS spoofing attacks.
[0003] At present, the inventions for detecting GPS spoofing attacks on drones are mainly divided into two types: rule-based detection technology and machine learning-based detection technology. Among them, the main idea of rule-based detection technology is to calculate relevant parameters according to certain mathematical rules, such as the actual position and relative position of the drone, the relative distance between the drone and other detection equipment, etc. Based on the size of these parameters, it is judged whether the drone is under GPS spoofing attack.
[0004] The Chinese invention patent with publication number CN109444922A discloses a method for detecting GPS spoofing attacks on drones based on Kalman filter analysis. The Chinese invention patent with publication number CN110308464A discloses a method for detecting GPS spoofing attacks using other drones for auxiliary positioning.
[0005] Although the above rule-based detection technology can obtain detection results quickly, its detection accuracy is not high and it is only applicable to specific detection conditions and has poor generalization.
[0006] In addition, most of the existing technical solutions for detecting and identifying drone GPS spoofing attacks based on machine learning can achieve high recognition accuracy under their respective detection conditions, but ignore the problem of detecting and identifying drone GPS spoofing attacks under small sample conditions. In actual situations, since GPS spoofing attackers often do not launch attacks continuously and take covert measures to ensure that they are difficult to be discovered, they usually only obtain a small amount of drone flight data and GPS spoofing signal samples for training. Under the condition of a small number of training data samples, the detection and recognition accuracy obtained by the above-mentioned public method is low. Summary of the invention
[0007] Purpose of the invention: To propose a method for detecting and identifying UAV GPS spoofing attacks under a small sample size to solve the above-mentioned problems existing in the prior art.
[0008] The present invention proposes a method for detecting and identifying unmanned aerial vehicle GPS spoofing attacks under small samples. In this method, multiple base stations first use federated learning to collaboratively train contraction autoencoders. Each base station only uses a small number of unmanned aerial vehicle flight data samples for training, thereby improving the training efficiency of the detection model and the detection accuracy of GPS spoofing attacks. Afterwards, when the number of training samples is small, an improved AdaBoost-CNN algorithm is proposed to train the GPS spoofing attack recognition model. In the training process of each CNN base classifier, the algorithm uses the network parameters updated by the previous CNN as the initial values of the current CNN network parameters to continue updating, thereby improving the recognition accuracy of GPS spoofing attacks.
[0009] Specifically, the method comprises the following steps:
[0010] S1, base stations collaboratively train shrinking autoencoders through federated learning; specifically, multiple ground base stations receive flight data uploaded by drones and use the flight data received locally to train local models; after the local model training is completed, the base station uploads the locally updated model parameters to the central server, and the central server aggregates the local model parameters uploaded by all base stations to obtain the global model parameters, and resends the global model parameters to the base station for a new round of updates; after the reconstruction loss of the training data obtained by the shrinking autoencoder is minimized, the final GPS spoofing attack detection model is obtained;
[0011] S2: The base station inputs the local training data into the trained contraction autoencoder, calculates the local detection threshold based on the reconstruction loss, and uploads it to the central server; the central server calculates the global detection threshold based on the local detection thresholds uploaded by all base stations for GPS spoofing attack detection;
[0012] S3, multiple base stations use trained contraction autoencoders to collaboratively detect GPS spoofing attacks; specifically, the base station receives flight data uploaded by the drone, inputs the received data into the trained contraction autoencoder to calculate the corresponding reconstruction loss; the base station compares the calculated reconstruction loss with the global detection threshold, and if the reconstruction loss is greater than the global detection threshold, it means that the corresponding drone is under GPS spoofing attack;
[0013] S4, after detecting a GPS spoofing attack, the base station issues an alarm to the attacked drone; after receiving the alarm, the attacked drone uses the classification model trained by the improved AdaBoost-CNN algorithm to identify the specific type of GPS spoofing attack, and takes corresponding countermeasures to combat the GPS spoofing attack based on the identified attack type.
[0014] In a further embodiment, step S1 further comprises:
[0015] S1.1, the central server initializes the global model parameters ω0 of the contraction autoencoder and sends it to all base stations B k ;
[0016] S1.2, base station B k The contraction autoencoder is trained based on its own local training data. After reaching the set number of local training iterations E, the updated local model parameters are Upload to the central server;
[0017] S1.3, after receiving the local model parameters uploaded by all base stations, the central server calculates the global model parameter ω1 through the aggregation algorithm, and sends the new global model parameter ω1 to each base station for training;
[0018] S1.4, repeat steps S1.2 and S1.3 until the reconstruction loss Loss of the trained contraction autoencoder is SAE When the minimum is reached, the training ends.
[0019] In a further embodiment, step S2 further comprises:
[0020] S2.1, base station B k Input the local training data into the trained contraction autoencoder to obtain the corresponding reconstruction loss Afterwards, according to the reconstruction loss Calculate the local detection threshold th localk , and upload it to the central server;
[0021] S2.2, the central server uses the local detection threshold th uploaded by all base stations localk , calculate the global detection threshold th global .
[0022] In a further embodiment, in step S3, a global detection threshold th is used. global Detect GPS spoofing attacks. The specific judgment formula is:
[0023]
[0024] Among them, LossSAE It represents the reconstruction loss corresponding to the test sample, that is, the reconstruction loss obtained by inputting the shrinkage autoencoder into the flight data uploaded by the UAV to the base station.
[0025] In a further embodiment, in step S4, after receiving the warning, the attacked drone uses the classification model trained by the improved AdaBoost-CNN algorithm to identify the specific type of GPS spoofing attack, specifically including:
[0026] S4.1, initialize the network configuration of all CNN base classifiers;
[0027] S4.2, for the first base classifier CNN1(x), initialize the input data sample weight D1; where D1 = (ω 11 ,…,ω 1i ,…,ω 1N ),ω 1i =1 / N;
[0028] S4.3, use the initialized sample weight D1 to train CNN1(x) and update the network parameters;
[0029] S4.4, after reaching the set training cycle, use the trained CNN1(x) to output the classification prediction probability of each input sample, and calculate the base classifier weight α1 of CNN1(x) according to the classification probability of each sample;
[0030] S4.5, for the subsequent base classifier CNN m (x) training, first pass the previous base classifier CNN m-1 (x) Updated network parameters As CNN m (x) Initial values of network parameters;
[0031] S4.6, according to CNN m-1 (x) Update the base classifier CNN for each input sample’s classification prediction result m The sample weight D of (x) m ;
[0032] S4.7, similar to step S4.3 and step S4.4, by updating the sample weight D m About CNN m (x) Training is performed. After reaching the set training cycle, the corresponding input sample classification prediction results and base classifier weights α are calculated. m ;
[0033] S4.8, after completing the training of all base classifiers, use the integrated classification model f(x) to identify the type of GPS spoofing attack, and take corresponding countermeasures based on the identification results.
[0034] In addition, the present invention also discloses an electronic device, which includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the drone GPS spoofing attack detection and identification method under a small sample as disclosed above.
[0035] In addition, the present invention also discloses a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on an electronic device, the electronic device executes the method for detecting and identifying drone GPS spoofing attacks under a small sample as disclosed above.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] In the GPS spoofing attack detection method of the present invention, multiple base stations are used to collaboratively train a contraction autoencoder through federated learning as a GPS spoofing attack detection model. Each base station uses only a small amount of local data for training, and the final detection model is obtained through aggregation by a central server, thereby improving the training efficiency of the detection model and the detection accuracy of GPS spoofing attacks. In the GPS spoofing attack identification process, the attacked drone uses an improved AdaBoost-CNN algorithm to train a classification model to identify different types of GPS spoofing attacks. During the initialization process of the CNN base classifier, the algorithm uses the network parameters updated by the previous CNN as the initial values of the current CNN parameters to continue updating, and the final classification model is obtained through integration, thereby improving the recognition accuracy of GPS spoofing attack types under small samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is the overall flow chart of the drone GPS spoofing attack detection and identification method under small samples.
[0039] Figure 2 Flowchart of the collaborative detection method for UAV GPS spoofing attacks based on contraction autoencoder.
[0040] Figure 3 This is a comparison chart of the accuracy of the GPS spoofing attack detection scheme and the benchmark scheme under different balance coefficients.
[0041] Figure 4 This is a comparison chart of the precision rate of the GPS spoofing attack detection scheme and the benchmark scheme under different balance coefficients.
[0042] Figure 5Comparison chart of recall rate between GPS spoofing attack detection scheme and benchmark scheme under different balance coefficients.
[0043] Figure 6 This is the workflow diagram of the improved AdaBoost-CNN algorithm.
[0044] Figure 7 This is a comparison chart of the recognition accuracy of the GPS spoofing attack recognition scheme and the benchmark scheme under different numbers of simulation data samples.
[0045] Figure 8 This is a comparison chart of the recognition accuracy of the GPS spoofing attack identification scheme and the benchmark scheme under different numbers of measured data samples. DETAILED DESCRIPTION
[0046] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features known in the art are not described.
[0047] See also Figure 1 The present invention discloses a method for detecting and identifying unmanned aerial vehicle GPS spoofing attacks under a small sample size. The overall process of the method includes the following steps:
[0048] S1, base stations collaboratively train shrinking autoencoders through federated learning; specifically, multiple ground base stations receive flight data uploaded by drones and use the locally received flight data to train local models; after the local model training is completed, the base station uploads the locally updated model parameters to the central server, the central server aggregates the local model parameters uploaded by all base stations to obtain the global model parameters, and resends the global model parameters to the base station for a new round of updates; after the reconstruction loss of the training data obtained by the shrinking autoencoder is minimized, the final GPS spoofing attack detection model is obtained.
[0049] S2: The base station inputs the local training data into the trained contraction autoencoder, calculates the local detection threshold based on the reconstruction loss, and uploads it to the central server; the central server calculates the global detection threshold based on the local detection thresholds uploaded by all base stations for GPS spoofing attack detection.
[0050] S3, multiple base stations use trained contraction autoencoders to collaboratively detect GPS spoofing attacks; specifically, the base station receives flight data uploaded by the UAV, inputs the received data into the trained contraction autoencoder to calculate the corresponding reconstruction loss; the base station compares the calculated reconstruction loss with the global detection threshold. If the reconstruction loss is greater than the global detection threshold, it means that the corresponding UAV is attacked by GPS spoofing.
[0051] S4, after detecting a GPS spoofing attack, the base station issues an alarm to the attacked drone; after receiving the alarm, the attacked drone uses the classification model trained by the improved AdaBoost-CNN algorithm to identify the specific type of GPS spoofing attack, and takes corresponding countermeasures to combat the GPS spoofing attack based on the identified attack type.
[0052] Based on the above steps, the method for detecting and identifying UAV GPS spoofing attacks under small samples disclosed in the present invention includes two processes: collaborative detection of UAV GPS spoofing attacks based on contraction autoencoders and identification of UAV GPS spoofing attacks under small samples. The embodiments of these two parts of the process are described in detail below.
[0053] 1. Collaborative Detection of UAV GPS Spoofing Attacks Based on Contraction Autoencoder
[0054] In this embodiment, the hardware facilities required for the proposed drone GPS spoofing attack detection solution include drones, base stations equipped with computing devices, and a central server. Assume that the number of drones is N, the number of base stations is M, and they are represented by U = {U1,…,U i ,…,U N} and B={B1,…,B k ,…,B M The drone uploads its flight data to the base station, which is used to train the detection model and detect whether the drone is attacked by GPS spoofing. During the training of the detection model, the central server uses the aggregation algorithm to obtain the global model parameters and calculate the global detection threshold for GPS spoofing attack detection.
[0055] In this embodiment, a contraction autoencoder is used as a GPS spoofing attack detection model. The contraction autoencoder is a symmetrical seven-layer neural network structure, which consists of an input layer, a hidden layer, and an output layer. The number of neurons in the input layer and the output layer is consistent with the dimension of the input data sample. The number of neurons in the middle five hidden layers is 20, 15, 5, 15, and 20 respectively. The activation function of all layers is the sigmoid function.
[0056] See also Figure 2The UAV GPS spoofing attack collaborative detection method based on contraction autoencoder proposed in this embodiment includes four stages: initialization, global training, detection threshold calculation, and UAV GPS spoofing attack detection. The specific steps of the four stages are described below.
[0057] 1. Initialization
[0058] The central server initializes the global model parameters ω0 of the contractive autoencoder and sends it to all base stations B k ,k=1,2,…,M。
[0059] 2. Global training
[0060] Step 1: After receiving the global model parameter ω0 uploaded by the central server, the base station uses it as the initial value of the contraction autoencoder parameter and trains the contraction autoencoder through local data. The local data used by the base station to train the contraction autoencoder is the normal historical flight data of the received drone, which includes the drone position, speed, acceleration, attitude angle, and attitude angular velocity. During the training process, the parameters of the contraction autoencoder are updated by the gradient descent algorithm, which is expressed as:
[0061]
[0062] in, represents the kth base station B k The local model parameters are updated after iterative training of the contraction autoencoder; η is the learning rate, is the updated gradient of the bth batch in the local training set of the base station after iterative training. After reaching the set number of iterative training times E, the base station will update the local model parameters Upload to the central server.
[0063] Step 2: The central server receives the local model parameters uploaded by all base stations. After that, the global model parameter ω1 is obtained through the federated average algorithm, which is expressed as:
[0064]
[0065] in, Indicates base station B k The ratio of the number of local training data samples to the total number of training data samples.
[0066] Step 3: The central server resends the aggregated global model parameter ω1 to all base stations. All base stations use the new global model parameter ω1 as the initial value of the contraction autoencoder parameter, train the contraction autoencoder with local data, and update the local model parameter through iterative training. And upload it to the central server.
[0067] Step 4, repeat steps 2 and 3 until the loss function of the contraction autoencoder reaches the minimum, stop training, and obtain the contraction autoencoder finally used for GPS spoofing attack detection. In this method, the loss function of the contraction autoencoder is the reconstruction loss obtained after the input data is reconstructed by the contraction autoencoder, expressed as:
[0068]
[0069] Among them, n represents the number of samples in the training data set, x i and Respectively represent the i-th data sample of the input and the reconstructed data obtained by the contraction autoencoder, z i is a low-dimensional representation of the input data samples, and λ is used to control the trade-off between the two loss terms.
[0070] 3. Detection threshold calculation
[0071] Step 1: After completing the detection model training, the central server sends the trained contraction autoencoder to all base stations.
[0072] Step 2: Each base station inputs its own local training data into the trained contraction autoencoder and calculates the local detection threshold th according to the obtained reconstruction loss. iocalk , and upload the calculated local detection threshold to the central server. The calculation formula for the local detection threshold is:
[0073]
[0074] In the formula, represents the reconstruction loss obtained by inputting the i-th sample contraction autoencoder in the local training data of the k-th base station, s k is the number of samples of the local training data of the kth base station, and α is the balance coefficient, which is used to adjust the size of the calculated detection threshold.
[0075] Step 3: After receiving the local detection thresholds uploaded by all base stations, the central server calculates the global detection threshold th giobal The calculation formula of the global detection threshold is:
[0076]
[0077] The global detection threshold th is calculated global After that, the central server will global Sent to all base stations for drone GPS spoofing attack detection.
[0078] 4. Drone GPS spoofing attack detection
[0079] UAV i Send its current flight data to any base station B k , base station B k Input the received UAV flight data into the trained contraction autoencoder and calculate the corresponding reconstruction loss Loss SAE . i The reconstruction loss corresponding to the flight data at the current moment SAE With the global detection threshold th global Compare, if Loss SAE >th global , indicating that the UAV i subject to GPS spoofing attacks; otherwise, the drone U i Not vulnerable to GPS spoofing attacks.
[0080] The effect of the collaborative detection method for UAV GPS spoofing attacks based on contraction autoencoder proposed in the present invention can be further verified through the following simulation experiments.
[0081] In the simulation experiment of the present invention, the UAV ATTACK dataset is used to construct the training dataset and the test dataset. The datasets are extracted from the flight logs of the drone in normal flight and the drone under GPS spoofing attack, respectively, and can be used as the flight data of the drone. The features of the training dataset and the test dataset constructed in the experiment include the local position (x, y, z) of the drone, the local velocity (v x ,v y ,v z ), local acceleration (a x ,a y ,a z ), the CPU load of the drone, the roll angle, pitch angle, yaw angle, roll angular velocity, pitch angular velocity and yaw angular velocity of the drone, and the data feature dimension is 16.
[0082] The relevant parameters of the experimental setting are as follows: the total number of clients used for collaborative training of the contraction autoencoder in federated learning is set to 5, where each client represents a base station equipped with a computing device; the number of iterations of local training for each client is set to 100, the batch learning sample size during local training is set to 10, the adam optimizer is used to update the model parameters, the learning rate during parameter update is set to 0.001, and the trade-off coefficient λ in the loss function of the contraction autoencoder is set to 1e-3. During the federated learning training process, the training dataset is horizontally divided into 5 sub-datasets with the same number of samples and the same feature dimension as the local training data of the 5 clients, and the number of samples of the local training data of each client is 50.
[0083] In order to verify the effectiveness of the proposed method, the proposed federated learning shrinking autoencoder is compared with two benchmark methods: federated learning autoencoder and centralized learning autoencoder. The evaluation indicators used in the experiment are as follows:
[0084] 1) Accuracy. It indicates the proportion of normal and attacked samples correctly detected by the detection model to the total number of samples, which can reflect the overall detection performance of the model. The higher the accuracy, the better the detection performance of the model. The calculation formula of accuracy is as follows:
[0085]
[0086] Among them, TP, TN, FP, and FN respectively represent the number of attacked samples correctly detected by the detection model, the number of normal samples correctly detected, the number of samples detected as attacked but actually normal samples, and the number of samples detected as normal but actually attacked samples.
[0087] 2) Precision. It indicates the ratio of the attacked samples correctly detected by the detection model to the total number of attacked samples detected by the model. The precision can reflect the accuracy of the detection model in detecting attacked samples. The higher the precision, the lower the probability of false detection of the model, which can also indicate that the detection performance of the model is better. The calculation formula of the precision is as follows:
[0088]
[0089] 3) Recall. It indicates the proportion of attacked samples correctly detected by the detection model to the total number of attacked samples. The higher the recall, the lower the probability of missed detection by the model, that is, the better the detection performance of the model. The calculation formula of recall is as follows:
[0090]
[0091] According to the above detection threshold calculation steps, when the central server calculates the global detection threshold, the different values of the set balance coefficient α will change the calculated global detection threshold, thereby affecting the detection performance of the detection model. In order to fully verify the detection performance of the proposed method, the proposed method is compared with the other two benchmark methods under the condition that the balance coefficient changes from 1 to 3 at intervals of 0.5. The three methods select the same experimental parameters. For comparison results, see Figure 3 , Figure 4 and Figure 5 .from Figure 3It can be seen that the proposed method of federated learning shrinking autoencoder is always higher than the federated learning autoencoder when the balance coefficient changes from 1 to 3. When the balance coefficient is 2, the accuracy of the three methods reaches the highest, and then begins to decline. The decline of the proposed method is the smallest. When the balance coefficient is 3, the accuracy of the proposed method is higher than the other two benchmark methods, which is 96.49%. Figure 4 It can be seen that as the balance coefficient increases, the precision of the three methods gradually increases. When the balance coefficient is 1, the precision of the proposed method is the highest, which is 91.11%. Figure 5 It can be seen that as the balance coefficient increases, the recall rates of the three methods gradually decrease, and when the balance coefficient is 3, the recall rates of the three methods reach the lowest. At this time, the recall rate of the proposed method is 76.69%, which is higher than the other two benchmark methods.
[0092] The simulation experiment also compared the model training time of the three methods under the same experimental parameters. The model training time of the proposed federated learning shrinking autoencoder method is 3.31s, which is much lower than the 7.96s of the centralized learning autoencoder. In summary, the simulation experiment proves that the proposed UAV GPS spoofing attack collaborative detection method based on shrinking autoencoder is least affected by the change of balance coefficient α compared with the other two benchmark methods and has the best detection performance. Moreover, compared with the centralized method, the proposed method improves the training efficiency of the model.
[0093] 2. Identification of UAV GPS spoofing attacks with small samples
[0094] In this embodiment, the hardware facilities required to realize the identification of GPS spoofing attacks on drones are mainly the GPS receiver and the airborne artificial intelligence computing module equipped on the drone. Among them, the GPS receiver and the airborne computing module are integrated together on the drone through the UART or USB interface. After the base station detects that the drone is attacked by GPS spoofing, the base station sends an alarm to the attacked drone. After receiving the alarm, the GPS receiver on the drone uses the corresponding API or script to extract specific signal features from the received raw GPS signal data. After that, the airborne computing module reads these signal features through the serial port, and inputs the read signal features into the classification model trained by the improved AdaBoost-CNN algorithm to identify the type of GPS spoofing attack.
[0095] The method for identifying drone GPS spoofing attacks under a small sample size in this embodiment includes two stages: a training process and an identification process. The two stages are described below respectively.
[0096] 1. Training process
[0097] The proposed method trains the classification model through the improved AdaBoost-CNN algorithm, and the classification model is obtained by integrating multiple convolutional neural network (CNN) base classifiers. The network structure of the CNN base classifier is as follows: the first layer is a one-dimensional convolution layer, the number of convolution kernel filters is 32, the kernel filter size is 3×1, and the Relu activation function is used; the second layer is a maximum pooling layer, the kernel filter size is set to 2×1; the third layer is the first Dropout layer, 20% of the neurons are randomly ignored to prevent the model from overfitting the training data; the fourth layer is the first fully connected layer, the number of neurons is set to 128, and the Relu activation function is used; the fifth layer is the second Dropout layer, 20% of the neurons are randomly ignored; the sixth layer is the second fully connected layer, the number of neurons is set to 64, and the Relu activation function is used; the seventh layer is the third fully connected layer, the number of neurons is consistent with the number of categories of the training data, and the SoftMax activation function is used.
[0098] See also Figure 6 ,The specific workflow of training the classification model by the improved AdaBoost-CNN algorithm is described below.
[0099] Step 1: Input training data sample x i ,i=1,2,…,N, label vector corresponding to the training data sample And the base classifier CNN for the ensemble classification model m (x), m = 1, 2, ..., M; there are K categories in the training data, then each training data sample x i The corresponding label vector is Label vector y i The value corresponding to each dimension in is expressed as:
[0100]
[0101] Where l represents the label vector y i The dimension of l = 1, 2, ..., K, k represents the training sample x i The corresponding category.
[0102] Step 2: Use the convolutional neural network as the base classifier and initialize each base classifier CNN m (x) Neural network configuration, each CNN base classifier sets the same neural network configuration.
[0103] Step 3: For the first base classifier CNN1(x), initialize the training data sample weights D1.
[0104] D1=(ω 11 ,…,ω 1i ,…,ω 1N)
[0105] During initialization, set each training data sample x i Corresponding to the same weight, calculated as ω 1i =1 / N.
[0106] Step 4: Use the initialized sample weight D1 to train CNN1(x) and update the network parameters of each layer of the convolutional neural network CNN1(x) in, represents the shared weights of the lth convolutional layer of CNN1(x), Represents the weights and biases corresponding to the lth fully connected layer of CNN1(x).
[0107] Step 5: After reaching the set training cycle, use the trained base classifier CNN1(x) to output each input sample x i The predicted probability for each class k=1,2,…,K, calculated as:
[0108]
[0109] in, Represents the base classifier CNN1(x) predicting the input sample x i is the probability of the kth class, ω 1i Represents the training data sample x i Corresponding weights. After obtaining the predicted probabilities of all training data samples corresponding to each category, the base classifier weight α1 of CNN1(x) corresponding to each category is calculated according to the classification probability of each sample. The calculation formula is:
[0110]
[0111] In the formula, Indicates that CNN1(x) will input the training data sample x i The weights of the base classifier predicted to be class k.
[0112] Step 6: For the subsequent base classifier CNN m (x) training, first pass the previous base classifier CNN m-1 (x) Update the network parameters of each layer As a CNN m (x) The initial values of the network parameters of each layer.
[0113] Step 7: According to CNN m-1 (x) For each input sample x i The classification prediction results Update the base classifier CNN mThe sample weight D of (x) m =(ω m1 ,…,ω mi ,…,ω mN ), calculated as:
[0114]
[0115] Among them, η represents the learning rate.
[0116] Step 8: Similar to steps 4 and 5, the sample weight D is updated m About CNN m (x) Perform training and calculate the corresponding input sample classification prediction results after reaching the set training cycle and base classifier weight α m , respectively calculated as:
[0117]
[0118] Step 9: After completing the training of all M base classifiers sequentially, the final classification model f(x) is obtained by integration.
[0119] 2. Identification process
[0120] The signal feature data sample x extracted by the drone GPS receiver i Input the trained classification model f(x) to identify the type of GPS spoofing attack and output the predicted category result O(x i ). Input data sample x i The predicted category result depends on the base classifier weights calculated by all base classifiers in the integrated classification model f(x), which is calculated as:
[0121]
[0122] The effect of the UAV GPS spoofing attack identification method under a small sample size proposed in the present invention can be further verified through the following simulation experiments.
[0123] This experiment compares the GPS spoofing attack recognition performance of the proposed improved AdaBoost-CNN with the original AdaBoost-CNN, CNN, DNN, SVM and KNN under different training data sample numbers. Among them, the network parameters of each base classifier CNN of the original AdaBoost-CNN are updated based on the original initial values, that is, the network parameters are not transferred between different CNN base classifiers. The CNN base classifier and CNN network configuration in the original AdaBoost-CNN are the same as the configuration of the CNN base classifier of the proposed method. The DNN consists of five fully connected layers and one Dropout layer. The number of neurons in the first three layers and the fifth fully connected layer are 128, 144, 256 and 64 respectively, and the Relu activation function is used. The fourth layer is the Dropout layer, which randomly ignores 20% of the neurons. The number of neurons in the last fully connected layer is the same as the number of categories of the training data, and the SoftMax activation function is used. The SVM uses a linear kernel function, and the number of nearest neighbors configured by the KNN algorithm is 5.
[0124] The experiment uses the recognition accuracy R as the evaluation index of recognition performance, which means that the number of samples correctly recognized by the model accounts for the total accuracy
[0125] The ratio of the number of samples is calculated as:
[0126]
[0127] Where TP k Indicates the number of correctly predicted k-th class training data samples, N k Represents the total number of training data samples of the kth category. In multi-classification problems, recognition accuracy represents the overall recognition performance of the model. The higher the recognition accuracy, the better the recognition performance of the model.
[0128] The experiment uses simulation data and measured data as training data to verify the performance of the proposed method. The simulation data contains eight different types of GPS spoofing attacks, namely: static power matching position spoofing, static over-power position spoofing, static power matching time spoofing, static over-power time spoofing, dynamic power matching position spoofing, dynamic over-power position spoofing, dynamic power matching time spoofing and dynamic over-power time spoofing. In order to obtain simulation data, the open source software GPS-SDR-SIM is first used to generate GPS signals corresponding to the eight types of GPS spoofing attacks. Then, the FGI-GSRx software-defined receiver is used to extract six signal features from the generated eight types of GPS spoofing signals, including the mean of composite signal quality monitoring indicators, the variance of composite signal quality monitoring indicators, the mean of carrier-to-noise ratio, the variance of carrier-to-noise ratio, the mean of Doppler frequency shift and the mean of clock error. The number of features used for classification model training is 6, and the simulation training data contains eight data types. The measured data is constructed using the TEXBAT dataset. This dataset is a high-fidelity GPS signal dataset. In the experiment, four types of GPS signals were selected from the TEXBAT data set: static overpower time deception, static power matching time deception, static power matching location deception, and dynamic power matching location deception. As with the simulation data, the four types of GPS signals were input into the FGI-GSRx software-defined receiver, and the corresponding six signal features were extracted to construct the measured training data. In summary, the data features of the simulation data and the measured data are the same, with a feature dimension of 6. The simulation data contains eight different types of GPS deception attacks, and the measured data contains four types of GPS deception attacks.
[0129] Figure 7 The following is a comparison chart of the recognition accuracy of the proposed improved AdaBoost-CNN and the other five benchmark solutions under 160, 320, 400, 640 and 800 simulation data samples. The recognition accuracy of the proposed solution is always higher than that of the other five benchmark solutions under different simulation sample numbers. When the number of simulation samples is 800, the recognition accuracy of the proposed solution reaches 100%. When the number of simulation samples is reduced to only 160, the recognition accuracy of the proposed solution is still as high as 93.75%, which is higher than the other five benchmark solutions, indicating that the recognition performance of the proposed solution is better than that of other benchmark solutions under limited samples. Figure 8 The following is a comparison chart of the recognition accuracy of the proposed improved AdaBoost-CNN and the other five benchmark solutions under 120, 160, 200, 240 and 400 measured data samples. Figure 8It can be seen that as the number of measured input samples increases from 120 to 400, the proposed AdaBoost-CNN always has higher recognition accuracy compared with other benchmark schemes. It is worth noting that when the number of input samples is small, the proposed scheme has a greater advantage over the benchmark scheme. When the number of samples is 120, the recognition accuracy of the proposed scheme is 95.83%, which is 25%, 41.66%, 29.16%, 27.08% and 17.7% higher than the original AdaBoost-CNN, CNN, DNN, SVM and KNN respectively. The comparison results of the measured data further verify that the proposed improved AdaBoost-CNN algorithm can improve the recognition accuracy of GPS spoofing attacks under small samples compared with other benchmark schemes.
[0130] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes may be made to it in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A method for detecting and identifying UAV GPS spoofing attacks under small samples, characterized in that: The steps include: S1, base stations collaboratively train contraction autoencoders through federated learning; S2: The base station inputs the local training data into the trained contraction autoencoder, calculates the local detection threshold based on the reconstruction loss, and uploads it to the central server; the central server calculates the global detection threshold based on the local detection thresholds uploaded by all base stations for GPS spoofing attack detection; S3, multiple base stations use trained contraction autoencoders to collaboratively detect GPS spoofing attacks; S4, after detecting a GPS spoofing attack, the base station issues an alarm to the attacked drone; after receiving the alarm, the attacked drone uses the classification model trained by the improved AdaBoost-CNN algorithm to identify the specific type of GPS spoofing attack, and takes corresponding countermeasures to combat the GPS spoofing attack based on the identified attack type.
2. The method for detecting and identifying unmanned aerial vehicle GPS spoofing attacks under small samples according to claim 1 is characterized in that: The base station collaboratively trains the contraction autoencoder through federated learning, specifically including: Multiple ground base stations receive flight data uploaded by drones and use the locally received flight data to train local models. After the local model training is completed, the base station uploads the locally updated model parameters to the central server. The central server aggregates the local model parameters uploaded by all base stations to obtain the global model parameters, and resends the global model parameters to the base stations for a new round of updates. After the reconstruction loss of the training data obtained by the contraction autoencoder is minimized, the final GPS spoofing attack detection model is obtained.
3. The method for detecting and identifying unmanned aerial vehicle GPS spoofing attacks under small samples according to claim 1 is characterized in that: The multiple base stations use the trained contraction autoencoders to collaboratively detect GPS spoofing attacks, specifically including: The base station receives the flight data uploaded by the UAV, and inputs the received data into the trained contraction autoencoder to calculate the corresponding reconstruction loss; the base station compares the calculated reconstruction loss with the global detection threshold. If the reconstruction loss is greater than the global detection threshold, it means that the corresponding UAV is attacked by GPS spoofing.
4. The method for detecting and identifying unmanned aerial vehicle GPS spoofing attacks under small samples according to claim 2 is characterized in that: Step S1 further comprises: S1.1, the central server initializes the global model parameters ω0 of the contraction autoencoder and sends it to all base stations B k ; S1.2, base station B k The contraction autoencoder is trained based on its own local training data. After reaching the set number of local training iterations E, the updated local model parameters are Upload to the central server; S1.3, after receiving the local model parameters uploaded by all base stations, the central server calculates the global model parameter ω1 through the aggregation algorithm, and sends the new global model parameter ω1 to each base station for training; S1.4, repeat steps S1.2 and S1.3 until the reconstruction loss Loss of the trained contraction autoencoder is SAE When the minimum is reached, the training ends.
5. The method for detecting and identifying unmanned aerial vehicle GPS spoofing attacks under small sample size according to claim 4 is characterized in that: Step S2 further comprises: S2.1, base station B k Input the local training data into the trained contraction autoencoder to obtain the corresponding reconstruction loss Afterwards, according to the reconstruction loss Calculate the local detection threshold th localk , and upload it to the central server; S2.2, the central server uses the local detection threshold th uploaded by all base stations localk , calculate the global detection threshold th global .
6. The method for detecting and identifying unmanned aerial vehicle GPS spoofing attacks under small sample size according to claim 5 is characterized in that: In step S3, the global detection threshold th is used global Detect GPS spoofing attacks. The specific judgment formula is: Among them, Loss SAE It represents the reconstruction loss corresponding to the test sample, that is, the reconstruction loss obtained by inputting the shrinkage autoencoder into the flight data uploaded by the UAV to the base station.
7. The method for detecting and identifying unmanned aerial vehicle GPS spoofing attacks under small sample size according to claim 1 is characterized in that: In step S4, after receiving the warning, the attacked drone uses the classification model trained by the improved AdaBoost-CNN algorithm to identify the specific type of GPS spoofing attack, including: S4.1, initialize the network configuration of all CNN base classifiers; S4.2, for the first base classifier CNN1(x), initialize the input data sample weight D1; where D1 = (ω 11 ,…,ω 1i ,…,ω 1N ),ω 1i =1 / N; S4.3, use the initialized sample weight D1 to train CNN1(x) and update the network parameters; S4.4, after reaching the set training cycle, use the trained CNN1(x) to output the classification prediction probability of each input sample, and calculate the base classifier weight α1 of CNN1(x) according to the classification probability of each sample; S4.5, for the subsequent base classifier CNN m (x) training, first pass the previous base classifier CNN m-1 (x) Updated network parameters As CNN m (x) Initial values of network parameters; S4.6, according to CNN m-1 (x) Update the base classifier CNN based on the classification prediction results of each input sample m The sample weight D of (x) m ; S4.7, similar to step S4.3 and step S4.4, by updating the sample weight D m About CNN m (x) Training is performed. After reaching the set training cycle, the corresponding input sample classification prediction results and base classifier weights α are calculated. m ; S4.8, after completing the training of all base classifiers, use the integrated classification model f(x) to identify the type of GPS spoofing attack, and take corresponding countermeasures based on the identification results.
8. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for detecting and identifying GPS spoofing attacks on unmanned aerial vehicles under a small sample as described in any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on the electronic device, the electronic device executes the method for detecting and identifying GPS spoofing attacks on unmanned aerial vehicles under a small sample as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Autonomous navigation unmanned aerial vehicle GPS deception detection and defense method
CN109444922A
Unmanned aerial vehicle (UAV) GPS spoofing detection method
CN110308464A
Cited By
Unmanned aerial vehicle anti-deception capability improvement method based on LLM multi-modal data generation
CN120688577A
Unmanned aerial vehicle GPS deception detection method based on dynamic threshold generation
CN120742356A
End side detection method for unmanned aerial vehicle navigation attack
CN122631121A
An end-side detection method for unmanned aerial vehicle navigation attack
CN122631121B