Unmanned aerial vehicle flow prediction method and device
By adopting the ISSA-MHSA-TCN combined model in drone flow prediction, the problem of low accuracy of drone flow prediction in the prior art is solved, and more efficient nonlinear feature and long-term dependency modeling is achieved, and the prediction accuracy is improved.
Patent Information
- Application Number
- CN202510261296.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the accuracy of drone traffic prediction is not high, and it is difficult to capture complex nonlinear dynamic characteristics and long-term dependencies in time series.
The combined model based on ISSA-MHSA-TCN is used to predict drone traffic. By integrating the multi-head self-attention mechanism and strengthening the sparrow search algorithm, the hyperparameters of the TCN model are optimized, and the modeling ability of nonlinear features and long-term dependencies is enhanced.
It improves the accuracy of drone traffic prediction, can more effectively capture complex patterns and long-term dependencies in time series, and improves the accuracy of prediction results.
Smart Images

Figure CN119808835A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicles, and in particular to a method and device for predicting unmanned aerial vehicle traffic. Background Art
[0002] Drone traffic forecasting plays a key role in low-altitude airspace management. Accurate drone traffic forecasting is crucial to airspace management, enterprise development, investment planning and user experience, and is the core foundation for promoting the sustainable development of the drone industry.
[0003] Traditional drone traffic forecasting methods are time series analysis methods, such as the Autoregressive Integrated Moving Average Model (ARIMA) model and the Seasonal Autoregressive Integrated Moving Average Model (SARIMA) model, which are suitable for forecasting characteristic variables with trends and periodicity. However, it is difficult to capture the complex nonlinear dynamic characteristics in the time series and it is difficult to handle long-term dependent characteristics, resulting in low accuracy in drone traffic forecasting. Summary of the invention
[0004] The present invention provides a method and device for predicting drone traffic, which are used to solve the defect of low accuracy of drone traffic prediction in the prior art and improve the accuracy of drone traffic prediction.
[0005] The present invention provides a drone traffic prediction method, comprising: The historical drone traffic data is input into the trained ISSA-MHSA-TCN based combined model to obtain the drone traffic prediction data; Among them, the combined model based on ISSA-MHSA-TCN integrates the multi-head self-attention mechanism MHSA on the basis of the TCN model, and introduces the enhanced sparrow search algorithm ISSA to optimize the hyperparameters of the TCN model.
[0006] In some embodiments, the method further comprises: Inputting the drone traffic training sample into the TCN model to obtain the output value of the TCN model; Inputting the output value of the TCN model into the self-attention model to obtain the output value of the self-attention model; The output value of the self-attention model is input into the softmax function to obtain the training prediction value of the drone traffic.
[0007] In some embodiments, inputting the output value of the TCN model into the self-attention model to obtain the output value of the self-attention model includes: Performing nonlinear transformation on the output value of the TCN model to obtain a transformation value; The conversion values are trained and normalized using a softmax function to obtain an attention weight matrix; Based on the attention weight matrix, an output value of the self-attention model is obtained.
[0008] In some embodiments, the method further comprises: Constructing a fitness function based on the training prediction value of the drone traffic and the actual drone traffic value; Taking the fitness function reaching the minimum fitness value as the optimization goal, the hyperparameters of the TCN model are optimized based on the enhanced sparrow search algorithm.
[0009] In some embodiments, before inputting the drone traffic training sample into the TCN model to obtain the output value of the TCN model, the method further includes: Get the drone traffic dataset; Preprocessing the drone traffic data set; The preprocessed UAV traffic data set is reconstructed to obtain the UAV traffic training sample.
[0010] In some embodiments, the preprocessing includes a robust normalization process.
[0011] The present invention also provides a drone traffic prediction device, comprising: The first input module is used to input historical drone traffic data into the trained ISSA-MHSA-TCN based combined model to obtain drone traffic prediction data; Among them, the combined model based on ISSA-MHSA-TCN integrates the multi-head self-attention mechanism MHSA on the basis of the TCN model, and introduces the enhanced sparrow search algorithm ISSA to optimize the hyperparameters of the TCN model.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for predicting drone traffic as described above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for predicting the flow of unmanned aerial vehicles as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned drone traffic prediction methods.
[0015] The UAV traffic prediction method and device provided by the present invention predicts UAV traffic through a combined model based on ISSA-MHSA-TCN. The combined model based on ISSA-MHSA-TCN combines global search capability, adaptive characteristics, diversity guidance and the introduction of prior knowledge, which can effectively optimize parameter configuration, enhance the ability to capture nonlinear characteristics in time series and model long-term dependencies, thereby improving the accuracy of UAV traffic prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 This is one of the flow charts of the UAV traffic prediction method provided by the present invention; Figure 2 It is a schematic diagram of the structure of the neural unit of the TCN model; Figure 3 It is a schematic diagram of the structure of the self-attention model; Figure 4 This is the second flow chart of the UAV traffic prediction method provided by the present invention; Figure 5 It is a structural schematic diagram of the UAV traffic prediction device provided by the present invention; Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.
[0019] Figure 1 This is one of the flow charts of the UAV traffic prediction method provided by the present invention, such as Figure 1As shown, the present invention provides a method for predicting UAV traffic, comprising: Step 110, input the historical drone traffic data into the trained ISSA-MHSA-TCN-based combined model to obtain drone traffic prediction data; wherein, the ISSA-MHSA-TCN-based combined model integrates the multi-head self-attention mechanism MHSA on the basis of the TCN model, and introduces the enhanced sparrow search algorithm ISSA to optimize the hyperparameters of the TCN model.
[0020] Specifically, the Temporal Convolutional Network (TCN) model has significant advantages in efficiently processing time series data due to its good parallelization performance and ability to model long sequences. The Multi-Head Self-Attention (MHSA) mechanism can capture long-term dependencies and complex time series patterns in drone traffic data, enhancing its adaptability to dynamic changes. The Intensified Sparrow Search Algorithm (ISSA) effectively selects model parameters through a global optimization strategy, improving prediction accuracy.
[0021] Based on the TCN model, the multi-head self-attention mechanism MHSA is integrated, and then the enhanced sparrow search algorithm ISSA is introduced to optimize the hyperparameters of the TCN model (such as learning rate and the number of hidden layer neurons), thereby constructing a combined model based on ISSA-MHSA-TCN.
[0022] The historical drone traffic data is input into the trained ISSA-MHSA-TCN based combined model to obtain the drone traffic prediction data.
[0023] The ISSA-MHSA-TCN-based combined model can also integrate historical data, weather conditions, flight restrictions and other external factors to comprehensively improve the prediction capability. Through the ISSA-MHSA-TCN-based combined model, the differences in traffic patterns in different regions can be better adapted, helping airspace managers, drone operators and related stakeholders to scientifically plan airspace resources and ensure the safety and efficient operation of low-altitude airspace.
[0024] The UAV traffic prediction method provided by the present invention predicts UAV traffic through a combined model based on ISSA-MHSA-TCN. The combined model based on ISSA-MHSA-TCN combines global search capability, adaptive characteristics, diversity guidance and the introduction of prior knowledge, which can effectively optimize parameter configuration and enhance the ability to capture nonlinear characteristics in time series and model long-term dependencies, thereby improving the accuracy of UAV traffic prediction.
[0025] Figure 2 This is a schematic diagram of the structure of the neural unit of the TCN model. Figure 2 As shown in the figure, the TCN model neural unit includes a dilated causal convolution layer, a weight normalization layer, a ReLU function, and a Dropout layer. The dilated causal convolution layer combines causal convolution and dilated convolution.
[0026] The input of the neuron is divided into two paths. One path passes through the dilated causal convolution layer, weight normalization layer, ReLU function, Dropout layer, dilated causal convolution layer, weight normalization layer, ReLU function and Dropout layer in sequence; the other path passes through 1 The output of the 1st convolutional layer and the second Dropout layer are added as the output of the neuron.
[0027] In some embodiments, the drone traffic prediction method provided by the present invention further includes: Input the drone traffic training samples into the TCN model to obtain the output value of the TCN model at each time point; The output value of the TCN model at each time point is input into the self-attention model to obtain the output value of the self-attention model at each time point; The output values of the self-attention model at all time points are input into the softmax function to obtain the training prediction values of drone traffic.
[0028] Specifically, the multi-head self-attention mechanism MHSA is integrated on the basis of the TCN model, that is, the output of the TCN model is connected to the input of the self-attention model, and the output of the self-attention model is connected to the input of the softmax function, so as to construct the MHSA-TCN model.
[0029] The MHSA-TCN model processes the drone traffic training samples as follows: The drone traffic training sample is input into the TCN model to obtain the output value of the TCN model, and then the output value of the TCN model is input into the self-attention model to obtain the output value of the self-attention model.
[0030] The output value of the self-attention model is input into the softmax function to obtain the training prediction value of drone traffic. The specific expression is as follows:
[0031] in, Indicates The training prediction value of drone traffic at a time point, Represents the self-attention model in The weight corresponding to the output value at each time point, Represents the self-attention model in The output value at a time point, Represents the first bias vector.
[0032] The drone traffic prediction method provided by the present invention inputs the drone traffic training samples into the MHSA-TCN model to obtain the training prediction value of the drone traffic, which is conducive to the subsequent optimization of the MHSA-TCN model based on the training prediction value of the drone traffic.
[0033] In some embodiments, the output value of the TCN model is input into the self-attention model to obtain the output value of the self-attention model, including: Perform nonlinear transformation on the output value of the TCN model to obtain the transformation value; Train the conversion values and use the softmax function to normalize the trained conversion values to obtain the attention weight matrix; Based on the attention weight matrix, the output value of the self-attention model is obtained.
[0034] Specifically, after the output value of the TCN model is input into the self-attention model, the self-attention model performs a nonlinear transformation on the output value of the TCN model to obtain a transformation value. The specific expression is as follows:
[0035] in,
[0036] in, Indicates The conversion value at a time point, Indicates that the TCN model is The output value at a time point, Indicates that the TCN model is The weight corresponding to the output value at each time point, represents the second bias vector, represents the proportionality coefficient, , Indicates the last time point. Indicates The value of drones at a certain point in time.
[0037] The self-attention model trains the conversion value in order to break through the receptive field limitation of the TCN model. For drone traffic prediction, there is a pattern with a longer time span, emphasizing key time points (such as airspace control, task concentration, etc.). The softmax function is used to normalize the trained conversion value to obtain the attention weight matrix. The specific expression is as follows:
[0038] in, Indicates The attention weight matrix at each time point is Indicates The conversion value at each time point, with the superscript T indicating transposition.
[0039] Based on the attention weight matrix, the output value of the self-attention model is obtained. The specific expression is as follows:
[0040] in, Represents the self-attention model in The output value at a time point, Indicates The attention weight matrix at each time point is represents the first A hidden state.
[0041] Figure 3 It is a structural diagram of the self-attention model, such as Figure 3 As shown, and is the output value of the TCN model, where is the output value of the TCN model at the nth time point. The output value of the TCN model is input into the self-attention model. h1, h2, h3, h4 and hn are the hidden states of the self-attention model. hn is the nth hidden state of the self-attention model. , , , and is the attention weight matrix, is the attention weight matrix at the nth time point. The products of all attention weight matrices and the corresponding hidden states are accumulated to obtain the output value V of the self-attention model.
[0042] The drone traffic prediction method provided by the present invention performs nonlinear transformation on the output value of the TCN model, trains the transformation value, and uses the softmax function to normalize the trained transformation value to obtain an attention weight matrix. Based on the attention weight matrix, the output value of the self-attention model is obtained, which is conducive to the subsequent training prediction value of the drone traffic.
[0043] In some embodiments, the drone traffic prediction method provided by the present invention further includes: Based on the training prediction value of drone traffic and the actual drone traffic value, a fitness function is constructed; Taking the fitness function to achieve the minimum fitness value as the optimization goal, the hyperparameters of the TCN model are optimized based on the enhanced sparrow search algorithm.
[0044] Specifically, the root mean square error between the training prediction value of drone traffic and the actual drone traffic value is used as the fitness function. The specific expression is as follows:
[0045] in, represents the root mean square error, Indicated in The actual drone traffic value at a time point, Indicates The training prediction value of drone traffic at a time point, Represents the total number of drone traffic training samples.
[0046] The optimization goal is to achieve the minimum fitness value of the fitness function, and the hyperparameters of the TCN model are optimized based on the enhanced sparrow search algorithm. The specific process is as follows: Step 1: Initialize the sparrow population.
[0047] Step 2: According to the fitness value of individual sparrows, the sparrow population is divided into discoverers and followers, and the early warning ones are selected at the same time; Step 3: Iteratively update the positions of the discoverer, follower, and alerter.
[0048] Update the discoverer's position using the following formula:
[0049] in, Indicated in The iteration Only the discoverer (sparrow) is in the The location of the dimension, Indicated in The iteration Only the discoverer (sparrow) is in the The location of the dimension, It is dimensional optimization variables, , Indicates the number of current optimization parameters. Indicates the maximum number of iterations for the final optimization, which is a normal number. Indicates the warning value. Indicates the safety value. represents a random number that follows a normal distribution. Represents a 1×d matrix, and each element in the matrix is 1.
[0050] Update the follower's position using the following formula:
[0051] in, Indicated in The iteration Only followers (sparrows) are in the The location of the dimension, represents a random number that follows a normal distribution. Indicated in At the iteration, the discoverer (sparrow) is in The worst position of dimension, Indicated in The iteration Only followers (sparrows) are in the The location of the dimension, represents the total number of sparrows, Indicated in At the iteration, the discoverer (sparrow) is in The optimal position of the dimension, , A is a 1×d matrix, and the elements in the matrix are randomly 1 or -1. Represents a 1×d matrix, and each element in the matrix is 1.
[0052] Update the position of the alerter using the following formula:
[0053] in, Indicated in The iteration Only the early warning (sparrow) in the first The location of the dimension, Indicated in The global optimal position of the finder (sparrow) at the iteration; is the control parameter of the step size, Indicated in The iteration Only the discoverer (sparrow) is in the The location of the dimension, Indicated in The global worst position of the finder (sparrow) at the iteration, is the current fitness value of the sparrow individual; is the global minimum fitness value, is a random number, is the global highest fitness value; Represents the minimum constant.
[0054] Step 4: When the fitness function reaches the minimum fitness value, stop iterative updating. At this time, output the optimal position of the sparrow population, that is, the optimal value of the initial learning rate and the number of hidden layer neurons. Apply these optimal values to the TCN model to optimize the initial learning rate and the number of hidden layer neurons. This step is to ensure that the model finds the best hyperparameter configuration after a series of iterations to improve the prediction performance based on the MHSA-TCN model.
[0055] Figure 4 FIG. 2 is a flow chart of the method for predicting the flow of unmanned aerial vehicles provided by the present invention. Figure 4 As shown, the data set is divided into a training set and a test set. The MHSA-TCN model is trained according to the training set. Based on the parameters of ISSA, part of the data is selected from the training set to train the MHSA-TCN model. The fitness value is evaluated according to the training results to determine whether the fitness value converges.
[0056] When the fitness value does not converge, the ISSA algorithm is used to find the optimal parameters. The specific process is: according to the fitness function, the positions of the discoverer, follower and warning value are updated, mutation is performed according to the position update, and the parameters are updated according to the mutation results to obtain a new sparrow population.
[0057] When the fitness value converges, the parameters of the MHSA-TCN model are optimized, the MHSA-TCN model is tested using a test set, and the test results are analyzed.
[0058] The UAV traffic prediction method provided by the present invention constructs a fitness function based on the training prediction value of the UAV traffic and the actual UAV traffic value, takes the fitness function reaching the minimum fitness value as the optimization goal, optimizes the hyperparameters of the TCN model based on the enhanced sparrow search algorithm, and improves the prediction accuracy.
[0059] In some embodiments, before inputting the drone traffic training sample into the TCN model to obtain the output value of the TCN model, the method further includes: Get the drone traffic dataset; Preprocess the drone traffic dataset; The preprocessed drone traffic data set is reconstructed to obtain drone traffic training samples.
[0060] Specifically, a drone traffic data set is obtained from an open source platform (kaggle), and the drone traffic data set is preprocessed. The preprocessed drone traffic data set is reconstructed to obtain drone traffic training samples to meet the format requirements of the TCN model input.
[0061] In some embodiments, preprocessing includes a robust normalization process.
[0062] Specifically, the preprocessing of the drone traffic dataset includes: The first step is to clean the drone traffic data set and convert it into a sequence format for the TCN model.
[0063] The second step is to perform robust standardization, detect outliers and replace them through robust standardization. The formula for robust standardization is as follows:
[0064] in, Represents data after robust standardization. Represents the original data, Indicates taking The median of Indicates taking The interquartile range.
[0065] The drone traffic prediction method provided by the present invention is used to predict the drone traffic in the next week. In multiple verification samples, the predicted values of the samples are basically consistent with the true values. The experimental results are shown in Table 1. The MSE (mean square error) of the overall sample is 0.230, the root mean square error (RMSE) of the overall sample is about 0.480, the MAE (mean absolute error) of the overall sample is 0.362, and the MAPE (mean absolute percentage error) of the overall sample is 0.376. This proves that the combined model based on ISSA-MHSA-TCN has a high prediction accuracy for drone traffic.
[0066] Table 1 Experimental results
[0067] The drone traffic prediction device provided by the present invention is described below. The drone traffic prediction device described below and the drone traffic prediction method described above can be referenced to each other.
[0068] Figure 5 : is a schematic diagram of the structure of the drone traffic prediction device provided by the present invention. Figure 5 As shown, Figure 5 As shown, the present invention provides a drone traffic prediction device, comprising: The first input module 510 is used to input historical drone traffic data into the trained ISSA-MHSA-TCN based combined model to obtain drone traffic prediction data; Among them, the combined model based on ISSA-MHSA-TCN integrates the multi-head self-attention mechanism MHSA on the basis of the TCN model, and introduces the enhanced sparrow search algorithm ISSA to optimize the hyperparameters of the TCN model.
[0069] In some embodiments, the apparatus further comprises: A second input module is used to input the drone traffic training sample into the TCN model to obtain the output value of the TCN model; A third input module is used to input the output value of the TCN model into the self-attention model to obtain the output value of the self-attention model; The fourth input module is used to input the output value of the self-attention model into the softmax function to obtain the training prediction value of the drone traffic.
[0070] In some embodiments, the third input module includes: A conversion unit, used for performing nonlinear conversion on the output value of the TCN model to obtain a conversion value; A processing unit, used for training the conversion value and normalizing the trained conversion value using a softmax function to obtain an attention weight matrix; An acquisition unit is used to obtain an output value of the self-attention model based on the attention weight matrix.
[0071] In some embodiments, the apparatus further comprises: A construction module, for constructing a fitness function based on the training prediction value of the drone traffic and the actual drone traffic value; The optimization module is used to optimize the hyperparameters of the TCN model based on the enhanced sparrow search algorithm by taking the fitness function reaching a minimum fitness value as the optimization target.
[0072] In some embodiments, the apparatus further comprises: Acquisition module, used to obtain drone traffic data set; A preprocessing module, used for preprocessing the drone traffic data set; The data reconstruction module is used to reconstruct the preprocessed drone traffic data set to obtain the drone traffic training sample.
[0073] In some embodiments, the preprocessing includes a robust normalization process.
[0074] It should be noted here that the above-mentioned drone traffic prediction device provided by the present invention can implement all the method steps implemented by the above-mentioned method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.
[0075] Figure 6 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the drone traffic prediction method, which includes: inputting the historical drone traffic data into the trained ISSA-MHSA-TCN-based combined model to obtain the drone traffic prediction data; wherein the ISSA-MHSA-TCN-based combined model is based on the TCN model and integrates the multi-head self-attention mechanism MHSA, and introduces the enhanced sparrow search algorithm ISSA to optimize the hyperparameters of the TCN model.
[0076] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0077] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the drone traffic prediction method provided by the above methods, and the method includes: inputting historical drone traffic data into a trained ISSA-MHSA-TCN-based combined model to obtain drone traffic prediction data; wherein, the ISSA-MHSA-TCN-based combined model is based on the TCN model and integrates the multi-head self-attention mechanism MHSA, and introduces the enhanced sparrow search algorithm ISSA to optimize the hyperparameters of the TCN model.
[0078] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the drone traffic prediction method provided by the above-mentioned methods, the method comprising: inputting historical drone traffic data into a trained ISSA-MHSA-TCN-based combined model to obtain drone traffic prediction data; wherein, the ISSA-MHSA-TCN-based combined model integrates the multi-head self-attention mechanism MHSA on the basis of the TCN model, and introduces the enhanced sparrow search algorithm ISSA to optimize the hyperparameters of the TCN model.
[0079] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0080] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting drone traffic, characterized in that: include: The historical drone traffic data is input into the trained ISSA-MHSA-TCN based combined model to obtain the drone traffic prediction data; Among them, the combined model based on ISSA-MHSA-TCN integrates the multi-head self-attention mechanism MHSA on the basis of the TCN model, and introduces the enhanced sparrow search algorithm ISSA to optimize the hyperparameters of the TCN model.
2. The method for predicting drone traffic according to claim 1, characterized in that: The method further comprises: Inputting the drone traffic training sample into the TCN model to obtain the output value of the TCN model; Inputting the output value of the TCN model into the self-attention model to obtain the output value of the self-attention model; The output value of the self-attention model is input into the softmax function to obtain the training prediction value of the drone traffic.
3. The method for predicting drone traffic according to claim 2, characterized in that: The step of inputting the output value of the TCN model into the self-attention model to obtain the output value of the self-attention model includes: Performing nonlinear transformation on the output value of the TCN model to obtain a transformation value; The conversion values are trained and normalized using a softmax function to obtain an attention weight matrix; Based on the attention weight matrix, an output value of the self-attention model is obtained.
4. The method for predicting drone traffic according to claim 2, characterized in that: The method further comprises: Constructing a fitness function based on the training prediction value of the drone traffic and the actual drone traffic value; Taking the fitness function reaching the minimum fitness value as the optimization goal, the hyperparameters of the TCN model are optimized based on the enhanced sparrow search algorithm.
5. The method for predicting drone traffic according to claim 2, characterized in that: Before inputting the drone traffic training sample into the TCN model to obtain the output value of the TCN model, the method further includes: Get the drone traffic dataset; Preprocessing the drone traffic data set; The preprocessed UAV traffic data set is reconstructed to obtain the UAV traffic training sample.
6. The method for predicting drone traffic according to claim 5, characterized in that: The preprocessing includes robust normalization processing.
7. A drone traffic prediction device, characterized in that: include: The first input module is used to input historical drone traffic data into the trained ISSA-MHSA-TCN based combined model to obtain drone traffic prediction data; Among them, the combined model based on ISSA-MHSA-TCN integrates the multi-head self-attention mechanism MHSA on the basis of the TCN model, and introduces the enhanced sparrow search algorithm ISSA to optimize the hyperparameters of the TCN model.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the drone traffic prediction method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the drone traffic prediction method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the drone traffic prediction method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Short-term building load prediction method
CN117526294A
CPI prediction method based on SSA-TCN-AM combination model
CN117829894A
Traffic flow prediction method and system based on multi-factor causal fusion enhanced time sequence diagram convolutional network
CN118692231A
Method for predicting future traffic volume and energy consumption of unmanned aerial vehicles in traffic industry
CN119091401A