UAV attack prediction method and system based on bidirectional long short-term memory model

By using two-way long and short-term memory models and Transformer models in the drone system, we can detect and predict attack sequences, and solve the problem of weak attack detection capabilities in the drone system, achieving high accuracy and efficient attack prediction, significantly improving Information security of the drone system.

CN114710782BActive Publication Date: 2024-11-19XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210325872.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2024-11-19
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

When UAV systems face complex attack threats, the attack detection capabilities of the existing technology are weak, single types and low accuracy, making it difficult to effectively predict and defend attack behavior.

Method used

Using a drone attack prediction method based on bidirectional long and short-term memory model, the Transformer model and the bidirectional long and short-term memory model are trained by building log semantic vectors, combining the multi-head attention layer and the feedforward network layer to encode the log sequence vector and attack sequence. Prediction, realize detection of attack paths and positioning of abnormal points.

Benefits of technology

Improve the accuracy and real-timeness of attack detection, can accurately detect almost 100% of attacks in 15,000 sequences, and improve the accuracy of the prior art by 11.166%, significantly improving the information security of the drone system .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114710782B_ABST
    Figure CN114710782B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for predicting unmanned aerial vehicle attacks based on a bidirectional long short-term memory model. The bidirectional long short-term memory model is constructed, which includes a forward memory model and a backward memory model. The bidirectional long short-term memory model is bidirectionally trained using a log index. The log index of an attack sequence vector is predicted according to the trained bidirectional long short-term memory model. The forward memory model and the backward memory model output forward prediction results and backward prediction results of h time steps respectively. The average probability of each output label in the forward prediction result and the backward prediction result is calculated, and the probabilities are sorted in descending order. The log index with the largest probability is used as the abnormal point positioning prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of network security, and in particular relates to a method and system for predicting unmanned aerial vehicle attacks based on a bidirectional long short-term memory model, which can be used in the security protection of unmanned aerial vehicle systems. Background Art

[0002] Drones have entered people's lives from the military to the industrial field, and have also played an important role in the civilian field, bringing convenience to production and life in the fields of cruising, monitoring, aerial photography, agriculture, express delivery, power inspection and emergency rescue. Due to these mission requirements, drones need to collect, process and transmit a large amount of sensitive data, which makes drones an interesting target for attackers. Drones are widely used in situations involving national security and important property, and contain important state secrets. In recent years, drone safety accidents have occurred frequently. The safety of drone systems needs to be given high attention. It is urgent to build a drone attack prediction system so that drones can predict attack behaviors and take active defense to reduce the security risks of being attacked.

[0003] In the rich application scenarios of drones, increasingly complex systems have brought more system vulnerabilities. The large amount of data generated by attacks also makes attack analysis more difficult. Attacks on drones are generally characterized by flexible attack methods, novel attack technologies and strong concealment capabilities. Attacks on drones are mainly concentrated on drone communication links, drone Ad-hoc networks and sensors, and mainly include interference, eavesdropping, black holes, Dos attacks, etc.

[0004] In recent years, due to the huge losses caused by it, it is crucial to be able to predict the attacker's means. Therefore, it is a major challenge to grasp the attacker's strategy and predict the attack steps. How to effectively predict the attack steps reasonably and then detect the corresponding attacks is the key to the information security of drone systems. Summary of the invention

[0005] The purpose of the present invention is to propose a drone attack prediction method based on a bidirectional long short-term memory model in view of the confidentiality, sensitivity, volatility, and difficulty in protecting the data of drone systems, the extremely high importance of the information, and the urgent need for information security of drone systems, so as to overcome the shortcomings of the above-mentioned prior art and ensure the security of verification information.

[0006] The present invention is achieved through the following technical solutions:

[0007] A method for predicting drone attacks based on a bidirectional long short-term memory model includes the following steps:

[0008] Step 1: Train the encoder module of the Transformer model according to the constructed log semantic vector, and the trained encoder module outputs the log sequence vector;

[0009] Step 2: Based on the log sequence vector outputted in step 1, determine whether the log sequence vector is an attack sequence vector in combination with a binary classification function;

[0010] Step 3: construct a bidirectional long short-term memory model, which includes a forward memory model and a backward memory model, and use log index to perform bidirectional training on the bidirectional long short-term memory model;

[0011] The log index of the attack sequence vector is predicted according to the trained bidirectional long short-term memory model. The forward memory model and the backward memory model output the forward prediction results and the backward prediction results of h time steps respectively. The average probability of each output label in the forward prediction results and the backward prediction results is calculated, and the probabilities are sorted in descending order. The log index with the largest probability is used as the anomaly location prediction result.

[0012] Preferably, the encoder module of the Transformer model in step 1 includes a multi-head attention layer and a feedforward network layer, the feedforward network layer is composed of two layers of ReLU activation layers, and the training method of the encoder module of the Transformer model is as follows:

[0013] Obtain the log semantic vector set of the UAV system and determine the importance of each log semantic vector;

[0014] Determine the output headh ​​of the multi-head attention layer according to the importance of each log semantic vector;

[0015] The output headh ​​of the multi-head attention layer is passed through two layers of ReLU activation layers and the overall output log sequence vector Fi of the feedforward network layer.

[0016] Preferably, the output headh ​​of the multi-head attention layer is expressed as follows:

[0017]

[0018] Preferably, the method for determining whether the log sequence vector is an attack sequence vector in step 2 is as follows:

[0019] Determine the fixed length log sequence vector R L The mean

[0020] Calculate the mean of the log sequence vector based on the binary classification function The attack probability is used to determine whether the log sequence vector is an attack sequence vector.

[0021] Preferably, the expression of the binary classification function is as follows:

[0022] Among them, θ is the parameter and x is the independent variable;

[0023] When the attack probability is greater than the set value, the log sequence vector is an attack sequence, and when the attack probability is less than the set value, the log sequence vector is a non-attack sequence vector.

[0024] Preferably, the training method of the bidirectional long short-term memory model is as follows:

[0025] A training data set is constructed by using the log constant domain as the log index, and the forward memory model is forward trained using the training data set, and the backward memory model is backward trained using the training data set;

[0026] Given a window size h, the probability distribution P and output label corresponding to the output log index of the trained forward memory model and the backward memory model.

[0027] Preferably, the step 3 further includes the following steps:

[0028] According to the probability distribution of the output labels of the outlier location prediction results, it is determined whether there is a concurrent relationship between the output labels.

[0029] A system for a UAV attack prediction method based on a bidirectional long short-term memory model. When the system is running, it is used to execute the UAV attack prediction method based on the bidirectional long short-term memory model.

[0030] Compared with the prior art, the present invention has the following beneficial technical effects:

[0031] The drone attack prediction method based on the bidirectional long short-term memory model provided by the present invention uses system logs to detect threats and predict attack paths, mainly solving the problems of weak attack detection capabilities, single types, and low accuracy in the prior art. The Transformer model is used to model the semantic information of the drone system log to detect the attack sequence. On the other hand, a bidirectional long short-term memory model is innovatively designed based on the long short-term memory network to perform more accurate bidirectional predictions on the attack path, thereby locating abnormal points and achieving better performance than the traditional BiLSTM. The present invention innovatively uses the long short-term memory model to propose a bidirectional model. Unlike the traditional BiLSTM, which only performs bidirectional predictions based on the same sequence, more information is provided through sequences of multiple time steps, thereby improving the prediction accuracy. Almost 100% of the attacks can be accurately detected in more than 15,000 sequences; in terms of prediction-based abnormal point location, it can also improve the accuracy of the prior art by 11.166%, successfully solving the target problem.

[0032] Furthermore, an attack graph is constructed based on previously detected attack sequences and predicted paths to show the attacker's attack path. This is completely completed by the UAV system communication network, protecting the privacy of the data and meeting the security requirements of the network. It can be used for attack prediction and fixed-point monitoring of abnormal points of UAV system information. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a flow chart of the implementation of the present invention;

[0034] Figure 2 is a flow chart of attack prediction and detection steps in the present invention;

[0035] Figure 3 It is an experimental model that uses the bidirectional long short-term memory model to predict sequences. DETAILED DESCRIPTION

[0036] The present invention will be further described in detail below in conjunction with the accompanying drawings, which are intended to explain the present invention rather than to limit it.

[0037] See also Figure 1-3 ,A UAV attack prediction method based on a bidirectional long short term memory model includes the following steps:

[0038] Step 1: Train the encoder module of the Transformer model based on the constructed log semantic vector. The trained encoder module is used to convert the log semantic vector into a log sequence vector output.

[0039] The encoder module in the Transformer model consists of a multi-head attention layer and a feed-forward network layer (FFN). The feed-forward network layer consists of two layers of ReLU activation layers. The training method of the encoder module is as follows:

[0040] S1.1. Obtain the drone system log, delete the variables in the drone system log and extract the log constant domain, namely the log template, and then vectorize the log template, that is, map the log template to a vector in a specific word vector set, so as to obtain a complete drone system log semantic vector.

[0041] S1.2. First, the log semantic vector X is input into the encoder, and the log semantic vector is multiplied by the set matrix to obtain the query vector, key vector and value vector.

[0042] Where X∈R n*d , n represents the length of the semantic vector, and d represents the dimension of each log semantic vector. In order to calculate the attention of each vector Xi (i = 1, 2, 3..., n) in the sequence, three vectors are created, namely the query vector Q, the key vector K, and the value vector V of each vector Xi. Using W Q ∈Rd*q , W k ∈R d*k , W V ∈R d*v Represents the parameter matrix, q, k, v represent the dimensions of the query vector, key vector, and value vector respectively. The log semantic vector X is multiplied by the three matrices to calculate the query vector, key vector, and value vector, as shown below:

[0043] Q=X*W Q

[0044] K=X*W k

[0045] V=X*W V

[0046] S1.3. Determine the importance Zi of each log semantic vector based on the query vector, key vector and value vector.

[0047] For the log semantic vector Xi (i = 1, 2, 3..., n), use Xj (j ≠ i) to score Xi through the dot product of K and Q to determine the importance of Xi, represented by Zi, as shown below:

[0048] Z i =Q i *K T

[0049] S1.4. Divide the importance Zi by And use the SoftMax activation function in the encoder to normalize all scores. According to the normalized results Determine the attention of the h-th head of the encoder module.

[0050] The normalized result Multiply by the hth value vector weight V h , get the attention of the hth head. In this embodiment, the Transformer model uses twelve attention heads, which are concatenated and multiplied by W0 as the output headh ​​of the multi-head attention layer, where W0 is a trainable parameter for the concatenation operation. The calculation is as follows:

[0051]

[0052] S1.5. Pass the output headh ​​of the multi-head attention layer through two layers of ReLU activation layers and the overall output log sequence vector Fi of the feedforward network layer (FFN). The expression of Fi is as follows:

[0053] Fi=max(0,ziW1+b1)W2+b2

[0054] Among them, W1, W2, b1, b2 are trainable parameters in the feedforward network layer.

[0055] At this point, the encoder module training of the complete Transformer model is completed.

[0056] Step 2: Obtain the log sequence vector of the drone system according to the encoder module of the Transformer model trained in step 1, and determine whether the log sequence vector is an attack sequence vector in combination with the binary classification function.

[0057] Obtain the drone system log, delete the variable statements in the drone system log, extract the log constant domain, i.e., the log template, and map the log template through the pre-trained word vector set. OOV words are words that do not appear in the word vector set. When mapping the OOV words in the log template, these words will be replaced with useless tags. After the mapping, the word vector is obtained, and the obtained word vector is input into the encoder module of the Transformer, which outputs the vector of a single log statement. The vectors of consecutive log statements are input into the encoder module of the Transformer trained in step 1 again to obtain the corresponding log sequence vector.

[0058] S2.1. When performing new log detection, the new log semantic vector is input into the encoder of the trained Transformer model, and the output log sequence vector, R L = {R l1 ,R l2 ,...,R lm}, where R lm is the vector representation of the mth log statement.

[0059] S2.2. Determine the fixed-length log sequence vector R L The mean

[0060] S2.3. Calculate the mean of the log sequence vector based on the binary classification function The attack probability is used to determine whether the log sequence vector is an attack sequence vector.

[0061] The expression of the binary classification function is as follows:

[0062]

[0063] Among them, θ is the parameter and x is the independent variable.

[0064] When the attack probability is greater than 0.5, the log sequence vector is an attack sequence, and when the attack probability is less than 0.5, the log sequence vector is a non-attack sequence vector.

[0065] Step 3: Build a bidirectional long short-term memory model and use log indexing to perform bidirectional training on it.

[0066] The bidirectional long short-term memory model consists of a forward memory model and a backward memory model. The model needs to continuously update the probability distribution of the output label to complete the model training. The training method is as follows:

[0067] S3.1. Extract the log constant field in step S1.1 as the log index to construct a training data set, input each log index in the training data set into the forward memory model for forward training; then input each log index in the training data set into the backward memory model for backward training.

[0068] Given a window size h, the probability distribution P and output label corresponding to the output index of the trained forward memory model and the backward memory model.

[0069] Given a log index χ of length h, the SoftMax function outputs the output label k of the next time step predicted by the current log index i The probability distribution P.

[0070] P=(χ t =k i |x t-h ,x t-(h-1) ,x t-1 )

[0071] Among them, k i is the next predicted event, and h is the length of the input sequence.

[0072] Suppose a small portion of the training dataset is as follows:

[0073] {χ1,χ6,χ3,χ5,χ 10 , χ 19 , χ 15 , χ2, χ 26 ,χ1,χ5,χ8};

[0074] Given a window size of h=10, the input sequence and output label of the forward memory model are:

[0075] {χ1, χ6, χ3, χ5, χ 10 , χ 19 , χ 15 , χ2, χ 26 , χ1→χ5}

[0076] {χ6,χ3,χ5,χ 10 , χ 19 , χ 15 , χ2, χ 26 , χ1, χ5→χ8}

[0077] The forward memory model is trained in the same way as the backward memory model.

[0078] Step 4: Perform online outlier location prediction on the attack sequence based on the trained bidirectional long short-term memory model.

[0079] When predicting the log index of the attack sequence vector, the forward and backward long short-term memory models are used to calculate the forward and backward probability distributions, and the average probability of the two is calculated. After sorting the average probabilities, the output labels of the first few log indexes with the highest probability are selected as the final anomaly location prediction results. We can verify whether the actual event appears in the first n predictions. If not, the prediction is wrong. At this time, the new model can be adjusted based on the manual report of the wrong prediction. Through the online update strategy, the model can adapt to the new mode of the attacker's erratic intrusion.

[0080] S4.1. Input the log index into the forward memory model and output the predicted output label and its probability distribution for the next time step. The set of output labels predicted by the forward memory model is f e , f p Then, f e Each output label in is added to the log index, and the forward model is used to predict the next h time steps to obtain the forward prediction results of h time steps.

[0081] S4.2. Input the log index to the backward memory model to obtain a set of output labels b predicted by the backward model. e and its probability distribution set b p , then, the output label set b e Each output label in is added to the log index, and the backward model is used to predict the next h time steps to obtain the backward prediction results of h time steps.

[0082] S4.3. Based on the forward prediction results and the backward prediction results, calculate the average probability of each output label in the prediction results, sort the probabilities in descending order, and use the log index with the largest probability as the outlier location prediction result.

[0083] Step 5: Determine whether the output labels are concurrent based on the probability distribution of the output labels of the prediction results. The specific steps are as follows:

[0084] S5.1. Assume that the number of indexes in a specific prediction is n (n>1). Initially assume that the output labels are all in a concurrent relationship. Then make a prediction for at least n time steps backward. According to the predicted probability distribution, determine whether the initial log index is in a concurrent relationship. The predicted label with the highest probability is the anomaly location result. The remaining labels with a probability not equal to 0 are in a concurrent relationship.

[0085] In each prediction step, branches are constructed according to the predicted labels and probability distribution, and labels with an average probability of 0, branches with a reduced average probability, and branches containing predicted labels that have never appeared before are deleted.

[0086] After n steps, the convergence point of all branches can be obtained in the nth step, that is, the label corresponding to the predicted result with the highest probability in step 4. At the same time, branches with lower probabilities have concurrent relationships, and the first step predicted labels of these branches are judged as concurrent indexes, and the attack graph is constructed.

[0087] The following example illustrates whether there is a concurrent relationship between output tags.

[0088] Assume that the window h size of the bidirectional LSTM model is 3. We give the predicted output label and probability distribution of the sequence {x1→x6→x3} as {x13:0.3,x7:0.4,x4:0.2,x5:0.1}, n=4. It may contain multiple events, so we need to determine whether the events are concurrent. We regard the above predicted probability distribution as the first prediction, and then we need to make at least four steps backward prediction.

[0089] First, we construct branches based on the index and its corresponding prediction results, and make a second prediction. After the trained model, in the second prediction stage, the prediction result of the next time step of the sequence {x6→x3→x13} is {x7:0.5,x4:0.2,x5:0.3}, the prediction result of the next time step of the sequence {x6→x3→x7} is {x4:0.4,x13:0.6}, the prediction result of the next time step of the sequence {x6→x3→x4} is {x5:0.3,x7:0.6,x13:0.1}, and the prediction result of the next time step of the sequence {x6→x3→x5} is {x13:0.9,x9:0.1}. It can be noted that the index x9 does not appear in the previous prediction output label, so we delete the node x5 and its associated edge {x5→x9}. By observation, we can find that the output label that appeared in the first two predictions is {x13,x7,x4,x5}. We can calculate that their probability distributions at the second time step are {0.5, 0.54, 0.314, 0.375}, which are all greater than their respective probabilities in the first time step.

[0090] So far, we have obtained the initial concurrent indexes {x13, x7, x4, x5} to be judged. Because there are four initial indexes, we need to make at least two more predictions based on the first two time steps. Therefore, we performed similar operations. The probability distribution of the initial index is calculated to be {x13: 1, x7: 0.678, x4: 0.775, x5: 0}. We can observe that the probability of the initial indexes has increased except for x5. Therefore, the log index containing x5 is deleted.

[0091] Next, we perform the last step of prediction and find that all branches converge to index x5. Finally, we know that the concurrent index is {x13,x7,x4} and we determine that index x5 is the convergence point.

[0092] The criteria for determining concurrent events include the following four items:

[0093] (1) The concurrent events at a given index must appear separately in each of the subsequent n-step forecasts.

[0094] (2) When the predicted label of a time step in the index is the same as the label of the previous time step, the label probability should be considered as 0 when calculating the probability distribution of the predicted label at this step.

[0095] (3) The probability distribution of a predicted label should be increasing in the log index. If not, the branch containing this label is deleted.

[0096] (4) The index labels that meet the above three steps need to converge to the same event in their respective indexes at the predicted nth time step.

[0097] Compared with the prior art, the present invention has the following advantages.

[0098] 1. High timeliness of attack detection

[0099] The drone attack prediction method based on the bidirectional long short-term memory model of the present invention is based on the system log and uses deep learning related technologies to innovatively detect attacks and locate abnormal points based on prediction, effectively ensuring the security of communication and the need for attack detection in the drone system, and ensuring its real-time and accuracy. In order to prevent the malicious behavior of attackers and reduce the losses of users to the greatest extent, the present invention requires the system to feedback information to users in a timely manner during attack detection. The Transformer model proposed in this paper can not only achieve nearly 100% detection, but also reduce the time cost by about 2 / 3 compared with other latest technologies, and can incrementally update the model according to the feedback of analysts based on whether the attack actually occurred during the operation of the system, and timely adapt to the latest attack mode. Therefore, it is avoided that the attack detection time is too long, and when the user receives the abnormal state warning, he has been attacked, causing irreparable losses.

[0100] 2. High prediction accuracy

[0101] This invention innovatively uses the long short-term memory model to propose a bidirectional model. Unlike the traditional BiLSTM, which only performs bidirectional prediction based on the same sequence, it provides more information through sequences of multiple time steps, thereby improving the prediction accuracy. The model implemented in this paper can accurately detect almost 100% of attacks in more than 15,000 sequences; in terms of prediction-based anomaly location, it can also improve the accuracy of existing technologies by 11.166%, successfully solving the target problem.

[0102] 3. Good attack detection reliability

[0103] The system log records the status information of the system, including hardware, software and system problems, and can also monitor the time when the system occurs. Users can use it to check the cause of the error or find traces left by the attacker when attacked. The data recorded in it can reflect the health status of the system in real time during operation. Although the attacker's strategy is changeable, most attacks have a fixed "process". Through this method, historical attack data can be learned and anomaly detection can be performed on real-time logs. If the log data is abnormal, an abnormal warning can be issued to the user in time, thereby improving the reliability of attack detection and providing users with a safe network environment.

[0104] 4. Good applicability of attack detection

[0105] The attack detection part of the model proposed in the present invention mainly adopts the method of extracting the semantic information of the log statement, and represents the log as a semantic vector. Therefore, although the logs of different systems have different structures, when they are in the same operating state, they will present similar semantic vectors. In this case, the attack detection method proposed by the DDR model does not depend on a specific platform, that is, the logs of different systems can be detected based on the model learned from the logs of one system. This not only enhances the robustness and applicability of the model, but also overcomes the disadvantage of insufficient training samples due to the scarcity of attack samples in the real world.

[0106] The above contents are only for explaining the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. A UAV attack prediction method based on bidirectional long short-term memory model, It is characterized in that The following steps are involved: Step 1: Train the encoder module of the Transformer model according to the constructed log semantic vector, and the trained encoder module outputs the log sequence vector; The encoder module of the Transformer model includes a multi-head attention layer and a feedforward network layer. The feedforward network layer is composed of two layers of ReLU activation layers. The training method of the encoder module of the Transformer model is as follows: Obtain the log semantic vector set of the UAV system and determine the importance of each log semantic vector; Determine the output headh ​​of the multi-head attention layer according to the importance of each log semantic vector; The output headh ​​of the multi-head attention layer is passed through two layers of ReLU activation layers, and the overall output log sequence vector Fi of the feedforward network layer; The expression of the output headh ​​of the multi-head attention layer is as follows: Where Q is the query vector, k is the key vector, h is the hth attention head, and V h is the weight of the h-th value vector, d represents the dimension of each log semantic vector, and T represents the transpose of the matrix; Step 2: Based on the log sequence vector outputted in step 1, determine whether the log sequence vector is an attack sequence vector in combination with a binary classification function; The method for determining whether a log sequence vector is an attack sequence vector is as follows: Determine the fixed length log sequence vector R L The mean Calculate the mean of the log sequence vector based on the binary classification function The attack probability is used to determine whether the log sequence vector is an attack sequence vector; Step 3: construct a bidirectional long short-term memory model, which includes a forward memory model and a backward memory model, and use log index to perform bidirectional training on the bidirectional long short-term memory model; The log index of the attack sequence vector is predicted based on the trained bidirectional long short-term memory model. The forward memory model and the backward memory model output the forward prediction results and the backward prediction results of h time steps respectively. The average probability of each output label in the forward prediction results and the backward prediction results is calculated, and the probabilities are sorted in descending order. The log index with the largest probability is used as the anomaly location prediction result. The training method of the bidirectional long short-term memory model is as follows: A training data set is constructed by using the log constant domain as a log index, and the forward memory model is forward trained using the training data set, and the backward memory model is backward trained using the training data set; Given a window size h, the probability distribution P and output label corresponding to the output log index of the trained forward memory model and the backward memory model.

2. According to claim 1, a method for predicting drone attacks based on a bidirectional long short-term memory model, It is characterized in that The expression of the binary classification function is as follows: Among them, θ is the parameter and x is the independent variable; When the attack probability is greater than the set value, the log sequence vector is an attack sequence, and when the attack probability is less than the set value, the log sequence vector is a non-attack sequence vector.

3. According to claim 1, a method for predicting drone attacks based on a bidirectional long short-term memory model, It is characterized in that After step 3, the following steps are also included: According to the probability distribution of the output labels of the outlier location prediction results, it is determined whether there is a concurrent relationship between the output labels.

4. A system for predicting drone attacks based on a bidirectional long short-term memory model. It is characterized in that When the system is running, it is used to execute the drone attack prediction method based on the bidirectional long short-term memory model described in any one of claims 1-3.