Unmanned aerial vehicle target detection method and system based on terahertz wireless communication
By adopting a terahertz wireless communication method in drone detection technology and using attention mechanism to process image data, the problem of poor detection effect in complex environments is solved, and high-precision and real-time drones are achieved Detection and monitoring.
Patent Information
- Application Number
- CN202411454654.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-14
AI Technical Summary
The existing drone detection technology has limitations in resolution and signal interference, and cannot provide high-precision detection results. Especially in complex environments, traditional technologies are susceptible to obstruction by obstacles and weather conditions, resulting in poor detection effects. ideal.
Using a drone target detection method based on terahertz wireless communication, image data is obtained and transmitted through a terahertz wireless communication device, and the data is divided into dynamic and static feature vectors by using an image processing module, and a neural network with attention mechanism is used for processing. , and finally generate drone detection information through the loss function unit.
High-speed real-time signal transmission is achieved through terahertz waves, which improves detection effect, and the attention mechanism and new loss function units improve prediction accuracy, can quickly and accurately identify drones, and improve drone supervision capabilities.
Smart Images

Figure CN119445406A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle detection, and in particular to a method and system for unmanned aerial vehicle target detection based on terahertz wireless communication. Background Art
[0002] In recent years, the development and popularization of drone technology has attracted widespread attention in various fields. However, the widespread use of drones has also brought many security issues, especially in the military, public safety and protection of critical infrastructure. Effectively detecting and monitoring drones has become an important technical problem that needs to be solved urgently.
[0003] Existing drone detection technologies mostly rely on microwave, radar or visible light imaging systems, which are limited by resolution and signal interference and cannot provide high-precision detection results. In complex environments, traditional technologies are easily blocked by obstacles and affected by weather conditions, resulting in unsatisfactory detection results. Many existing systems are difficult to achieve real-time drone detection and monitoring due to limitations in data processing and transmission speed. The lack of real-time performance will lead to the inability to provide timely warnings and take necessary countermeasures, increasing safety risks. In addition, the adaptability of existing drone detection systems in complex environments is poor. For example, in severe weather conditions such as haze, rain and snow, the detection effect of traditional optical and radar systems will be greatly reduced, and it is difficult to provide reliable monitoring data. In addition, existing drone detection systems are often a whole, and are prone to resource overload when handling complex tasks, resulting in low system efficiency and difficulty in meeting the needs of multi-target detection and real-time processing. Summary of the invention
[0004] The purpose of the present invention is to provide a UAV target detection method based on terahertz wireless communication to solve the above technical problems;
[0005] The present invention also aims to provide a UAV target detection system based on terahertz wireless communication to solve the above technical problems.
[0006] The technical problem solved by the present invention can be achieved by adopting the following technical solutions:
[0007] A method for detecting unmanned aerial vehicle targets based on terahertz wireless communication, comprising:
[0008] Step S1, the drone detection device acquires image data within the detection range and sends it to the image processing module through the terahertz wireless communication device;
[0009] Step S2, the image processing module divides the image data into dynamic feature vectors and static feature vectors, and inputs the dynamic feature vectors and the static feature vectors into the drone detection neural network of the image processing module respectively for parallel processing using an attention mechanism;
[0010] Step S3, concatenating the processed dynamic feature vector and the processed static feature vector to obtain a concatenated vector;
[0011] Step S4, using a loss function unit to analyze and process the concatenated vector to obtain a correlation feature vector;
[0012] Step S5: input the associated feature vector into the first activation function layer and the first fully connected layer, output the drone detection information, and transmit the drone detection information to the outside through the terahertz wireless communication device.
[0013] Preferably, in step S2, the method for processing the dynamic feature vector includes:
[0014] Step S21, using a second fully connected layer to compress the time series length of the dynamic feature vector to a set length, copying the dynamic feature vector, and putting the copied dynamic feature vector into a second activation function layer and a discard layer for processing to obtain a dynamic feature vector after preliminary processing;
[0015] Step S22, putting the preliminarily processed dynamic feature vector into an attention module, performing graph neural expansion on the preliminarily processed dynamic feature vector at each sampling moment, establishing a dynamic graph neural model to extract information from the graph model, and outputting a two-dimensional vector with the same size as the preliminarily processed dynamic feature vector;
[0016] Step S23, creating a two-dimensional matrix by using the position encoding method of sine and cosine for the two-dimensional vector, and obtaining a two-dimensional feature vector with position information by passing the two-dimensional vector through the two-dimensional matrix;
[0017] Step S24, putting the two-dimensional feature vector into a deformable attention encoder, the deformable attention encoder fuses the input two-dimensional feature vector at each scale and each time series, and outputs a three-dimensional feature vector after the size and dimension are expanded;
[0018] Step S25, putting the three-dimensional feature vector into a residual decoder, performing decoding analysis on the three-dimensional feature vector, and outputting a two-dimensional processed dynamic feature vector.
[0019] Preferably, in step S22, the processing method of the attention module includes:
[0020] Step S221, copying the input dynamic feature vector after preliminary processing to obtain a copy matrix;
[0021] Step S222, performing average pooling twice on the copy matrix to obtain a first pooling result and a second pooling result respectively, and performing convolution to obtain feature information after the first convolution;
[0022] Step S223, dimensionally adjusting the second pooling result, concatenating the second pooling result with the first pooling result, and convolving the concatenated result to obtain feature information after the second convolution;
[0023] Step S224, performing nonlinear activation on the feature information after the second convolution, and multiplying the nonlinear activation result with the feature information after the first convolution to obtain a first multiplication result.
[0024] Preferably, step S22 further includes:
[0025] Step S225, convolving the feature information after the second convolution and then splitting it into a first split feature and a second split feature, and convolving the nonlinear activation result and then splitting it into a third split feature and a fourth split feature;
[0026] Step S226, multiplying the first split feature and the third split feature to obtain a second multiplication result, and multiplying the second split feature and the fourth split feature to obtain a second multiplication result;
[0027] Step S227, performing a multiplication operation on the first multiplication result, the second multiplication result and the third multiplication result to output the two-dimensional vector.
[0028] Preferably, in step S23, the expression of the two-dimensional matrix is:
[0029] PE (pos,2i) =sin(pos / 1000 2i / dim ), i∈(0,dim / 2)
[0030] PE (pos,2i+1) =cos(pos / 1000 (2i+1) / dim ), i∈(0,dim / 2)
[0031] Among them, PE represents the two-dimensional matrix, pos represents the position information, dim represents the dimension information of the two-dimensional vector, and i represents the position information of the two-dimensional vector.
[0032] Preferably, in step S24, the processing method of the deformable attention encoder includes:
[0033] Step S241, amplifying the two-dimensional feature vector in a third dimension to obtain an amplified vector, and copying the amplified vector into two copies to obtain a first copy vector and a second copy vector;
[0034] Step S242, extracting feature information under different indexes from the first replicated vector and the second replicated vector respectively, obtaining feature information of the first replicated vector and the second replicated vector at different scales at the same time or feature information of the first replicated vector and the second replicated vector at different times at the same scale, and outputting a first index vector and a second index vector;
[0035] Step S243, putting the first index vectors into corresponding attention heads respectively, and outputting the first index vectors weighted by the attention mechanism;
[0036] Step S244, multiply the first index vector and the second index vector weighted by the attention mechanism respectively, and integrate the multiplication results to output the three-dimensional feature vector.
[0037] Preferably, in step S25, the processing method of the residual decoder includes:
[0038] Step S251, inputting the three-dimensional feature vector into the residual decoder, and the first convolution layer of the residual decoder convolves the three-dimensional feature vector to obtain a first feature map;
[0039] Step S252, concatenating the first feature map with the input three-dimensional feature vector, and placing the convolution operation into the second convolution layer of the residual decoder to obtain a second feature map;
[0040] Step S253, concatenating the second feature map with the first feature map, and placing the convolution operation into the third convolution layer of the residual decoder to obtain a third feature map;
[0041] Step S254, concatenating the third feature map with the second feature map, and placing them into the fourth convolutional layer of the residual decoder for convolution to obtain a fourth feature map;
[0042] Step S255, shaping the length of the fourth feature map, and outputting the processed dynamic feature vector.
[0043] Preferably, the method for processing the static feature vector in step S2 is to input the static feature vector into a third fully connected layer, copy the static feature vector, and obtain the processed static feature vector.
[0044] Preferably, in step S3, the processing method of the loss function unit includes:
[0045] Step S31, performing average pooling and convolution on the spliced vector, obtaining weight tilt parameters through a loss function, and performing group convolution on the spliced vector to obtain a group convolution result;
[0046] Step S32, performing a dot multiplication on the grouped convolution result and the weight tilt parameter and calculating the sum to obtain a weight feature vector;
[0047] Step S33, screening is performed, and the screened weight feature vector is used as the associated feature vector.
[0048] A UAV target detection system based on terahertz wireless communication, comprising:
[0049] UAV detection equipment, used to obtain image data within the detection range;
[0050] A terahertz wireless communication device, connected to the drone detection device, for transmitting the image data and drone detection information via terahertz waves;
[0051] An image processing module is connected to the drone detection device through the terahertz wireless communication device, and is used to process the image data to obtain the drone detection information. The image processing module includes:
[0052] A drone detection neural network is used to perform neural network processing on the dynamic feature vector and the static feature vector of the image data based on an attention mechanism to obtain a processed dynamic feature vector and a processed static feature vector;
[0053] A splicing module, connected to the drone detection neural network, for splicing the processed dynamic feature vector and the processed static feature vector to obtain a splicing vector;
[0054] A loss function unit, connected to the splicing module, for analyzing and processing the splicing vector to obtain a correlation feature vector;
[0055] A first activation function layer connected to the loss function unit and a first fully connected layer connected to the first activation function layer are used to predict the associated feature vector and output the drone detection information.
[0056] Beneficial effects of the present invention: Due to the adoption of the above technical scheme, the present invention realizes high-speed real-time signal transmission through terahertz waves, improves the detection effect, adopts the attention mechanism for prediction processing, adds a new type of loss function unit, and performs global link analysis on the final classification prediction, which effectively improves the prediction accuracy. The algorithm is simple and reduces the model calculation amount, and can quickly and accurately identify drones in the air, thereby improving the drone supervision capability. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is an architecture diagram of a UAV target detection system based on terahertz wireless communication in an embodiment of the present invention;
[0058] Figure 2 Schematic diagram of the steps of a method for detecting a target of an unmanned aerial vehicle based on terahertz wireless communication in an embodiment of the present invention;
[0059] Figure 3 This is a schematic diagram of step S2 in an embodiment of the present invention;
[0060] Figure 4 This is a schematic diagram of step S21 in an embodiment of the present invention;
[0061] Figure 5 is a processing flow chart of the attention module in an embodiment of the present invention;
[0062] Figure 6 This is a schematic diagram of step S24 in an embodiment of the present invention;
[0063] Figure 7 is a processing flow chart of a deformable attention encoder in an embodiment of the present invention;
[0064] Figure 8 This is a schematic diagram of step S25 in an embodiment of the present invention;
[0065] Fig. 9 Schematic diagram of the structure of a residual decoder in an embodiment of the present invention;
[0066] Fig.10 This is a schematic diagram of step S3 in an embodiment of the present invention;
[0067] Fig.11 4 is a processing flow chart of the loss function unit in an embodiment of the present invention. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0070] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0071] A method for detecting unmanned aerial vehicle targets based on terahertz wireless communication, such as Figures 1 to 11 As shown, including,
[0072] Step S1, the drone detection device 1 obtains image data within the detection range and sends it to the image processing module 3 through the terahertz wireless communication device 2;
[0073] Step S2, the image processing module 3 divides the image data into dynamic feature vectors and static feature vectors, and respectively inputs the dynamic feature vectors and the static feature vectors into the drone detection neural network 4 of the image processing module 3 for parallel processing using an attention mechanism;
[0074] Step S3, concatenating the processed dynamic feature vector and the processed static feature vector to obtain a concatenated vector;
[0075] Step S4, using the loss function unit 6 to analyze and process the concatenated vector to obtain a correlation feature vector;
[0076] In step S5, the associated feature vector is input into the first activation function layer 8 and the first fully connected layer 9, the drone detection information is output, and the drone detection information is transmitted to the outside through the terahertz wireless communication device 2.
[0077] Specifically, the present invention provides a UAV target detection method based on terahertz wireless communication and a UAV target detection system based on terahertz wireless communication. The system includes a UAV detection device 1, a computing and processing device (including an AI image processing module 3), and a display control device.
[0078] The present invention comprises the steps of:
[0079] Step 1, using an external sight or other observation equipment to obtain image data within the detection range, and then sending the image data to the image processing module 3 of the computing and processing equipment of the system through the terahertz wireless communication device 2;
[0080] Step 2, the image processing module 3 divides the image data into dynamic feature vectors and static feature vectors, and inputs the dynamic feature vectors and the static feature vectors into the drone detection neural network 4 for parallel processing using the MPCA attention mechanism;
[0081] Step 3, concatenating the processed dynamic feature vector and the processed static feature vector to obtain a new concatenated vector;
[0082] Step 4, establishing a new loss function unit 6 to analyze the splicing vector to obtain the associated feature vector associated with the object;
[0083] Step 5, input the feature vector associated with the object into the first activation function layer 8 and the first fully connected layer 9, and output the drone detection information;
[0084] Step 6: Data information is transmitted through the terahertz wireless communication device 2 to transmit the drone detection information to the main control unit or display unit for further processing and utilization of the information.
[0085] Specifically, the present invention adopts wireless communication to reduce a large number of cables, so that the equipment space of the entire detection system is reduced, the weight is reduced, the battery life in the battery-powered mode is longer, and the relative position of each device in the system can also be more flexible;
[0086] The terahertz (THz) band is located between microwaves and infrared rays, with a frequency range of approximately 0.1 to 10 THz. Terahertz waves have the advantages of broadband, short wavelength, high resolution and good penetration ability, which give them significant advantages in high-precision detection and high-speed data transmission. The drone target detection system based on terahertz wireless communication uses the high frequency characteristics and wide bandwidth of terahertz waves to achieve high-precision detection and stable data transmission of drones. Terahertz wireless communication relies on its ultra-high speed (the maximum single-stream rate supported by terahertz communication with a working frequency band below 300 GHz can reach 100 Gbps, far exceeding the average single-stream rate of about 1 Gbps for Wi-Fi and 5G mobile communications, and it is expected that the terahertz communication rate may reach the Tbps level in the future) and extremely low latency (as low as μs) to ensure the real-time transmission of data and detection results in this system.
[0087] In the process of drone detection, infrared technology has become one of the key means due to its strong penetration ability and high resolution. Combining terahertz wireless communication and infrared technology, efficient detection of drones can be achieved in complex environments. Through infrared imaging and deep learning algorithms, the drone target detection system can track and predict drones in real time, greatly improving the accuracy and efficiency of detection.
[0088] Specifically, the UAV target detection system based on terahertz wireless communication and infrared technology of the present invention mainly includes the following functions:
[0089] High-resolution imaging: Infrared imaging technology can capture the thermal radiation characteristics of drones, and high-resolution infrared images can be used to clearly identify and track drones.
[0090] Deep learning target tracking: Use deep learning algorithms to analyze and process infrared images to achieve automatic recognition and tracking of UAV targets.
[0091] Deep learning models can learn multiple features of drones, including shape, movement patterns, etc., thereby improving the accuracy and robustness of detection.
[0092] Real-time data transmission: The terahertz wireless communication system supports high-speed data transmission and can transmit infrared images and detection data in real time, ensuring that the ground control center can obtain the location information and status of the drone in a timely manner.
[0093] Strong environmental adaptability: The combination of infrared and terahertz technologies enables the system to work stably in a variety of complex environments, including low-visibility haze weather and night environments.
[0094] Prediction technology: The prediction model based on infrared images and deep learning can predict the movement trajectory of the drone, provide early warning of possible threats, and enhance the system's defense capabilities.
[0095] Through the newly established network structure of the present invention, drones in the air can be identified quickly and accurately, and timely discovered and warned, which can greatly reduce the observation pressure of personnel. In addition, the present invention can divide the entire system into several independent modules for operation on the drone detection equipment to reduce the burden. At the same time, it has the advantages of fast real-time data transmission, strong environmental adaptability, accurate identification and prediction, and early warning of possible threats.
[0096] In a preferred embodiment, Figure 3 As shown, in step S2, the method for processing the dynamic feature vector includes:
[0097] Step S21, using the second fully connected layer to compress the time series length of the dynamic feature vector to a set length, copying the dynamic feature vector, and putting the copied dynamic feature vector into the second activation function layer and the discard layer for processing to obtain the dynamic feature vector after preliminary processing;
[0098] Step S22, putting the initially processed dynamic feature vector into the attention module, performing graph neural expansion on the initially processed dynamic feature vector at each sampling moment, establishing a dynamic graph neural model to extract information from the graph model, and outputting a two-dimensional vector with the same size as the initially processed dynamic feature vector;
[0099] Step S23, using the sine and cosine position coding method to create a two-dimensional matrix for the two-dimensional vector, and obtaining a two-dimensional feature vector with position information through the two-dimensional matrix;
[0100] Step S24, putting the two-dimensional feature vector into a deformable attention encoder, which fuses the input two-dimensional feature vector at each scale and each time series, and outputs a three-dimensional feature vector with amplified size and dimension;
[0101] Step S25, putting the three-dimensional feature vector into a residual decoder, decoding and analyzing the three-dimensional feature vector, and outputting a two-dimensional processed dynamic feature vector.
[0102] Specifically, the present invention classifies the static features of each drone as a static feature vector, and the dynamic features as a dynamic feature vector.
[0103] The steps for processing dynamic feature vectors are as follows:
[0104] Step 1: copy the dynamic feature vector, and use a second fully connected layer to compress the length of all time series from the original length t+ to t; then, copy and concatenate the sensor dimension of the dynamic feature vector to achieve the replication of the vector information, and put the copied feature vector into the second activation function layer and the discard layer for further processing, and output the dynamic feature vector after preliminary processing; input the dynamic feature vector after preliminary processing into the attention module, perform graph neural expansion on the dynamic feature vector input by the corresponding sensor at each sampling moment, establish a dynamic graph neural model to extract information from the graph model, and output a two-dimensional vector of constant size;
[0105] S2, use the position encoding method of sine and cosine to create a two-dimensional PE matrix:
[0106] PE (pos,2i) =sin(pos / 1000 2i / dim ), i∈(0,dim / 2)
[0107] PE (pos,2i+1) =cos(pos / 1000 (2i+1) / dim ), i∈(0,dim / 2)
[0108] Among them, PE represents a two-dimensional matrix, pos represents position information, dim represents dimension information of a two-dimensional vector, i represents position information of a two-dimensional vector, sin represents a sine function, and cos represents a cosine function;
[0109] After passing through the PE matrix, the output is a two-dimensional feature vector with position information. Then the deformable attention encoder fuses the time series of each input sensor to integrate the time information within a fixed time and outputs a three-dimensional feature vector.
[0110] Step 3, putting the three-dimensional feature vector into the residual decoder to realize decoding analysis of the three-dimensional feature vector; the input of the residual decoder is the three-dimensional feature vector, and the output is the two-dimensional feature vector.
[0111] In step S21, the attention module obtains the feature vectors to be extracted from different dimensions, concatenates and mixes the feature vectors, and finally outputs a feature vector with a feature of 3, creating a static feature vector that is convenient for copying to the loss function unit 6.
[0112] Specifically, the present invention uses the MPCA attention module to replace the Transformer as the message passing mechanism in the S2 step, which speeds up the prediction speed; at the same time, the sine and cosine time position encoding of the posture data is increased to achieve feature enhancement of the time series of the posture information.
[0113] Specifically, the present invention uses observation equipment such as external sights to obtain image data within the detection range, and then sends the image data to the image processing module 3 of the computing and processing equipment of the system through the terahertz wireless communication device 2. In this example, the first drone is taken, the drone ID is "1", and the data is a (76+5, 3) matrix, where 76+5 is sensor data (static+dynamic), and 3 represents time (Time), parameter (Parameter) and value (Value). Subsequently, the Parameter data of the data are spliced to obtain a total of 1353980 parameter values, and the repeated parameter values are removed to reduce redundant information, and 5+36 unique parameter values are obtained. The data is divided into dynamic feature vectors and static feature vectors for processing. The dynamic feature vectors and static feature vectors are processed separately, and the initial input feature vector size is (batch_sizes, s+d, t+). Among them, batch_sizes is the data set segmentation size, s is the static feature length, d is the dynamic feature length, and t+ is the time series length.
[0114] First, the dynamic feature vector (d, t+) is input into the second fully connected layer. The fully connected layer inputs a feature vector of length t+ and outputs a feature vector of length t. The result is the feature of (d, t). The replication factor is set to b, and the sensor dimension of the dynamic feature vector is replicated b times, resulting in a feature vector size of (d×b, t). The replicated feature vector is input into the second activation function layer and the discard layer to obtain the dynamic feature vector after preliminary processing, where the discard value of the discard layer is 0.2.
[0115] In a preferred embodiment, Figure 4 , Figure 5 As shown, in step S22, the processing method of the attention module includes:
[0116] Step S221, copying the input dynamic feature vector after preliminary processing to obtain a copy matrix;
[0117] Step S222, performing average pooling twice on the copy matrix to obtain a first pooling result and a second pooling result respectively, and performing convolution to obtain feature information after the first convolution;
[0118] Step S223, adjusting the dimension of the second pooling result, concatenating it with the first pooling result, and convolving the concatenated result to obtain feature information after the second convolution;
[0119] Step S224, performing nonlinear activation on the feature information after the second convolution, and multiplying the nonlinear activation result with the feature information after the first convolution to obtain a first multiplication result.
[0120] In a preferred embodiment, step S22 further includes:
[0121] Step S225, convolving the feature information after the second convolution and then splitting it into a first split feature and a second split feature, and convolving the nonlinear activation result and then splitting it into a third split feature and a fourth split feature;
[0122] Step S226, multiplying the first split feature and the third split feature to obtain a second multiplication result, and multiplying the second split feature and the fourth split feature to obtain a second multiplication result;
[0123] Step S227, performing a multiplication operation on the first multiplication result, the second multiplication result and the third multiplication result to output a two-dimensional vector.
[0124] Specifically, the dynamic feature vector (d×b, t) after preliminary processing is copied to obtain a copy matrix, the size of the copy matrix is also (d×b, t), the copy matrix is average pooled twice to obtain the first pooling result and the second pooling result respectively, and convolution is performed to obtain the feature information after the first convolution, the second pooling result is dimensionally adjusted, and spliced with the first pooling result, and the spliced result is convolved to obtain the feature information after the second convolution; the feature information after the second convolution is nonlinearly activated, and the nonlinear activation result is multiplied with the feature information after the first convolution to obtain the first multiplication result.
[0125] The feature information after the second convolution is convolved and then split into a first split feature and a second split feature, and the nonlinear activation result is convolved and then split into a third split feature and a fourth split feature; the first split feature and the third split feature are multiplied to obtain a second multiplication result, and the second split feature and the fourth split feature are multiplied to obtain a second multiplication result; multiplication operations are performed on the first multiplication result, the second multiplication result and the third multiplication result to output a two-dimensional vector.
[0126] The present invention inputs the above-mentioned preliminarily processed feature vectors into the backbone network (GTN, GraphTransformer Network, GTN) of the present invention, and the neural update propagation network can be used for feature extraction of the neural backbone network and encoding of the extracted features, thereby improving the effect of the attention mechanism structure on the extraction of image features, reducing the parameters of the model operation, and improving the operation speed. At the same time, the preliminarily processed dynamic feature vectors input to the backbone network are copied in the second dimension and added as separate nodes to make them conform to the feature processing method of the deformable attention module, thereby improving the input information redundancy and feature extraction capabilities, and after passing through the attention module, the output is a two-dimensional vector of constant size.
[0127] In a preferred embodiment, in step S23, the expression of the two-dimensional matrix is:
[0128] PE (pos,2i) =sin(pos / 1000 2i / dim ), i∈(0,dim / 2)
[0129] PE (pos,2i+1) =cos(pos / 1000 (2i+1) / dim ), i∈(0,dim / 2)
[0130] Among them, PE represents a two-dimensional matrix, pos represents position information, dim represents the dimension information of a two-dimensional vector, and i represents the position information of a two-dimensional vector.
[0131] Specifically, after passing through the PE matrix, the output is a two-dimensional feature vector. Then the deformable attention encoder fuses the various time series of each input sensor to integrate the time information within a fixed time and outputs a three-dimensional feature vector.
[0132] In a preferred embodiment, Figure 6 , Figure 7 As shown, in step S24, the processing method of the deformable attention encoder includes:
[0133] Step S241, amplifying the two-dimensional feature vector in the third dimension to obtain an amplified vector, and copying the amplified vector into two copies to obtain a first copy vector and a second copy vector;
[0134] Step S242, extracting feature information under different indexes from the first replicated vector and the second replicated vector respectively, obtaining feature information of the first replicated vector and the second replicated vector at different scales at the same time or feature information of the first replicated vector and the second replicated vector at different times at the same scale, and outputting a first index vector and a second index vector;
[0135] Step S243, putting the first index vectors into the corresponding attention heads respectively, and outputting the first index vectors weighted by the attention mechanism;
[0136] In step S244, the first index vector and the second index vector weighted by the attention mechanism are multiplied respectively, and the multiplication results are integrated to output a three-dimensional feature vector.
[0137] Specifically, the computing power of the deformable attention encoder of the present invention is greatly reduced, and the two-dimensional feature vector is amplified and copied in the third dimension c to form an amplified vector with a third dimension, the size of which is (t, d×b, c), and the amplified vector is copied into two copies to obtain a first copy vector and a second copy vector, and feature information under different indexes is extracted from the first copy vector and the second copy vector respectively, and feature information of different scales at the same time of the first copy vector and the second copy vector or feature information of the same scale at different times of the first copy vector and the second copy vector is obtained, and the first index vector and the second index vector are output.
[0138] The present invention includes N first index vectors, corresponding to N attention heads, each first index vector as the input of an attention head, the present invention uses the MPCA attention method as the attention head so that the structure of the deformable attention encoder is as follows Figure 7 As shown, after the first index vector is input into the attention head, it passes through Figure 5 The same operation is performed, and the output is the same size as the first index vector. After the second index vector is extracted, it is multiplied with the output result of the attention head through the activation function softmax operation. The multiplication results are integrated to output a three-dimensional feature vector (t, d×b, c×N).
[0139] The present invention extracts feature information under different indexes m (feature information of different scales at the same time t or feature information of the same scale at different times t), calculates related weights through pooling, convolution, and mean, and finally performs dot multiplication with the full-link relationship matrix of each initial information to complete the extraction of feature information from multiple scales and dimensions; the output of the deformable attention encoder is amplified in the third feature dimension, and the output vector size is N times that of the input, which improves the ability to extract information, and the output is a three-dimensional feature vector (t, d×b, c×N).
[0140] In a preferred embodiment, Figure 8 As shown, in step S25, the processing method of the residual decoder includes:
[0141] Step S251, inputting the three-dimensional feature vector into the residual decoder, and the first convolution layer 601 of the residual decoder convolves the three-dimensional feature vector to obtain a first feature map;
[0142] Step S252, concatenating the first feature map with the input three-dimensional feature vector, and placing the convolution operation into the second convolution layer of the residual decoder to obtain a second feature map;
[0143] Step S253, concatenating the second feature map with the first feature map, and placing them into the third convolutional layer of the residual decoder for convolution to obtain a third feature map;
[0144] Step S254, concatenating the third feature map with the second feature map, and placing them into the fourth convolutional layer of the residual decoder for convolution to obtain a fourth feature map;
[0145] Step S255, shaping the length of the fourth feature map, and outputting the processed dynamic feature vector.
[0146] Specifically, the present invention puts the three-dimensional feature vector (t, d×b, c×N) into the residual decoder to realize the decoding analysis of the three-dimensional feature vector. The decoder network diagram is as follows: Fig. 9 As shown, the input feature vector (t, d×b, c×N) is put into the first convolution layer 601 to obtain the first feature map, and the first convolution layer 601 is also connected to the first batch normalization layer 602 and the third activation function layer 603, which is used to perform batch normalization and relu activation function processing on the first feature map; the first feature map is concatenated with the input feature vector and put into the second convolution layer 604 to obtain the second feature map, and the second convolution layer 604 is also connected to the second batch normalization layer 605 and the fourth activation function layer 606, which is used to perform batch normalization and relu activation function processing on the second feature map; the second feature map is concatenated with the first feature map and put into the third The third convolution layer 607 obtains the third feature map, and the third convolution layer 607 is also connected to the third batch normalization layer 608 and the fifth activation function layer 609, which is used to perform batch normalization and relu activation function processing on the third feature map; the third feature map and the second feature map are concatenated and put into the fourth convolution layer 610 to obtain the fourth feature map; finally, the reshaping layer 611 reshapes the feature length of the fourth feature map to obtain the output result, and converts the size of the vector from a three-dimensional feature vector (t, d×b, c×N) to a two-dimensional feature vector (batch_sizes, t×d×b), which is the output of the residual decoder module.
[0147] The convolutional neural network is used to decode and analyze the information encoded by the graph neural network. Due to the particularity of the data, the convolution kernel of size (3,3) is changed to (1,1), so that the prediction network can use the encoded information more effectively. The input of the residual decoder is a three-dimensional feature vector, and the output is a two-dimensional feature vector (batch_sizes, t×d×b).
[0148] In a preferred embodiment, the method for processing the static feature vector in step S2 is to input the static feature vector into the third fully connected layer, copy the static feature vector, and obtain the processed static feature vector.
[0149] Specifically, the size of the static feature vector separated in the present invention is (batch_sizes, s), which is input into the third fully connected layer to achieve the replication of the static feature vector, and the output result is (batch_sizes, d).
[0150] In a preferred embodiment, Fig.10 As shown, in step S3, the processing method of the loss function unit 6 includes:
[0151] Step S31, average pooling and convolution are performed on the spliced vectors, and then weight tilt parameters are obtained through the loss function, and the spliced vectors are grouped and convolved to obtain grouped convolution results;
[0152] Step S32, performing a dot multiplication on the grouped convolution result and the weight tilt parameter and calculating the sum to obtain a weight feature vector;
[0153] Step S33, screening is performed, and the screened weight feature vector is used as the associated feature vector.
[0154] The present invention sends the concatenated vector to the newly established loss function unit 6 to guide the relationship between the new feature vector and the locked target. Fig.11 As shown in the figure, the concatenated vector is sent to the pooling and graph feature weight function, the pooling result is passed through the first convolution layer to obtain the reconvolution result, and then it is re-activated by the softmax function to obtain the weight tilt parameter for three-dimensional result. At the same time, the two graph weight tilt parameters are multiplied with the result obtained by the graph feature weight function and the final sum is obtained for screening. The weight feature vector with a weight greater than the threshold 0.95 parameter is selected as the associated feature vector associated with the output result object.
[0155] Specifically, the present invention adds a new loss function, screens small targets and dynamic targets and introduces dynamic standards, performs global link analysis on the final classification prediction, emphasizes the information relationship between various postures, and more effectively improves the prediction accuracy;
[0156] Specifically, the output module of the present invention selects the activation function GeLU to ensure information integrity and effectively improve the accuracy of prediction.
[0157] Specifically, after the associated feature vector (batch_sizes, t×d×b+d) is input into the first activation function layer 8, it is input into the first fully connected layer 9 to obtain the prediction result. Then, the data information is transmitted through the terahertz wireless communication device 2, and the drone detection information is transmitted to the main control unit or display unit for further processing and utilization of the information.
[0158] In summary, the present invention is innovative in the field of drone detection. It provides an effective new method for continuously monitoring the state of the sky. The present invention can remember previously seen information well by learning long-term dependencies in time series data, thus avoiding the problem of gradient disappearance or explosion during back propagation, making the model easier to converge. Compared with many other models, it requires less computing resources and training time.
[0159] A UAV target detection system based on terahertz wireless communication, such as Figure 1 As shown, including,
[0160] UAV detection equipment 1, used to obtain image data within the detection range;
[0161] A terahertz wireless communication device 2, connected to the drone detection device 1, for transmitting image data and drone detection information via terahertz waves;
[0162] The image processing module 3 is connected to the drone detection device 1 through the terahertz wireless communication device 2, and is used to process the image data to obtain the drone detection information. The image processing module 3 includes:
[0163] The UAV detection neural network 4 is used to perform neural network processing based on the attention mechanism on the dynamic feature vector and the static feature vector of the image data, respectively, to obtain a processed dynamic feature vector and a processed static feature vector;
[0164] A splicing module 5, connected to the drone detection neural network 4, is used to splice the processed dynamic feature vector and the processed static feature vector to obtain a splicing vector;
[0165] The loss function unit 6 is connected to the splicing module 5 and is used to analyze and process the splicing vector to obtain the associated feature vector;
[0166] The first activation function layer 8 connected to the loss function unit 6 and the first fully connected layer 9 connected to the first activation function layer 8 are used to predict the associated feature vector and output the drone detection information.
[0167] In a specific embodiment, the present invention includes the following steps:
[0168] Step 1: Use external sights and other observation equipment to obtain image data within the detection range, and then send the image data to the image processing module 3 of the system's computing and processing equipment through the terahertz wireless communication device 2.
[0169] Step 2: In this example, the first drone is selected, and the drone ID is "1". The data is a (76+5, 3) matrix, where 76+5 is the sensor data (static + dynamic), and 3 represents time, parameter, and value. Then, the Parameter data of the first data is concatenated to obtain a total of 1,353,980 parameter values. Duplicate parameter values are removed to reduce redundant information, and 5+36 unique parameter values are obtained.
[0170] The data is divided into dynamic feature vectors and static feature vectors for processing.
[0171] The dynamic feature vector and static feature vector are processed separately, and the initial input feature vector size is (batch_sizes,s+d,t+).
[0172] Among them, batch_sizes is the size of the data set segmentation, s is the static feature length, d is the dynamic feature length, and t+ is the time series length.
[0173] (a) Dynamic feature vector
[0174] First, the dynamic feature vector (d, t+) is input into the second fully connected layer. The fully connected layer inputs a feature vector of length t+ and outputs a feature vector of length t. The result is the feature of (d, t). The replication factor is set to b, and the sensor dimension of the dynamic feature vector is replicated b times, resulting in a feature vector size of (d×b, t). The replicated feature vector is input into the second activation function layer and the discard layer to obtain the dynamic feature vector after preliminary processing, where the discard value of the discard layer is 0.2.
[0175] Secondly, the feature vector after the preliminary processing is input into the backbone network (GTN, Graph Transformer Network, GTN) of the present invention. The neural update propagation network can be used for feature extraction of the neural backbone network and encoding of the extracted features, which improves the effect of the attention mechanism structure on the extraction of image features, reduces the parameters of the model operation, and improves the operation speed. At the same time, the dynamic feature vector after preliminary processing of the backbone network input is copied in the second dimension and added as a separate node to make it conform to the feature processing method of the deformable attention module, thereby improving the input information redundancy and feature extraction capabilities.
[0176] After the attention module, the output is a two-dimensional vector of constant size. This two-dimensional vector is encoded using the position embedding method of sine and cosine to create a PE matrix. The order of time is marked to facilitate the encoding of multi-dimensional time series. The formula is:
[0177] PE (pos,2i) =sin(pos / 1000 2i / dim ), i∈(0,dim / 2)
[0178] PE (pos,2i+1) =cos(pos / 1000 (2i+1) / dim ), i∈(0,dim / 2)
[0179] Among them, PE represents a two-dimensional matrix, pos represents position information, dim represents dimension information of a two-dimensional vector, i represents position information of a two-dimensional vector, sin represents a sine function, and cos represents a cosine function;
[0180] Because Figure 3 The deformable attention encoder shown in Figure 1 has greatly reduced computational power by replicating the two-dimensional input vector to form a third dimension (t,d×b,c). At the same time, the MPCA attention method is used as the attention head, making the deformable attention encoder as follows: Figure 1 shown.
[0181] The input vector is copied into two copies, and the feature information under different indexes m is extracted (feature information of different scales at the same time t or feature information of the same scale at different times t). After pooling, convolution, and mean calculation of related weights, the point multiplication is finally performed with the full link relationship matrix of each initial information to complete the extraction of feature information from multiple scales and dimensions; the output of the deformable attention encoder is amplified in the third feature dimension, and the output vector size is N times that of the input, which improves the ability to extract information, and the output is a three-dimensional feature vector (t, d×b, c×N).
[0182] Then put the three-dimensional feature vector (t, d×b, c×N) output above into the residual decoder to realize the decoding analysis of the three-dimensional feature vector. The residual decoder network diagram is as follows: Fig. 9As shown, the input feature vector (t, d×b, c×N) is put into the first convolution layer 601 to obtain the first feature map, the first feature map is concatenated with the input feature vector and put into the second convolution layer to obtain the second feature map, the second feature map is concatenated with the first feature map and put into the third convolution layer to obtain the third feature map, the third feature map is concatenated with the second feature map and put into the fourth convolution layer to obtain the fourth feature map, and finally the feature length of the fourth feature map is reshaped to obtain the output result, which is the output of the residual decoder module. A convolutional neural network is used to decode and analyze the graph neural network encoding information. Due to the particularity of the data, the present invention changes the convolution kernel of size (3,3) to (1,1), so that the prediction network can more effectively utilize the encoding information. The input of the residual decoder is a three-dimensional feature vector, and the output is a two-dimensional feature vector (batch_sizes, t×d×b).
[0183] (b) Static feature vector
[0184] The size of the separated static feature vector is (batch_sizes, s), which is input into the third fully connected layer to copy the static feature vector, and the output result is (batch_sizes, d).
[0185] Step 3: Send the concatenated vector to the newly established loss function unit 6 to guide the relationship between the new feature vector and the locked target. Fig.11 As shown in the figure, the concatenated vector is sent to the pooling and graph feature weight function, the pooling result is passed through the first convolution layer to obtain the reconvolution result, and then it is re-activated by the softmax function to obtain the weight tilt parameter for three-dimensional result. At the same time, the two graph weight tilt parameters are multiplied with the result obtained by the graph feature weight function and the final sum is obtained for screening. The weight feature vector with a weight greater than the threshold 0.95 parameter is selected as the associated feature vector associated with the output result object.
[0186] Step 4: After the associated feature vector (batch_sizes, t×d×b+d) is input into the first activation function layer 8, it is input into the first fully connected layer 9 to obtain the prediction result.
[0187] Step 5: Data information is transmitted through the terahertz wireless communication device 2, and the drone detection information is transmitted to the main control unit or display unit for further processing and utilization of the information.
[0188] In summary, the present invention is innovative in the field of drone detection. It provides an effective new method for continuously monitoring the state of the sky. The present invention can remember previously seen information well by learning long-term dependencies in time series data, thus avoiding the problem of gradient disappearance or explosion during back propagation, making the model easier to converge. Compared with many other models, it requires less computing resources and training time.
[0189] The above description is only a preferred embodiment of the present invention, and does not limit the implementation mode and protection scope of the present invention. For those skilled in the art, it should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the description and illustrations of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting unmanned aerial vehicle targets based on terahertz wireless communication, characterized in that: include, Step S1, the drone detection device (1) acquires image data within the detection range and sends it to the image processing module (3) through the terahertz wireless communication device (2); Step S2, the image processing module (3) divides the image data into a dynamic feature vector and a static feature vector, and respectively inputs the dynamic feature vector and the static feature vector into the drone detection neural network (4) of the image processing module (3) for parallel processing using an attention mechanism; Step S3, concatenating the processed dynamic feature vector and the processed static feature vector to obtain a concatenated vector; Step S4, using the loss function unit (6) to analyze and process the concatenated vector to obtain a correlation feature vector; Step S5, inputting the associated feature vector into the first activation function layer (7) and the first fully connected layer (8), outputting drone detection information, and transmitting the drone detection information to the outside through the terahertz wireless communication device (2).
2. The method for detecting unmanned aerial vehicle targets based on terahertz wireless communication according to claim 1, characterized in that: In step S2, the method for processing the dynamic feature vector includes: Step S21, using a second fully connected layer to compress the time series length of the dynamic feature vector to a set length, copying the dynamic feature vector, and putting the copied dynamic feature vector into a second activation function layer and a discard layer for processing to obtain a dynamic feature vector after preliminary processing; Step S22, putting the preliminarily processed dynamic feature vector into an attention module, performing graph neural expansion on the preliminarily processed dynamic feature vector at each sampling moment, establishing a dynamic graph neural model to extract information from the graph model, and outputting a two-dimensional vector with the same size as the preliminarily processed dynamic feature vector; Step S23, creating a two-dimensional matrix by using the position encoding method of sine and cosine for the two-dimensional vector, and obtaining a two-dimensional feature vector with position information by passing the two-dimensional vector through the two-dimensional matrix; Step S24, putting the two-dimensional feature vector into a deformable attention encoder, the deformable attention encoder fuses the input two-dimensional feature vector at each scale and each time series, and outputs a three-dimensional feature vector after the size and dimension are expanded; Step S25, putting the three-dimensional feature vector into a residual decoder, performing decoding analysis on the three-dimensional feature vector, and outputting a two-dimensional processed dynamic feature vector.
3. The method for detecting unmanned aerial vehicle targets based on terahertz wireless communication according to claim 2, characterized in that: In step S22, the processing method of the attention module includes: Step S221, copying the input dynamic feature vector after preliminary processing to obtain a copy matrix; Step S222, performing average pooling twice on the copy matrix to obtain a first pooling result and a second pooling result respectively, and performing convolution to obtain feature information after the first convolution; Step S223, dimensionally adjusting the second pooling result, concatenating the second pooling result with the first pooling result, and convolving the concatenated result to obtain feature information after the second convolution; Step S224, performing nonlinear activation on the feature information after the second convolution, and multiplying the nonlinear activation result with the feature information after the first convolution to obtain a first multiplication result.
4. The method for detecting unmanned aerial vehicle targets based on terahertz wireless communication according to claim 3 is characterized in that: Step S22 also includes, Step S225, convolving the feature information after the second convolution and then splitting it into a first split feature and a second split feature, and convolving the nonlinear activation result and then splitting it into a third split feature and a fourth split feature; Step S226, multiplying the first split feature and the third split feature to obtain a second multiplication result, and multiplying the second split feature and the fourth split feature to obtain a second multiplication result; Step S227, performing a multiplication operation on the first multiplication result, the second multiplication result and the third multiplication result to output the two-dimensional vector.
5. The method for detecting unmanned aerial vehicle targets based on terahertz wireless communication according to claim 2, characterized in that: In step S23, the expression of the two-dimensional matrix is: ON (pos,2i) =sin(pos / 1000 2i / dim ),i∈(0,dim / 2) ON (pos,2i+1) =cos(pos / 1000 (2i+1) / dim ),i∈(0,dim / 2) Among them, PE represents the two-dimensional matrix, pos represents the position information, dim represents the dimension information of the two-dimensional vector, and i represents the position information of the two-dimensional vector.
6. The method for detecting unmanned aerial vehicle targets based on terahertz wireless communication according to claim 2, characterized in that: In step S24, the processing method of the deformable attention encoder includes: Step S241, amplifying the two-dimensional feature vector in a third dimension to obtain an amplified vector, and copying the amplified vector into two copies to obtain a first copy vector and a second copy vector; Step S242, extracting feature information under different indexes from the first replicated vector and the second replicated vector respectively, obtaining feature information of the first replicated vector and the second replicated vector at different scales at the same time or feature information of the first replicated vector and the second replicated vector at different times at the same scale, and outputting a first index vector and a second index vector; Step S243, putting the first index vectors into corresponding attention heads respectively, and outputting the first index vectors weighted by the attention mechanism; Step S244, multiply the first index vector and the second index vector weighted by the attention mechanism respectively, and integrate the multiplication results to output the three-dimensional feature vector.
7. The method for detecting unmanned aerial vehicle targets based on terahertz wireless communication according to claim 2, characterized in that: In step S25, the processing method of the residual decoder includes: Step S251, inputting the three-dimensional feature vector into the residual decoder, and the first convolution layer of the residual decoder convolves the three-dimensional feature vector to obtain a first feature map; Step S252, concatenating the first feature map with the input three-dimensional feature vector, and placing the convolution operation into the second convolution layer of the residual decoder to obtain a second feature map; Step S253, concatenating the second feature map with the first feature map, and placing the convolution operation into the third convolution layer of the residual decoder to obtain a third feature map; Step S254, concatenating the third feature map with the second feature map, and placing them into the fourth convolutional layer of the residual decoder for convolution to obtain a fourth feature map; Step S255, shaping the length of the fourth feature map, and outputting the processed dynamic feature vector.
8. The method for detecting unmanned aerial vehicle targets based on terahertz wireless communication according to claim 1, characterized in that: The method for processing the static feature vector in step S2 is to input the static feature vector into a third fully connected layer, copy the static feature vector, and obtain the processed static feature vector.
9. The method for detecting unmanned aerial vehicle targets based on terahertz wireless communication according to claim 1, characterized in that: In step S3, the processing method of the loss function unit (6) includes: Step S31, performing average pooling and convolution on the spliced vector, obtaining weight tilt parameters through a loss function, and performing group convolution on the spliced vector to obtain a group convolution result; Step S32, performing a dot multiplication on the grouped convolution result and the weight tilt parameter and calculating the sum to obtain a weight feature vector; Step S33, screening is performed, and the screened weight feature vector is used as the associated feature vector.
10. A UAV target detection system based on terahertz wireless communication, characterized in that: include, UAV detection equipment (1), used to obtain image data within the detection range; A terahertz wireless communication device (2), connected to the drone detection device (1), and used for transmitting the image data and drone detection information via terahertz waves; An image processing module (3) is connected to the drone detection device (1) via the terahertz wireless communication device (2) and is used to process the image data to obtain the drone detection information. The image processing module (3) comprises: A drone detection neural network (4) is used to perform neural network processing based on an attention mechanism on the dynamic feature vector and the static feature vector of the image data to obtain a processed dynamic feature vector and a processed static feature vector; A splicing module (5), connected to the drone detection neural network (4), is used to splice the processed dynamic feature vector and the processed static feature vector to obtain a splicing vector; A loss function unit (6), connected to the splicing module (5), is used to analyze and process the splicing vector to obtain a correlation feature vector; A first activation function layer (7) connected to the loss function unit (6) and a first fully connected layer (8) connected to the first activation function layer (7) are used to predict the associated feature vector and output the drone detection information.