# Temperature Prediction of Chinese Cities Based on GCN-BiLSTM
## 3 Materials and Methods
### Methods  
#### 3.2.1 GCN Model  
GCN is an important branch of Graph Neural Networks (GNN), which is an extension of Convolutional Neural Networks (CNN) commonly used in image processing and graph data processing [22; 23]. GCN is essentially a spatial feature extractor that can extract the influence of other nodes on the target nodes through the construction of adjacency and degree matrices, combing with the feature matrix of the graph network. The GCN principle is to process a set of graph data with N nodes whose features form an N \(\times\) D-dimensional matrix \(X\), and the relationships between each node form an N \(\times\) N-dimensional adjacency matrix \(A\). Taking \(X\) and \(A\) as inputs, the propagation between layers is described in Equation (1). \[H^{(l+1)}=\sigma\Big{(}\tilde{D}^{-\frac{1}{2}}\tilde{A}\tilde{D}^{-\frac{1}{2 }}H^{(l)}W^{(l)}\Big{)} \tag{1}\]  
where \(\tilde{A}=A+\text{I}\) and I is the identity matrix. \(\tilde{D}\) is the degree matrix of \(\tilde{A}\), calculated by the formula \(\tilde{D}_{ii}=\sum_{j}\tilde{A}_{ii}\). \(H\) is the feature of each layer, and for the input layer, \(H\) is \(X\). \(\sigma\) is the nonlinear activation function, and \(W\) is the weight matrix. \(l\) is the number of propagation layers. In this research, \(l=2\). In our study, the GCN network model is built by taking Jiangsu Province as an example. According to whether the 13 prefecture-level cities are directly connected geographically, we determine whether there is an adjacency relationship between the two cities. For convenient descriptions, city names are replaced by numbers. The numbers correspond to the cities shown in Table 3. As shown in Figure 2a, Nanjing is adjacent to Zhenjiang and Changzhou, and not adjacent to Nantong. The adjacency network of each city in Jiangsu Province is extracted and depicted, as shown in Figure 2b. Figure 1: Data preprocessing process. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Number** & **City** & **Number** & **City** \\ \hline
1 & Suqian & 8 & Zhenjiang \\
2 & Xuzhou & 9 & Taizhou \\
3 & Lianyungang & 10 & Nantong \\
4 & Huai’an & 11 & Changzhou \\
5 & Yancheng & 12 & Wuxi \\
6 & Yangzhou & 13 & Suzhou \\
7 & Nanjing & & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Serial number of the city. According to Figure 2b, an adjacency relationship matrix is established based on whether the 13 cities in Jiangsu Province are adjacent in terms of geographical location. Among them, 1 means that two cities are adjacent, which will be taken into account when updating the meteorological factor data in each round; 0 means that two cities are not adjacent or are the same, which will not be taken into account when updating the data in each round. As a result, an adjacency matrix \(A\) can be constructed, as shown in Table 4.  
The degree matrix D is constructed as shown in Table 5:  
According to the data provided by the \"Table of Observation Data for Basic Meteorological Elements of China's Surface Meteorological Stations\" [21], the observation station data of 13 prefecture-level cities of Jiangsu Province were selected in our experiments. The station number, station name, latitude, longitude, altitude of the pressure sensor, and altitude of the observation site are shown in Table 6.  
For meteorological data with a graph structure, the spatial-temporal correlation in the meteorological data is extracted using graph convolution, that is, the correlations between the meteorological data of the surrounding sites and the temperature data of the target sites. As shown in Figure 3, with node 1 as the starting point of the GCN convolution operation, the meteorological information of adjacent nodes 2, 3, and 4, which are directly connected to node 1, can be extracted using first-order ChebNet graph convolution. Then, after the updated data are processed by the activation function, we perform the first-order ChebNet graph convolution again to extract the meteorological information of nodes 5 and 6, which are directly connected to nodes 2, 3, and 4.