## 4 CNN-GRU Neural Network Prediction-Assisted Positioning Method  
### CNN-GRU Model  
CNN is a commonly used multilayer feedforward neural network model [32], with its basic structure shown in Figure 3. A typical CNN includes an input layer, multiple alternating convolutional and pooling layers, and a fully connected layer. CNNs extract hidden topological features from data through layer-by-layer convolution and pooling operations, capturing the spatial characteristics of the input data with fewer parameters. The convolution operation efficiently extracts data feature parameters and reduces matrix dimensions, while the pooling layer reduces network parameters and computational complexity. Finally, the fully connected layer combines all local features. After the convolutional and pooling layers, a flattening layer is used to convert the data from multidimensional to one-dimensional, preparing it for connection to the GRU layer. The structure of a GRU is shown in Figure 4. The main variables include the hidden state information at the previous time step \(h_{t-1}\), the input state \(x_{t}\), and the current hidden state \(h_{t}\). There are also two gates: vector \(r_{t}\) corresponds to the reset gate, and vector \(Z_{t}\) corresponds to the update gate. The update gate controls how much of the previous information should be retained in the current state and how much new information from the current candidate hidden state should be introduced. The reset gate determines how much past information should be included in the current state computation. Figure 3: CNN basic structure. The specific computation formulas for the GRU can be expressed as follows [33]:  
\[Z_{t}=\sigma(W_{z}\cdot[h_{t-1},x_{t}]) \tag{27}\]  
\[r_{t}=\sigma(W_{r}\cdot[h_{t-1},x_{t}]) \tag{28}\]  
\[\widetilde{h}_{t}=\tanh(W_{h}\cdot[r_{t}\odot h_{t-1},x_{t}]) \tag{29}\]  
\[h_{t}=(1-Z_{t})\odot h_{t-1}+Z_{t}\odot\widetilde{h}_{t} \tag{30}\]  
In the formula, \(W_{r},W_{z},W_{h}\) refers to the weight matrices for the reset gate, update gate, and candidate hidden state, \(\sigma\) is the sigmoid function, and \(\tanh\) is the activation function. The CNN-GRU neural network model consists of a combination of CNN and GRU [34], as shown in Figure 5. Initially, a CNN layer is established to extract spatial features from motion sensor data. Following the CNN layer, a max pooling layer is added, which extracts primary features by selecting the maximum value within each pooling window, thereby reducing the spatial dimensions and size of the input feature map. This operation helps to reduce the number of model parameters and computational complexity, minimize the risk of overfitting, and enhance the model's computational efficiency. After the CNN module, a GRU layer is connected, using Flatten to spread out the features into a flat array linked to a fully connected layer. The CNN-GRU-assisted prediction model is used to output pseudo GNSS data, compensating for the accuracy of the integrated positioning system during interruptions. This solves the problem of the integrated positioning system degrading to a pure INS during GNSS outages. The training of the CNN-GRU combined neural network in this paper is primarily conducted in the following six steps:  
Figure 4: GRU basic structure. Figure 5: CNN-GRU model structure. Step 1: input acceleration, angular velocity, and velocity data into the convolutional neural network, perform convolution on the data separately, and then sum the data within each convolution channel to generate feature maps. Step 2: Feed the feature maps into a pooling layer and perform max pooling on the convoluted features, selecting the maximum value to reduce the feature dimensions. Then, transform the dimensions of the pooling layer's output and connect it to the GRU layer. Step 3: solve for the propagation parameters of each neuron and compute the values of vector \(Z_{t},r_{t},\hat{t}_{t},h_{t}\).