## 2 Materials and Methods
### Model Building
#### 2.4.3 Construction of a Water Quality Prediction Model Based on the Informer Model  
The Informer model is a sequence prediction model that utilizes an autoregressive transformation mechanism [32]. It is primarily used for predicting time-series data. The main principles of this concept are outlined below. Its structure is shown in Figure 3.  
Figure 2: Structure of hidden layer in LSTM model.  
Autoregressive Transformation Mechanism: The Informer model initially takes the time-series data as input for autoregressive transformation. Autoregressive transformation involves partitioning the original time-series data into subsequences of a fixed length, denoted as L. This process effectively converts the time-series data into text data, resembling the historical data used in natural language processing (NLP) tasks. By employing this approach, the initial task of time-series prediction can be transformed into a prediction problem focused on forecasting the subsequent time step.  
Encoder-Decoder Structure: The Informer model employs an encoder-decoder structure to facilitate sequence prediction. Both the encoder and decoder components comprise multiple layers of self-attention mechanisms, fully connected layers, and regularization layers. The encoder and decoder are equipped with a cross-time-step interaction layer, which helps to capture the interdependencies among various time steps.  
The Informer model incorporates a self-attention mechanism to capture the interdependencies among various positions within the input sequence. The mechanism employed in this study involves the mapping of each position in the input sequence to a low-dimensional attention vector. Subsequently, the similarity between these attention vectors is calculated to determine the degree of correlation between different positions.  
Interaction Layer across Time Steps: The Informer model effectively captures the interdependencies between different time steps by incorporating an interaction layer across time steps. This layer computes the similarity between the attention vectors at the current time step and the attention vectors at previous time steps in order to generate a temporal association matrix. This facilitates the transfer and interaction of information across different time steps.  
The Informer model incorporates a multi-scale training approach to address prediction tasks across various temporal scales. By segregating the prediction problems based on distinct time scales, it is possible to achieve more precise capture of both long-term and short-term patterns in time-series data. In summary, the Informer model demonstrates its efficacy in effectively addressing the task of time-series data prediction.  
This is achieved through the utilization of various techniques, including autoregressive transformation; the use of an encoder-decoder structure, a self-attention mechanism, and a cross time-step interaction layer; and multi-scale training.  
In this paper, the optimal parameters were determined after numerous experiments. The parameter settings in this model are as follows: the implicit layer feature length is 624; the number of attention heads is 14; there are 6 and 4 encoder and decoder stacking layers, respectively; the pairwise Q sampling factor is set to 5; the dimension of the fully connected layer is 2048; the number of training rounds is 400; the batch size is 32; and the learning rate is 0.0001.  
Figure 3: An overview of the Informer model.