## 2 Introduction to the Network Model  
### Recurrent Neural Network Based on a GRU Gating Mechanism  
A recurrent neural network (RNN) is a neural network that contains a recurrent structure in a hidden layer. Through this connection, an RNN can store current input information, as well as previous time step information. Due to the sharing of RNN weights, if a sequence is long enough to multiply each output value of the previous hidden layer by the same weight during propagation, it will be difficult to pass information from an earlier time step to a later time step. It is easy to cause gradient disappearance and gradient explosion during propagation. In order to overcome this defect, long short-term memory (LSTM) was proposed by [PERSON] and [PERSON] in 1997 and has been widely used. The key of LSTM is the cell state and 'gate' structure. The LSTM hidden layer cell structure is composed of an input gate, a forgetting gate, and an output gate.  
A gated recurrent unit neural network, as proposed by [PERSON], is a variant of an LSTM. A GRU is a type of gating mechanism in an RNN. The purpose of a GRU is the same as an LSTM, and both to overcome the problem of gradient disappearance or the explosion of the RNN during propagation, retaining as much information as possible for long sequences. A GRU is as excellent as an LSTM in many sequence tasks, but its parameters are less than those of an LSTM and include only one \"reset gate\" and one \"update gate\". Therefore, a GRU model saves computation time and shows equally good results for some tasks. The \"update gate\" of a GRU replaces the forgetting gate and input gate of an LSTM. It merges the cell state and hidden state, which makes a GRU simpler than an LSTM model by these transformations. Figure 1 shows the internal structure of a GRU's basic neuron.  
\[r_{t}=\sigma(W_{r}[h_{t-1},x_{t}) \tag{1}\] \[\widetilde{h}_{t}=\tanh(W_{h}[r_{t}*h_{t-1},x_{t}])\] (2) \[z_{t}=\sigma(W_{z}[h_{t-1},x_{t}])\] (3) \[h_{t}=(1-z_{t})*h_{t-1}+z_{t}*\widetilde{h}_{t} \tag{4}\]  
Here, \(x_{t}\) is the input at the current moment, \(h_{t-1}\) is the hidden state at the previous moment, and \(h_{t}\) is the hidden state calculated at the current moment. When calculating the hidden state at the current moment, the model will first calculate a candidate state (\(\widetilde{h}_{t}\)). The value of the reset gate is taken into account when calculating the candidate states, and the formula for the reset gate is shown in (1). If the reset gate is close to 0, the current candidate ignores the previous hidden state and uses the current input to calculate it. This can effectively cause the hidden state to discard any irrelevant information found in the future. The candidate state calculation formula is shown in (2), where \(*\) represents the term-by-term multiplication. After the candidate values are calculated, the update gate controls how much information from the previous hidden state can be passed to the current hidden state. This is similar to the memory unit of an LSTM, which allows a GRU to remember long-term information. The update gate calculation formula is shown in (3). Finally, it is possible to calculate the hidden state at the current moment.