# A Network Traffic Prediction Method for AIOps Based on TDA and Attention GRU
## 3 System Model
### TCAG Model  
In the existing models, TDA can extract stable and persistent topological features from data and transform the original data into a concise and effective feature expression; however, it may miss important information in the time dimension. CNN can extract the temporal and spatial characteristics of data and obtain important information on data in time and space dimensions, but it requires a deeper number of layers to present a more complete picture of the data. Therefore, in the TCAG model proposed in this study, the  
Figure 1: Simple complex diagram. advantages of the TDA and CNN were fully combined to express the topological and spatio-temporal features in the final feature set. Finally, the obtained feature set was used to train the attention GRU neural network, and an excellent prediction performance was obtained. As shown in Figure 2, the TCAG model consisted of four modules. The original data first entered the dimensionality reduction module, and the features with high correlation were screened through correlation analysis and the Granger causality test to reduce the data dimension. The dimension-reduced data were entered into the topology data analysis module, and four types of topology features were obtained through continuous homology, including continuous landscape, continuous entropy, topology vector, and distance matrix. In addition, the dimensionality reduction data will also enter the CNN module to obtain the panorama of the data in the spatiotemporal dimension through multiple convolution and pooling operations. Finally, the extracted topological features were connected with spatiotemporal features to train the GRU neural network to obtain the final prediction results. In addition, this study applied an attention mechanism to the output of each time step of the GRU to filter out inefficiency information and obtain more accurate prediction results [24]. For the extraction of topological features, the time series data is first embedded into three-dimensional point cloud data through Takens embedding, and then, the Vietoris rips complex is constructed, and continuous homology is carried out. The result of persistent homology is a series of birth- and death-point pairs in the topological structure. Through the analysis and calculation of the point set, the persistent landscape, persistent entropy, and distance matrix can be obtained based on the Euclidean, bottleneck, and Wasserstein  
Figure 2: TCAG model diagram. distances. The combination of these features is the final output of the module, which is a topological feature of the data. The detailed design of CNN module is shown in Figure 3, and the original data dimension are (719 \(\times\) 6 \(\times\) n). The module uses a filter with step size of 1 and dimension of (1 \(\times\) 3) and uses the \"samepadding\" to perform three convolution operations. The numbers of filters used are 16, 32, and 64, respectively. Using step size of 2 and dimension of (1 \(\times\) 2) performs a maximum pool operation for the filter. Finally, the tensor is expanded by a flattened operation and connected to two full connection layers to obtain the final output of the CNN module--the spatiotemporal characteristics of the data. To make better use of the extracted topological and spatio-temporal features and obtain more accurate prediction results, the attention GRU neural network model was used in this study. GRU is currently a popular time-series prediction model as it uses fewer parameters but can achieve the same prediction performance as LSTM in most scenarios [25; 26]. The best prediction effect was obtained in this study. To realize the early warning function of the TCAG framework, the dynamic threshold interval must be given according to the prediction results. Therefore, we designed a dynamic threshold setting mechanism, fully considering the influence of confidence and prediction step size on the threshold interval consulting about confidence intervals and naive forecast methods. Formula (2) shows the calculation of dynamic threshold interval.