A software-defined network traffic prediction method based on two-stage attention mechanism

By introducing a two-stage attention mechanism in software-defined network traffic prediction, combining inter-flow and intra-flow attention mechanisms with a linear autoregressive method, the problem of insufficient capture of inter-flow relationships and long-term dependencies in existing methods is solved, achieving more efficient traffic prediction.

CN116155753BActive Publication Date: 2025-09-19TONGJI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211503918.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-28
Publication Date
2025-09-19
Estimated Expiration
2042-11-28

AI Technical Summary

Technical Problem

Existing software-defined network traffic prediction methods based on two-stage attention mechanism have difficulty in effectively capturing the inter-flow relationships and long-term dependencies in the traffic matrix, resulting in poor prediction results.

Method used

A two-stage attention mechanism is adopted, combining inter-stream adaptive feature extraction and temporal pattern attention in the encoding stage, and intra-stream long-term dependency capture in the decoding stage, combined with a linear autoregressive method for prediction. Adaptive feature extraction and long-term dependency capture are achieved through inter-stream and intra-stream attention mechanisms, and a linear autoregressive module is combined to handle local extreme changes.

Benefits of technology

The accuracy and stability of software-defined network traffic prediction are improved, especially in highly dynamic SDN traffic changes. It can effectively capture more relationships between and within features and improve prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116155753B_ABST
    Figure CN116155753B_ABST
Patent Text Reader

Abstract

The present invention discloses a software-defined network traffic prediction method based on a two-stage attention mechanism, which includes extracting adaptive features between flows; encoding the vectors after feature extraction in combination with LSTM in the encoding stage; capturing long-term dependencies within the flow based on the feature-extracted vectors in combination with a temporal attention method; predicting the nonlinear part based on the captured vectors in combination with LSTM in the decoding stage; performing linear prediction based on the feature-extracted vectors in combination with a linear autoregressive method; and calculating the final traffic prediction result of the target OD pair based on the prediction results of the nonlinear part and the linear part. The present invention has great advantages in dealing with highly dynamic SDN traffic changes. The inter-flow attention mechanism can realize adaptive feature extraction, the intra-flow attention mechanism can capture long-term dependencies, and the linear autoregressive module can enable the prediction method to still have good results under the condition of local extreme changes in highly dynamic SDN traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software-defined network traffic prediction, and in particular to a software-defined network traffic prediction method based on a two-stage attention mechanism. Background Art

[0002] Traffic forecasting is a crucial component of software-defined network (SDN) traffic engineering. This task aims to derive future traffic forecasts based on historical network traffic data. A traffic matrix, a form of network traffic data, represents the traffic flow between all source and destination node pairs within a network over a period of time. It is a crucial research topic in SDN traffic research. Accurate and timely traffic matrix forecasting plays a crucial role in avoiding network congestion. Two types of forecasting methods exist: traditional linear and nonlinear. Traditional linear methods employ methods such as the autoregressive moving average (ARIMA) to capture the linear characteristics of traffic data by calculating the relevant parameters of traffic time series. Nonlinear methods, on the other hand, typically employ methods such as long short-term memory networks (LSTMs) and gated recurrent units (GRUs) to capture long-term dependencies based on historical traffic information. Compared to traditional linear methods, nonlinear methods better capture long-term dependencies and high dynamics, resulting in better forecasts for unstable SDN traffic sequences.

[0003] In nonlinear traffic prediction methods, the key step is to capture more traffic features. As the length of traffic sequences increases, many current methods based on original LSTM and GRU gradually find it difficult to resolve the long-term dependencies of traffic. A more effective approach is to use the temporal attention mechanism (TAM) to highlight the role of certain key traffic information in the historical time window. However, the introduction of the temporal attention mechanism in this traffic prediction task is limited to intra-flow features, and how to reasonably capture more traffic features remains to be studied. Previous SDN traffic prediction methods have improved prediction results by introducing convolutional neural networks (CNNs) to capture the relationship between traffic flows at different source and destination nodes (ODs); some methods also divide the historical time window into different time units and introduce temporal attention mechanisms to capture intra-flow features of different seasonality. Recently, other fields, such as finance, environment, energy, and medicine, have combined attention mechanisms with LSTM to improve prediction performance in time series data prediction tasks. Some work employs a two-stage attention mechanism in the encoder-decoder model: In the encoding stage, an inter-feature attention mechanism is introduced before the LSTM to capture the interrelationships between different features. In the decoding stage, a temporal attention mechanism is introduced before the LSTM to capture the interrelationships between the hidden states obtained at different time steps in the encoding stage. This allows the prediction method to capture more inter-feature and intra-feature relationships simultaneously, thereby achieving adaptive feature extraction and resolving long-term dependencies. Therefore, for traffic matrix prediction problems, we can refer to research methods in other fields and introduce similar inter-feature attention mechanisms on top of the existing temporal attention mechanism to capture more inter-flow relationships, adapt to the long-term dependencies and high dynamics of SDN traffic, and thus improve prediction performance. Summary of the Invention

[0004] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of this application to avoid obscuring the purpose of this section, the abstract and the title of the invention, and such simplifications or omissions should not be used to limit the scope of the present invention.

[0005] In view of the above-mentioned problems existing in the existing software-defined network traffic prediction method based on the two-stage attention mechanism, the present invention is proposed.

[0006] Therefore, the purpose of the present invention is to provide a software-defined network traffic prediction method based on a two-stage attention mechanism.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: extracting inter-stream adaptive features;

[0008] The vector after feature extraction is encoded in combination with LSTM in the encoding stage;

[0009] Based on the feature vector extracted, the temporal attention method is combined to capture the long-term dependencies within the stream. Based on the captured vector, the LSTM in the decoding stage is combined to predict the nonlinear part.

[0010] According to the vector after feature extraction, linear prediction is performed in combination with the linear autoregression method;

[0011] According to the prediction results of the nonlinear part and the linear part, the final prediction result of the flow of the target OD pair is calculated.

[0012] As a preferred solution of the software-defined network traffic prediction method based on the two-stage attention mechanism of the present invention, wherein: extracting the adaptive features between flows includes:

[0013] According to the time series data of the original traffic matrix, the time pattern attention method is combined to perform inter-flow adaptive feature extraction. t-1 , X t-2 ,...,X t-T} As the input of the original LSTM, get the hidden state vector h of the current time step t-1 ;

[0014] Apply the i-th CNN filter C in the temporal pattern attention mechanism to the hidden state vector at each time step i , get the time pattern of each hidden state and the temporal pattern attention weight of the i-th temporal pattern And calculate the weighted hidden time pattern vector in time period t The formula is as follows:

[0015]

[0016] Among them, the time mode attention weight represents the i-th CNN filter C i The importance of the temporal pattern vector of the hidden state.

[0017] As a preferred solution of the software-defined network traffic prediction method based on the two-stage attention mechanism of the present invention, wherein: the encoding step includes:

[0018] Extract inter-stream adaptive features, obtain attention weights and temporal pattern vectors, and calculate weighted hidden state temporal pattern vectors.

[0019] The hidden state of the previous time encoding stage and the temporal pattern vector of the weighted hidden state As the input of the LSTM in the encoding stage, get the hidden state of the current time encoding stage

[0020] As a preferred solution of the software-defined network traffic prediction method based on the two-stage attention mechanism of the present invention, wherein: according to the hidden state of the previous time encoding stage and the hidden state of the decoding phase at the previous time step Calculate the in-stream attention weights of the hidden state As the importance of the u-th hidden state.

[0021] As a preferred solution of the software-defined network traffic prediction method based on the two-stage attention mechanism described in the present invention, wherein: the time attention weight The calculation formula is as follows:

[0022]

[0023]

[0024] in, is the hidden state of the decoding stage, T transposes the calculation symbol, W d is the training parameter, is the hidden state of the decoding phase at the previous time step, is the hidden state of the encoding stage at different time steps, b d is the bias term, the time attention weight Indicates the importance of the u-th hidden state in the decoding stage.

[0025] As a preferred solution of the software-defined network traffic prediction method based on the two-stage attention mechanism of the present invention, wherein: the decoding stage includes:

[0026] The attention weights obtained after capturing the long-term dependencies within the flow Calculate the context vector v with the hidden state vector of the encoding stage t , the formula is as follows:

[0027]

[0028] The traffic of the previous time period of the selected prediction target OD pair and the context vector v t As the input of LSTM in the decoding stage, the nonlinear part prediction result is obtained

[0029] As a preferred solution of the software-defined network traffic prediction method based on the two-stage attention mechanism of the present invention, wherein: the nonlinear part prediction result The formula is as follows:

[0030]

[0031] in, is the hidden state in the decoding stage, W N is the training parameter, b N is the bias term.

[0032] As a preferred solution of the software-defined network traffic prediction method based on the two-stage attention mechanism of the present invention, wherein: according to the vector after feature extraction, linear prediction is performed in combination with the linear autoregressive method, including:

[0033] The extracted vector includes the historical traffic size of the target OD pair in the original traffic matrix.

[0034] According to the specified autoregressive order T L And the corresponding number of previous target OD flow data, combined with the linear autoregressive method to calculate the linear part prediction results The calculation formula is as follows:

[0035]

[0036] in, and These are training parameters.

[0037] As a preferred solution of the software-defined network traffic prediction method based on the two-stage attention mechanism of the present invention, wherein: the target OD pair prediction result is obtained including:

[0038] According to the nonlinear part prediction result And the linear part prediction result The final prediction result is calculated using the weighted summation method

[0039] The final prediction result The calculation formula is as follows:

[0040]

[0041] in, and These are training parameters.

[0042] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

[0043] The beneficial effects of the present invention are as follows: it has great advantages in dealing with highly dynamic SDN traffic changes. Among them, the inter-flow attention mechanism can realize adaptive feature extraction, the intra-flow attention mechanism can capture long-term dependencies, and the linear autoregressive module can enable the prediction method to still have good results when highly dynamic SDN traffic undergoes local extreme changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort. Among them:

[0045] Figure 1 This is the framework and process diagram of the DTPTA-TMP method for SDN traffic prediction in Example 1 of the present invention.

[0046] Figure 2 This is a process diagram of the inter-stream attention module using the temporal pattern attention mechanism in Example 1 of the present invention.

[0047] Figure 3 This is a process diagram of the inter-stream attention and encoding stages in Example 1 of the present invention.

[0048] Figure 4 This is a process diagram of the in-stream attention and decoding stages in Example 1 of the present invention.

[0049] Figure 5 This is a process diagram of the linear autoregressive module in Example 1 of the present invention.

[0050] Figure 6 Graphs showing the experimental results based on the GEANT dataset and the comparative and ablation experiments with other baseline methods in Example 2 of the present invention.

[0051] Figure 7 Graphs showing the experimental results based on the Abilene dataset and comparative and ablation experiment results with other baseline methods in Example 2 of the present invention.

[0052] Figure 8 This is a partial flow prediction result diagram of the DTPTA-TMP method in Example 2 of the present invention on the GEANT dataset.

[0053] Figure 9 This is a diagram showing some flow rate prediction results of the DTPTA-TMP method on the Abilene dataset in Example 2 of the present invention. DETAILED DESCRIPTION

[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0055] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0056] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.

[0057] Furthermore, the present invention is described in detail with reference to schematic diagrams. For ease of illustration, when describing the embodiments of the present invention, cross-sectional views illustrating device structures may be partially enlarged and not to scale. Furthermore, the schematic diagrams are merely illustrative and should not limit the scope of protection of the present invention. Furthermore, in actual production, the three-dimensional dimensions of length, width, and depth should be included.

[0058] Example 1

[0059] Reference Figure 1 ,A software-defined network traffic prediction method based on a two-stage attention mechanism includes,

[0060] In order to more clearly illustrate the specific implementation method of the present invention, the following definitions are made:

[0061] Definition of SDN traffic matrix: Let there be N nodes in the SDN network. These N nodes can form source and destination node pairs in pairs, so there are N×N source and destination node pairs. The traffic size of all OD pairs in the network can form a traffic matrix The flow rate from source node p to destination node q can be expressed as x p,q Indicates that

[0062]

[0063] Definition of the traffic matrix prediction problem: Given the traffic matrix sequence of the previous t-1 time period, predict the traffic matrix X of the t time period t , and record the prediction result as

[0064] The prediction function is

[0065] In order to avoid excessive computational resources usage and reduced prediction performance due to a long sequence, the present invention adopts a sliding window method, using only T traffic matrices in the input data window and predicting the traffic y of each target OD pair separately. t , the prediction function is:

[0066]

[0067] S1: Extract inter-stream adaptive features. It should be noted that:

[0068] The time series of the original traffic matrix {X t-1 , X t-2 ,...,X t-T} as the input of the original LSTM to obtain the hidden state vector h of the current time step t-1 ; Use the i-th CNN filter C in the temporal pattern attention mechanism (TPA) i Process the hidden state vector at each time step to obtain the temporal pattern of each hidden state and the temporal pattern attention weight of the i-th temporal pattern Indicates the importance of the temporal pattern vector of the hidden state obtained by the i-th CNN filter.

[0069] Specifically, the time series in the time window T is used as the input of the original LSTM to obtain the hidden state h t-1 and cell state c t-1 , expressed as follows:

[0070] h t-1 , c t-1 =LSTM(h t-2 , c t-2 , X t-1 )

[0071] Introducing the temporal pattern attention method, using k CNN filters, applying the corresponding i-th filter to the hidden state vector of each time step Get the temporal pattern of each hidden state The expression is as follows:

[0072]

[0073] In the time period t, according to the temporal pattern of each hidden state The hidden state of EncoderLSTM and the temporal pattern of each hidden state As input, calculate the inter-stream attention weight of the i-th temporal pattern And calculate the weighted hidden state time pattern vector The formula is as follows:

[0074]

[0075] The inter-stream attention weights represents the importance of the hidden state temporal pattern obtained by the i-th CNN filter, It can be used as the input of EncoderLSTM in the encoding stage.

[0076] S2: Encode the vector after feature extraction in combination with LSTM in the encoding stage. It should be noted that:

[0077] The context vector v is calculated based on the attention weights obtained after capturing the long-term dependencies within the stream and the hidden state vector in the encoding stage. t ; The traffic volume and context vector of the previous time period of the selected prediction target OD pair are used as the input of LSTM in the decoding stage to obtain the prediction result of the nonlinear part

[0078] EncoderLSTM uses the original LSTM form to obtain the hidden state of the current time step encoding stage The formula is as follows:

[0079]

[0080] Since the input in EncoderLSTM It is a hidden state temporal pattern with inter-stream attention weights, so the encoding stage can achieve adaptive feature selection for different hidden states.

[0081] S3: Based on the vector after feature extraction, the temporal attention method is combined to capture the long-term dependencies within the stream. Based on the captured vector, the LSTM in the decoding stage is combined to predict the nonlinear part. It should be noted that:

[0082] The generated encoding stage hidden state Input into the in-stream attention mechanism using the temporal attention method to calculate the temporal attention weight The formula is as follows:

[0083]

[0084]

[0085] in, W d is the training parameter, is the hidden state of the decoding phase at the previous time step, is the hidden state of the encoding stage at different time steps, b dis the bias term, the temporal attention weight Indicates the importance of the u-th hidden state in the decoding stage.

[0086] Furthermore, the context vector is calculated using the attention weights and the hidden state of the encoding stage

[0087]

[0088] Furthermore, the traffic y of the previous time period of the predicted target OD pair t-1 and context vector v t-1 The hidden state of the current time step decoding stage can be obtained

[0089]

[0090]

[0091] in, is the training parameter, b is the bias term, and are the hidden state and cell state at the decoding stage of the previous time step, respectively.

[0092] Since the input of DecoderLSTM is obtained by the context vector with time attention Therefore, the decoding stage is better able to capture long-term dependencies.

[0093] Further, such as Figure 4 As shown, according to the hidden state of the current time step decoding stage and context vector v t , can get the nonlinear prediction results of the target OD to flow

[0094]

[0095] Among them, W N is the training parameter, b N is the bias term.

[0096] S3: Based on the feature vector extracted, linear prediction is performed in combination with the linear autoregressive method; based on the prediction results of the nonlinear part and the linear part, the final prediction result of the flow of the target OD pair is calculated. It should be noted that:

[0097] According to the specified autoregressive order T L And the corresponding number of previous target OD flow data, combined with the linear autoregressive method to calculate the linear part prediction results

[0098] Predict results based on previous nonlinear part And the linear part prediction results The weighted summation method is used to calculate the final prediction results of the software-defined network traffic prediction method based on the two-stage attention mechanism.

[0099]

[0100] In order to improve the prediction effect, the prediction results are decomposed into a nonlinear part and a linear part using the autoregressive method.

[0101] The prediction result of the linear part is recorded as

[0102]

[0103] Among them, T L is the autoregressive order of the linear prediction, is the training parameter, b L is the bias term.

[0104] like Figure 5 As shown, according to the nonlinear part in the above prediction results and the linear part The final prediction result of the target OD pair can be obtained

[0105]

[0106] in, and These are training parameters.

[0107] In summary, the SDN traffic prediction method based on the two-stage attention mechanism proposed in the present invention has great advantages over the existing commonly used traffic prediction methods in dealing with highly dynamic SDN traffic changes. Among them, the inter-flow attention mechanism designed by the present invention can realize adaptive feature extraction, the intra-flow attention mechanism can capture long-term dependencies, and the linear autoregressive module can enable the prediction method to still have good results when highly dynamic SDN traffic undergoes local extreme changes.

[0108] Example 2

[0109] Reference Figures 6 to 9 This embodiment is the second embodiment of the present invention. Different from the first embodiment, this embodiment provides a verification test of a software-defined network traffic prediction method based on a two-stage attention mechanism, and verifies and explains the technical effects adopted in this method.

[0110] Most traditional technical solutions only use methods such as linear regression, recurrent neural networks and temporal attention mechanisms. The prediction results in software-defined network traffic prediction tasks are difficult to meet the needs of traffic engineering.

[0111] Compared with traditional technical solutions, this method integrates multiple factors and takes into account the high dynamics, long-term dependence, and serial correlation characteristics of software-defined network traffic.

[0112] The method includes: adopting a temporal pattern attention method in the inter-stream attention mechanism before the encoding stage to achieve adaptive feature extraction; adopting a temporal attention method in the intra-stream attention mechanism before the decoding stage to resolve long-term dependencies; and introducing a linear autoregressive module to better cope with the highly dynamic traffic changes of the software-defined network when the software-defined network traffic undergoes local extreme changes.

[0113] This method performs traffic prediction in software-defined networks based on a two-stage attention mechanism and combines multi-angle time series prediction task indicators to improve the prediction effect.

[0114] In order to verify that this method has higher prediction performance than traditional methods, this embodiment uses the Pytorch machine learning framework to implement traditional time series prediction methods such as recurrent neural networks and traditional attention-related methods, and obtains traffic prediction results on the GEANT and Abilene traffic matrix datasets and compares them. The results are attached. Figures 6 to 9 shown.

[0115] Figure 6 The prediction effects of different baseline methods on the GEANT dataset were compared using RMSE as the benchmark. In experiments with three different horizons, our method DTPTA-TMP has certain advantages over other baseline methods.

[0116] Although the prediction performance of the DARNN method is similar to that of DTPTA-TMP when the horizon is 2, the prediction ability of DARNN is not stable in experiments with different horizons, and the RMSE of our DTPTA-TMP method does not improve with the increase of horizon.

[0117] Figure 7The prediction effects of different baseline methods on the Abilene dataset were compared using RMSE as the benchmark. Although the prediction effects of several methods were similar when the horizon was 1, the prediction effect of our DTPTA-TMP method was significantly better than other baseline methods when the horizon increased. At the same time, as the prediction time step gradually increased, the performance gap between the DTPTA-TMP-NL method, which removed the linear part, and the DTPTA-TMP method became increasingly obvious, verifying the effectiveness of the linear part in our method.

[0118] In this example, we selected OD23-22 and OD12-11 from the GEANT and Abilene datasets, respectively, and plotted some of the prediction results of our method when the horizon was 1, and compared them with the true values, as shown in the figure below. Figure 8 and Figure 9 As shown in the figure, it can be seen that the predicted result curve is very close to the real data curve, so the DTPTA-TMP method can effectively predict the SDN traffic situation.

[0119] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A software-defined network traffic prediction method based on a two-stage attention mechanism, characterized by: include, Based on the time series data of the original traffic matrix and the temporal pattern attention method, the adaptive features between flows are extracted to obtain the weighted hidden temporal pattern vector. The obtained weighted hidden time pattern vector is encoded in combination with the LSTM in the encoding stage to obtain the hidden state in the encoding stage; According to the hidden state of the encoding stage, the temporal attention method is combined to capture the long-term dependency in the stream to obtain the context vector, and then the nonlinear part is predicted based on the context vector in combination with the LSTM of the decoding stage; According to the historical flow data of the target OD pair in the original flow matrix, a linear prediction is performed in combination with a linear autoregressive method; According to the prediction results of the nonlinear part and the linear part, the final prediction result of the flow of the target OD pair is calculated.

2. The software-defined network traffic prediction method based on the two-stage attention mechanism according to claim 1 is characterized in that: Extraction of inter-stream adaptive features includes: According to the time series data of the original traffic matrix, the time pattern attention method is combined to perform inter-flow adaptive feature extraction. t-1 , X t-2 ,...,X t-T } As the input of the original LSTM, get the hidden state vector h of the current time step t-1 ; Apply the i-th CNN filter C in the temporal pattern attention mechanism to the hidden state vector at each time step i , get the time pattern of each hidden state and the temporal pattern attention weight of the i-th temporal pattern And calculate the weighted hidden time pattern vector in time period t The formula is as follows: Among them, the time mode attention weight represents the i-th CNN filter C i The importance of the temporal pattern vector of the hidden state.

3. The software-defined network traffic prediction method based on the two-stage attention mechanism according to claim 1 is characterized in that: The encoding step includes, Extract inter-stream adaptive features, obtain attention weights and temporal pattern vectors, and calculate weighted hidden state temporal pattern vectors. The hidden state of the previous time encoding stage and the temporal pattern vector of the weighted hidden state As the input of the LSTM in the encoding stage, get the hidden state of the current time encoding stage 4. The software-defined network traffic prediction method based on the two-stage attention mechanism according to claim 3 is characterized in that: According to the hidden state of the previous time encoding stage and the hidden state of the decoding phase at the previous time step Calculate the in-stream attention weights of the hidden state As the importance of the u-th hidden state.

5. The software-defined network traffic prediction method based on the two-stage attention mechanism according to claim 4 is characterized in that: The in-stream attention weights The calculation formula is as follows: in, is the hidden state in the decoding stage, W d is the training parameter, is the hidden state of the decoding phase at the previous time step, is the hidden state of the encoding stage at different time steps, b d is the bias term, the time attention weight Indicates the importance of the u-th hidden state in the decoding stage.

6. The software-defined network traffic prediction method based on the two-stage attention mechanism according to claim 1 or 5, characterized in that: The decoding stage includes, The attention weights obtained after capturing the long-term dependencies within the flow Calculate the context vector v with the hidden state vector of the encoding stage t , the formula is as follows: The traffic of the previous time period of the selected prediction target OD pair and the context vector v t As the input of LSTM in the decoding stage, the nonlinear part prediction result is obtained 7. The software-defined network traffic prediction method based on the two-stage attention mechanism according to claim 6, characterized in that: The nonlinear part predicts the result The formula is as follows: in, is the hidden state in the decoding stage, W N is the training parameter, b N is the bias term.

8. The software-defined network traffic prediction method based on the two-stage attention mechanism according to claim 1, characterized in that: According to the vector after feature extraction, linear prediction is performed in combination with the linear autoregression method, including: The extracted vector includes the historical traffic size of the target OD pair in the original traffic matrix. According to the specified autoregressive order T L And the corresponding number of previous target OD flow data, combined with the linear autoregressive method to calculate the linear part prediction results The calculation formula is as follows: in, and These are training parameters.

9. The software-defined network traffic prediction method based on the two-stage attention mechanism according to claim 7 or 8, characterized in that: The obtaining of the target OD pair prediction result includes: According to the nonlinear part prediction result And the linear part prediction result The final prediction result is calculated using the weighted summation method The final prediction result The calculation formula is as follows: in, and These are training parameters.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.