A network traffic matrix prediction method based on improved GAT and spatiotemporal features

By combining the improved graph attention network and time series network, the node attention is dynamically learned, which solves the problem of complex nonlinear spatial correlation in the network traffic matrix and achieves high-precision and real-time network traffic matrix prediction.

CN116668317BActive Publication Date: 2025-09-19SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310589084.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2025-09-19
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

Existing network traffic matrix prediction models are difficult to accurately capture the complex nonlinear spatial relationships in the network traffic matrix, and graph attention networks have shortcomings in learning the correlation between nodes.

Method used

An improved graph attention network (GAT) is introduced. It autonomously learns the attention scores between nodes, selects nodes with the same source and destination for calculation, and combines it with the time series network LSTM to dynamically adjust the node attention level and capture the complex nonlinear spatial correlation in the network traffic matrix.

Benefits of technology

The accuracy and real-time performance of network traffic matrix prediction are improved, the computational complexity is reduced, and the prediction effect is enhanced through the fusion of spatiotemporal features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116668317B_ABST
    Figure CN116668317B_ABST
Patent Text Reader

Abstract

The present invention discloses a network traffic matrix prediction method based on an improved GAT and spatiotemporal features, comprising: reading and parsing a network traffic matrix data file and constructing a network traffic data set; capturing the self-similarity of complex nonlinear traffic space based on an improved GAT network, using a time series network to capture the periodicity of network traffic, and finally fusing information in the time and space dimensions through a gating mechanism to perform a more accurate network traffic matrix prediction. The improved GAT network improves the attention calculation node selection mechanism and attention score calculation method of the traditional GAT network; in the attention calculation node selection mechanism, the same-source and same-destination nodes of the traffic matrix are selected for attention coefficient calculation; in the attention score calculation method, the attention score is autonomously learned by the model. The present invention solves the problem of low network traffic prediction accuracy and poor real-time performance of the spatiotemporal model caused by insufficient spatial correlation learning in network traffic prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network communications, and in particular to a network traffic matrix prediction method based on improved GAT and spatiotemporal features. Background Art

[0002] With the development of technologies such as 5G, edge computing, and NFV, refined, automated, and intelligent network operations and management will become new challenges. Meeting this challenge requires accurate awareness of application-level network traffic at multiple levels, including edge networks, metropolitan area networks, and backbone networks. Network traffic prediction is a key technology for this. Accurate network traffic prediction technology can achieve the following: 1. Improve communication network management. Accurate network traffic prediction can help operators proactively address impending congestion and proactively implement network expansion, adjustments, and optimization. 2. Accurate traffic prediction enables flexible resource allocation based on actual business needs. During off-peak hours, when network demand is low, some low-load base stations can be put into a dormant state to save energy. Base station coverage can be dynamically adjusted and activated during peak hours, thereby reducing base station energy consumption. 3. Network security needs can be met by promptly detecting abnormal network traffic and issuing real-time alerts to ensure network security.

[0003] Currently, many models have been proposed for network traffic forecasting, primarily categorized as linear and nonlinear models. Autoregressive (AR) models, moving average (AR) models, autoregressive moving average (ARMA) models, and autoregressive integrated moving average (ARIMA) models are all widely used linear models for traffic forecasting. However, these linear models fail to capture the nonlinear characteristics of network traffic. Nonlinear models primarily include time series forecasting models and spatiotemporal models. Widely used time series models include feedforward neural networks (FFNNs), deep belief networks (DBNs), and recurrent neural networks (RNNs). Due to the unstructured, nonlinear, real-time, bursty, and spatiotemporal nature of traffic data, a single neural network architecture is insufficient to meet actual traffic forecasting requirements. Spatiotemporal models that combine information from both temporal and spatial dimensions offer higher prediction accuracy. Commonly used spatiotemporal models include spatiotemporal graph convolutional networks (STGCNs) and spatiotemporal graph convolutional recurrent networks (SGCRNs).

[0004] Problems with existing technologies:

[0005] 1) In recent years, many time series models have been used to predict network traffic matrices. These models have good stability, few parameters, and high prediction accuracy. However, there is currently a lack of accurate, real-time, and reliable network models to learn the complex nonlinear spatial relationships in network traffic matrix data.

[0006] 2) The Graph Attention Network (GAT) concatenates the query and key, and then has a certain correlation with the attention coefficient obtained by the inner product with a shared attention parameter. This cannot well learn the highly complex nonlinear spatial correlation between nodes in the network traffic matrix.

[0007] Based on the above discussion, the invention of a network traffic matrix prediction method that meets high precision and good real-time performance has high practical application value. Summary of the Invention

[0008] The purpose of the present invention is to overcome the shortcomings and deficiencies of the existing technology and provide a network traffic matrix prediction method based on an improved GAT and spatiotemporal features. The present invention introduces a new self-attention mechanism for network traffic matrix prediction. In the process of calculating the attention coefficient, data with the same source or destination node are selected for calculation. On the other hand, the mechanism uses the model to independently learn the attention scores between adjacent nodes, rather than relying solely on shared attention parameters. The model can dynamically adjust the degree of attention between nodes, thereby better capturing the complex nonlinear spatial correlation in the network traffic matrix. This is of great significance for improving the performance of graph attention networks in traffic analysis and prediction tasks. The present invention can achieve high-precision prediction results while having good real-time performance.

[0009] To achieve the above objectives, the technical solution provided by the present invention is: a network traffic matrix prediction method based on improved GAT and spatiotemporal features, which is based on the improved GAT network to capture the self-similarity of complex nonlinear traffic space, uses the time series network LSTM to capture the periodicity of network traffic, and finally fuses information in the time and space dimensions through a gating mechanism to perform more accurate network traffic matrix prediction; the improved GAT network improves the attention calculation node selection mechanism and attention score calculation method of the traditional GAT network; wherein, the improvement of the attention calculation node selection mechanism is: selecting the same source and destination nodes of the traffic matrix to calculate the attention coefficient; the improvement of the attention score calculation method is: splicing the GAT network with the same query and different keys, and then replacing the attention score obtained by inner product with a shared attention parameter with the model's autonomous learning attention score;

[0010] The specific implementation of the network traffic matrix prediction method includes the following steps:

[0011] 1) Read and parse the network traffic matrix data file, generate a graph neighbor matrix based on the traffic matrix data, construct and normalize the data set, and then divide the normalized data set into a training set and a test set;

[0012] 2) The training set data is fed into the time series network LSTM for training to obtain the predicted value of the time series network; the training set data and the graph neighbor matrix are input into the node selection mechanism of the improved GAT network, and the same-source and same-destination nodes in the traffic matrix data are selected. The attention coefficients of the same-source and same-destination node data are then calculated respectively. Then, a gated fusion is used to obtain the predicted value of the improved GAT network in the spatial dimension. Finally, the predicted value of the time series network and the predicted value of the spatial dimension are input into another gated fusion mechanism to obtain a short-term traffic matrix predicted value. The short-term predicted network traffic value is compared with the actual traffic data, and the value of the loss function is calculated. After multiple iterations, the loss value is minimized to obtain the optimal network;

[0013] 3) Input the continuous historical time series data of length L in the test set into the trained optimal network to obtain a single traffic matrix prediction value. Assuming that the length of the network traffic prediction is P, P is decremented by one, and then P is judged. If P is not equal to 0, the last L-1 traffic matrix data of the historical time series and the short-term prediction traffic matrix data are spliced. Repeat the above process for multiple iterations until P is equal to 0.

[0014] Further, the step 1) includes the following steps:

[0015] 1.1) Loading a network traffic dataset: Loading a network traffic dataset from disk or the network. The network traffic dataset contains the network traffic data values ​​of a specific network link at each historical moment;

[0016] 1.2) Generate a graph neighbor matrix: Create an empty graph neighbor matrix with the same dimension as the flow matrix, traverse each node in the flow matrix, and for each node, check the nodes connected to it and set the value of the corresponding position of the neighbor node in the graph neighbor matrix to 1;

[0017] 1.3) Calculate the maximum and minimum traffic values ​​xmax and xmin in the network traffic dataset: Count all traffic data in the network traffic dataset and obtain the maximum and minimum values ​​for subsequent min-max normalization processing;

[0018] 1.4) Perform min-max normalization on the raw network traffic data: Based on the calculated maximum and minimum values, perform min-max normalization on the raw network traffic data so that the data range is between [0, 1], which facilitates subsequent processing and analysis;

[0019] 1.5) Dataset Partitioning: The normalized dataset is divided into a training set and a test set in a ratio of 7:3, where the time order of the samples in the training set and the test set is continuous.

[0020] Further, in step 2), the gated fusion uses a gated unit to fuse the two input values ​​and calculates the fused output value o=z*i1+(1-z)*i2, where the gated coefficient z∈[0,1] and the input values ​​are i1 and i2 respectively.

[0021] Furthermore, in step 2), the prediction value of the improved GAT network in the spatial dimension is obtained, including the following steps:

[0022] 2.1) Selecting nodes with the same source or destination: Based on the input traffic matrix and neighbor matrix, select nodes with the same source or destination. This data will be used to calculate the attention coefficient and predict the network traffic matrix.

[0023] 2.2) Calculate the homologous node attention coefficient: For the selected homologous nodes, use the self-learned homologous node attention score To calculate the homologous node attention coefficient, the homologous node attention score is normalized to obtain the homologous node attention coefficient of each node. The calculation formula of the homologous node attention coefficient is shown in (1.1):

[0024]

[0025] Where, Refers to the attention score of the kth homologous node data of the i-th row and j-th column of the traffic matrix to the predicted value of the i-th row and j-th column of the traffic matrix data. Refers to the attention score of the mth homologous node data of the i-th row and j-th column of the traffic matrix to the predicted value of the i-th row and j-th column of the traffic matrix data, α i,j,k Refers to the attention coefficient value of the kth homologous node data of the i-th row and j-th column data of the traffic matrix to the predicted value of the i-th row and j-th column of the traffic matrix data, N i is the directly connected neighbor node of node i, exp is the exponential function with the natural constant e as the base, and m is a variable in the neighbor node set of node i;

[0026] 2.3) Calculate the traffic matrix prediction value for the same-source node data: For each node, multiply the original normalized data of all its neighbors by the corresponding same-source node attention coefficient, and then perform a weighted sum of all products to obtain the traffic prediction value of the node for the same-source node data. The formula is shown in (1.2):

[0027]

[0028] Where, is the data in row i and column j of the traffic matrix for predicting the data of the same source node, The data of the i-th row and k-th column of the traffic matrix at the previous moment t-1 of the traffic matrix to be predicted;

[0029] 2.4) Calculate the attention coefficient of the same-destination node: For the selected same-destination nodes, use the self-learned same-destination node attention score To calculate the same-destination node attention coefficient, the same-destination node attention score is normalized to obtain the same-destination node attention coefficient of each node. The calculation formula of the same-destination node attention coefficient is shown in (1.3):

[0030]

[0031] Where, Refers to the attention score of the kth node data with the same destination as the data in the i-th row and j-th column of the traffic matrix to the predicted value in the i-th row and j-th column of the traffic matrix data. Refers to the attention score of the mth node data with the same destination in the i-th row and j-th column of the traffic matrix to the predicted value in the i-th row and j-th column of the traffic matrix data, β i,j,k Refers to the attention coefficient value of the kth node data with the same destination as the data in the i-th row and j-th column of the traffic matrix to the predicted value in the i-th row and j-th column of the traffic matrix data, N j is the directly connected neighbor node of node j;

[0032] 2.5) Calculate the traffic matrix prediction value for the same-destination node data: For each node, multiply the original normalized data of all its neighbors by the corresponding same-destination node attention coefficient, and then perform a weighted sum of all products to obtain the node's traffic prediction value for the destination node data. The formula is shown in (1.4):

[0033]

[0034] Where, is the data in row i and column j of the traffic matrix for predicting the data of the same destination node, The data of the kth row and jth column of the traffic matrix at the previous moment t-1 of the traffic matrix to be predicted;

[0035] 2.6) The traffic matrix prediction values ​​of the same source node data and the traffic matrix prediction values ​​of the same destination node data are fused through gating to obtain the traffic matrix predicted by the improved GAT network in the spatial dimension. The formula is shown in (1.5):

[0036]

[0037] Where, The data in the i-th row and j-th column of the traffic matrix is ​​used to improve the GAT network's prediction in the spatial dimension.

[0038] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0039] To fully utilize spatial features, this paper uses a graph attention network to process the spatial correlation of network traffic nodes. This model dynamically learns the weights of adjacent nodes, enabling it to more effectively learn spatial correlation information in the spatial dimension. Compared to GCN, which calculates the weights of adjacent nodes equally in graph structure calculations, this method achieves better network traffic prediction results.

[0040] 2. This paper proposes a new autonomous attention method for network traffic prediction. Its main function is to predict the traffic of adjacent nodes of the same source node and the same destination node respectively, and then fuse them through a gate. Compared with calculating the attention coefficient of the entire traffic matrix to predict the entire traffic matrix, the computational complexity is reduced by o(N 4 ) is reduced to o(N 2 ), where N is the number of nodes.

[0041] 3. Through the gating mechanism, the predicted values ​​of the time series network and the predicted values ​​in the spatial dimension are integrated to uniformly learn the spatiotemporal feature data, which can better learn the spatiotemporal characteristics of network traffic data, with higher prediction accuracy and stronger applicability. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is the overall architecture diagram of the method of the present invention. In the figure, the Temporal Block is the time series network LSTM, the Spatial Block is the improved GAT network, and Gated Fusion is the gating mechanism.

[0043] Figure 2 This is a flow chart of an embodiment of the present invention, where the time series network is an LSTM network.

[0044] Figure 3 This is an example diagram of the self-attention matrix for selecting nodes with the same source or destination according to an embodiment of the present invention.

[0045] Figure 4 This is a structural diagram of an embodiment of the present invention in which the same source nodes or the same destination nodes are predicted separately and then fused through a gating mechanism. In the figure, Gated Fusion is the gating mechanism.

[0046] Figure 5This is the short-term prediction effect of the first row and first column of the traffic matrix on the Geant dataset according to an embodiment of the present invention, where the dotted line is the predicted value and the solid line is the actual value. DETAILED DESCRIPTION

[0047] The present invention will be described in further detail below with reference to the embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0048] like Figures 1 to 5 As shown, this embodiment provides a network traffic matrix prediction method based on improved GAT and spatiotemporal features. The method is based on the improved GAT network to capture the self-similarity of complex nonlinear traffic space, uses the time series network LSTM to capture the periodicity of network traffic, and finally fuses the information in the time and space dimensions through the gating mechanism to perform more accurate network traffic matrix prediction; the improved GAT network improves the attention calculation node selection mechanism and attention score calculation method of the traditional GAT network; among them, the improvement of the attention calculation node selection mechanism is: select the same source and destination nodes of the traffic matrix to calculate the attention coefficient; the improvement of the attention score calculation method is: splicing the GAT network with the same query and different keys, and then replacing the attention score obtained by inner product with a shared attention parameter with the model's autonomous learning attention score.

[0049] The specific implementation of the network traffic matrix prediction method includes the following steps:

[0050] 1) Read and parse the network traffic matrix data file, generate a graph neighbor matrix based on the traffic matrix data, construct a data set and normalize it, and then divide the normalized data set into a training set and a test set, including the following steps:

[0051] 1.1) Loading the Geant network traffic dataset: Use Python's built-in csv module to read the XML file containing the Geant data, and assign the traffic matrix values ​​based on the corresponding values ​​of src and dst in the file;

[0052] 1.2) Generate graph neighbor matrix: Create an empty graph neighbor matrix with the same dimension as the flow matrix, traverse each node in the flow matrix, and for each node, check the nodes connected to it, and set the value of the corresponding position of the neighbor node in the graph neighbor matrix to 1;

[0053] 1.3) Use the numpy module to calculate the maximum flow rate xmax and minimum flow rate xmin in the Geant network flow dataset for subsequent min-max normalization processing;

[0054] 1.4) Perform min-max normalization on the raw network traffic data: By calculating the maximum and minimum values, the raw network traffic data is normalized to the range [0, 1] to facilitate subsequent processing and analysis;

[0055] 1.5) Dataset Partitioning: The normalized dataset is divided into a training set and a test set in a ratio of 7:3, where the time order of the samples in the training set and the test set is continuous.

[0056] 2) The data of the training set is fed into the time series network LSTM for training to obtain the predicted value of the time series network; the data of the training set and the graph neighbor matrix are input into the node selection mechanism of the improved GAT network, and the nodes with the same source and destination in the traffic matrix data are selected. The attention coefficients of the nodes with the same source and destination are calculated respectively, and then the predicted value of the improved GAT network in the spatial dimension is obtained through a gated fusion. Finally, the predicted value of the time series network and the predicted value of the spatial dimension are input into another gated fusion mechanism to obtain a short-term traffic matrix predicted value. The short-term predicted network traffic value is compared with the actual traffic data, and the value of the loss function is calculated. After multiple iterations, the loss value is minimized to obtain the optimal network.

[0057] Gated fusion uses a gating unit to fuse two input values. Its structure is as follows Figure 1 As shown in (b), the fused output value o = z*i1+(1-z)*i2 is calculated, where the gating coefficient z∈[0,1] and the input values ​​are i1 and i2 respectively;

[0058] Obtaining the predicted value of the improved GAT network in the spatial dimension includes the following steps:

[0059] 2.1) Selecting nodes with the same source or destination: Based on the input traffic matrix and neighbor matrix, select nodes with the same source or destination. These data will be used to calculate the attention coefficient and predict the network traffic matrix; Figure 3 For a 3×3 traffic matrix, select the self-attention matrix diagram of the same source or destination nodes. For example, the numbers 1, 2, and 3 in the traffic matrix are all the same source nodes, so their corresponding positions on the self-attention matrix diagram of the same source nodes are filled with dotted lines;

[0060] 2.2) Calculate the homologous node attention coefficient: For the selected homologous nodes, use the self-learned homologous node attention score To calculate the attention coefficient of its homologous node. That is, the homologous node attention score is normalized to obtain the homologous node attention coefficient of each node. The calculation formula of the homologous node attention coefficient is shown in (1.1):

[0061]

[0062] Where, Refers to the attention score of the kth homologous node data of the i-th row and j-th column of the traffic matrix to the predicted value of the i-th row and j-th column of the traffic matrix data. Refers to the attention score of the mth homologous node data of the i-th row and j-th column of the traffic matrix to the predicted value of the i-th row and j-th column of the traffic matrix data, α i,j,k Refers to the attention coefficient value of the kth homologous node data of the i-th row and j-th column data of the traffic matrix to the predicted value of the i-th row and j-th column of the traffic matrix data, N i is the directly connected neighbor node of node i, exp is the exponential function with the natural constant e as the base, and m is a variable in the neighbor node set of node i;

[0063] 2.3) Calculate the traffic matrix prediction value for the same-source node data: For each node, multiply the original normalized data of all its neighbors by the corresponding same-source node attention coefficient, and then perform weighted summation on all products to obtain the traffic prediction value of the node for the same-source node data, such as Figure 4 As shown, the formula is shown in (1.2):

[0064]

[0065] Where, is the data in row i and column j of the traffic matrix for predicting the data of the same source node, The data of the i-th row and k-th column of the traffic matrix at the previous moment t-1 of the traffic matrix to be predicted;

[0066] 2.4) Calculate the attention coefficient of the same-destination node: For the selected same-destination nodes, use the self-learned same-destination node attention score To calculate the same-destination node attention coefficient. That is, the same-destination node attention score is normalized to obtain the same-destination node attention coefficient of each node. The calculation formula of the same-destination node attention coefficient is shown in (1.3):

[0067]

[0068] Where, Refers to the attention score of the kth node data with the same destination as the data in the i-th row and j-th column of the traffic matrix to the predicted value in the i-th row and j-th column of the traffic matrix data. Refers to the attention score of the mth node data with the same destination in the i-th row and j-th column of the traffic matrix to the predicted value in the i-th row and j-th column of the traffic matrix data, β i,j,kRefers to the attention coefficient value of the kth node data with the same destination as the data in the i-th row and j-th column of the traffic matrix to the predicted value in the i-th row and j-th column of the traffic matrix data, N j is the directly connected neighbor node of node j;

[0069] 2.5) Calculate the traffic matrix prediction value for the same destination node data: For each node, multiply the original normalized data of all its neighbors by the corresponding same destination node attention coefficient, and then perform weighted summation on all products to obtain the traffic prediction value of the node for the destination node data. Figure 4 As shown, the calculation formula is shown in (1.4):

[0070]

[0071] Where, is the data in row i and column j of the traffic matrix for predicting the data of the same destination node, The data of the kth row and jth column of the traffic matrix at the previous moment t-1 of the traffic matrix to be predicted;

[0072] 2.6) The traffic matrix prediction value of the same source node data and the traffic matrix prediction value of the same destination node data are fused through gating to obtain the final traffic matrix prediction value, such as Figure 4 As shown, the formula is shown in (1.5):

[0073]

[0074] Where, The data in the i-th row and j-th column of the traffic matrix to improve the final prediction of the GAT network in the spatial dimension.

[0075] 3) Input the continuous historical time series data of length L in the test set into the trained optimal network to obtain a single traffic matrix prediction value. Assuming that the length of the network traffic prediction is P, P is decremented by one, and then P is judged. If P is not equal to 0, the last L-1 traffic matrix data of the historical time series and the short-term prediction traffic matrix data are spliced. Repeat the above process for multiple iterations until P is equal to 0.

[0076] The following details the experimental results of this experiment:

[0077] According to the final prediction results of the network, the mean absolute error (MAE), root mean square error (RMSE) and determination coefficient (R 2 ) and other indicators to evaluate the network traffic prediction accuracy and performance of this method.

[0078] The comparison results between traditional GAT and improved GAT are shown in Table 1 below.

[0079] Table 1

[0080]

[0081] The results in the table above show that the improved GAT reduces the RMSE and MAE error evaluation indicators by 15% and 18% respectively compared with the traditional GAT, indicating that the improved GAT has higher network traffic matrix prediction accuracy than the traditional GAT; 2 The performance of the improved GAT model is improved by 5.6%, indicating that the improved GAT model has better model performance. In terms of test time, the improved GAT consumes less time than the traditional GAT and has good real-time performance.

[0082] The comparison results of the spatiotemporal model combining the improved GAT and the time series model LSTM (hereinafter named LSTM-Improved GAT) with other algorithms are shown in Table 2 below.

[0083] Table 2

[0084]

[0085] The results in the table above show that the network traffic matrix prediction method based on improved GAT and spatiotemporal features is better than the traditional spatiotemporal model traffic prediction algorithm LSTM-FFNN, STGCN (Cheb), STGCN (1 st ), the network traffic matrix prediction method based on improved GAT and spatiotemporal features has obvious advantages in accuracy; compared with the latest widely used traffic prediction algorithm STGCN (Cheb), the RMSE and MAE error evaluation indicators are reduced by 5.9% and 2.3% respectively, and the R 2 The prediction time of the unit traffic matrix was reduced by 34%, which is very close to the test time of the LSTM-FFNN model. In general, the prediction accuracy of the present invention is higher and the real-time performance is better.

[0086] The short-term prediction effect of the first row and first column of the traffic matrix on the Geant dataset is as follows: Figure 5 As shown in the figure, the dotted line is the predicted value and the solid line is the true value. We can see that the predicted change trend is very similar to the true value trend, with a small error.

[0087] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.

Claims

1. A network traffic matrix prediction method based on improved GAT and spatiotemporal features, characterized by: The following steps are involved: 1) Read and parse the network traffic matrix data file, generate a graph neighbor matrix based on the traffic matrix data, construct and normalize the data set, and then divide the normalized data set into a training set and a test set; 2) Send the training set data to the time series network LSTM for training to obtain the predicted value of the time series network; The training set data and graph neighbor matrix are input into the node selection mechanism of the improved GAT network. The nodes with the same source and destination in the traffic matrix data are selected. The attention coefficients of the nodes with the same source and destination are calculated respectively. Then, a gated fusion is used to obtain the prediction value of the improved GAT network in the spatial dimension. Finally, the prediction value of the time series network and the prediction value of the spatial dimension are input into another gated fusion mechanism. Finally, a short-term traffic matrix prediction value is obtained. The short-term predicted network traffic value is compared with the actual traffic data, and the value of the loss function is calculated. After multiple iterations, the loss value is minimized to obtain the optimal network. 3) Input the continuous historical time series data of length L in the test set into the trained optimal network to obtain a single traffic matrix prediction value. Assuming that the length of the network traffic prediction is P, P is decremented by one, and then P is judged. If P is not equal to 0, the last L-1 traffic matrix data of the historical time series and the short-term prediction traffic matrix data are spliced. Repeat the above process for multiple iterations until P is equal to 0.

2. The network traffic matrix prediction method based on improved GAT and spatiotemporal features according to claim 1 is characterized in that: The step 1) comprises the following steps: 1.1) Loading a network traffic dataset: Loading a network traffic dataset from disk or the network. The network traffic dataset contains the network traffic data values ​​of a specific network link at each historical moment; 1.2) Generate a graph neighbor matrix: Create an empty graph neighbor matrix with the same dimension as the flow matrix, traverse each node in the flow matrix, and for each node, check the nodes connected to it and set the value of the corresponding position of the neighbor node in the graph neighbor matrix to 1; 1.3) Calculate the maximum and minimum traffic values ​​xmax and xmin in the network traffic dataset: Count all traffic data in the network traffic dataset and obtain the maximum and minimum values ​​for subsequent min-max normalization processing; 1.4) Perform min-max normalization on the raw network traffic data: Based on the calculated maximum and minimum values, perform min-max normalization on the raw network traffic data so that the data range is between [0, 1], which facilitates subsequent processing and analysis; 1.5) Dataset Partitioning: The normalized dataset is divided into a training set and a test set in a ratio of 7:3, where the time order of the samples in the training set and the test set is continuous.

3. The network traffic matrix prediction method based on improved GAT and spatiotemporal features according to claim 2 is characterized in that: In step 2), the gated fusion uses a gated unit to fuse the two input values ​​and calculates the fused output value o=z*i1+(1-z)*i2, where the gated coefficient z∈[0,1] and the input values ​​are i1 and i2 respectively.

4. The network traffic matrix prediction method based on improved GAT and spatiotemporal features according to claim 3 is characterized in that: In step 2), the prediction value of the improved GAT network in the spatial dimension is obtained, including the following steps: 2.1) Selecting nodes with the same source or destination: Based on the input traffic matrix and neighbor matrix, select nodes with the same source or destination. This data will be used to calculate the attention coefficient and predict the network traffic matrix. 2.2) Calculate the homologous node attention coefficient: For the selected homologous nodes, use the self-learned homologous node attention score To calculate the homologous node attention coefficient, the homologous node attention score is normalized to obtain the homologous node attention coefficient of each node. The calculation formula of the homologous node attention coefficient is shown in (1.1): Where, Refers to the attention score of the kth homologous node data of the i-th row and j-th column of the traffic matrix to the predicted value of the i-th row and j-th column of the traffic matrix data. Refers to the attention score of the mth homologous node data of the i-th row and j-th column of the traffic matrix to the predicted value of the i-th row and j-th column of the traffic matrix data, α i,j,k Refers to the attention coefficient value of the kth homologous node data of the i-th row and j-th column data of the traffic matrix to the predicted value of the i-th row and j-th column of the traffic matrix data, N i is the directly connected neighbor node of node i, exp is the exponential function with the natural constant e as the base, and m is a variable in the neighbor node set of node i; 2.3) Calculate the traffic matrix prediction value for the same-source node data: For each node, multiply the original normalized data of all its neighbors by the corresponding same-source node attention coefficient, and then perform a weighted sum of all products to obtain the traffic prediction value of the node for the same-source node data. The formula is shown in (1.2): Where, is the data in row i and column j of the traffic matrix for predicting the data of the same source node, The data of the i-th row and k-th column of the traffic matrix at the previous moment t-1 of the traffic matrix to be predicted; 2.4) Calculate the attention coefficient of the same-destination node: For the selected same-destination nodes, use the self-learned same-destination node attention score To calculate the same-destination node attention coefficient, the same-destination node attention score is normalized to obtain the same-destination node attention coefficient of each node. The calculation formula of the same-destination node attention coefficient is shown in (1.3): Where, Refers to the attention score of the kth node data with the same destination as the data in the i-th row and j-th column of the traffic matrix to the predicted value in the i-th row and j-th column of the traffic matrix data. Refers to the attention score of the mth node data with the same destination in the i-th row and j-th column of the traffic matrix to the predicted value in the i-th row and j-th column of the traffic matrix data, β i,j,k Refers to the attention coefficient value of the kth node data with the same destination as the data in the i-th row and j-th column of the traffic matrix to the predicted value in the i-th row and j-th column of the traffic matrix data, N j is the directly connected neighbor node of node j; 2.5) Calculate the traffic matrix prediction value for the same-destination node data: For each node, multiply the original normalized data of all its neighbors by the corresponding same-destination node attention coefficient, and then perform a weighted sum of all products to obtain the node's traffic prediction value for the destination node data. The formula is shown in (1.4): Where, is the data in row i and column j of the traffic matrix for predicting the data of the same destination node, The data of the kth row and jth column of the traffic matrix at the previous moment t-1 of the traffic matrix to be predicted; 2.6) The traffic matrix prediction values ​​of the same source node data and the traffic matrix prediction values ​​of the same destination node data are fused through gating to obtain the traffic matrix predicted by the improved GAT network in the spatial dimension. The formula is shown in (1.5): Where, The data in the i-th row and j-th column of the traffic matrix is ​​used to improve the GAT network's prediction in the spatial dimension.

Citation Information

Patent Citations

  • Convolutional network traffic flow prediction method based on space-time attention mechanism

    CN113450568A

  • Network traffic prediction method based on attention mechanism and graph convolutional neural network

    CN113852492A