## 3 Methodology
### The Proposed CNN-ResBiGRUI Model
#### 3.4.2 Residual BiGRU Block  
Rather than relying solely on the convolution block for spatial feature extraction, activity identification is required due to the temporal aspect of human activities. It is crucial to take into account the entire activity sequence over time. RNNs offer beneficial traits in processing time-series data. However, as the time series lengthens, RNN models may encounter problems like gradient vanishing and loss of information.  
[PERSON] et al. [33] suggested LSTM, which, in contrast to basic RNNs, is a recurrent neural network that uses gates to efficiently preserve temporal information over extended periods of time. Furthermore, it surpasses basic RNNs in managing extended time series. However, it should be noted that behavioral data are subject to the effects of both previous and succeeding events.  
LSTM has demonstrated its ability to address the gradient vanishing challenge observed in RNNs, yet its utilization of memory cells increases memory usage. The GRU network introduced by [PERSON] et al. in 2014 [34] offers a novel approach within the realm of RNNs. Unlike LSTM, GRU does not include dedicated memory cells [35]. Instead, it features update and reset gates, which regulate the extent of modification for each hidden state, determining which information is retained and discarded. BiGRU, a variant of GRU, integrates both forward and backward information in its computation, enhancing time-series feature extraction by capturing bidirectional dependencies. Consequently, employing BiGRU networks to extract time-series features from behavioral data is a suitable strategy.  
The BiLSTM network excels in extracting time-series features but has constraints in capturing spatial details. Additionally, escalating the number of stacked layers exacerbates the challenge of vanishing gradients during training. To tackle this issue, [PERSON] et al. [36] introduced the ResNet residual network in 2016, boasting 152 layers and securing victory in the 2015 ILSVRC tournament. The formulation for each residual block is as follows:  
\[x^{i+1}=x^{i}+f(x^{i},W_{i}) \tag{2}\]  
The residual blocks are partitioned into two components, namely \(x^{i}\), which represents a direct mapping, and \(F(x^{i},W_{i})\), which represents the residual portion.  
In our investigation, we implemented a residual architecture similar to the one found in the coding segment of the transformer model. This residual structure, inspired by the BiGRU network, harnesses the benefits associated with this specific configuration. Moreover, the BiGRU network can integrate normalization techniques. Layer normalization (LN) [37], a normalization method applied in recurrent neural networks, offers distinct advantages over BN. LN operates similarly to BN and can be expressed mathematically as follows:  
\[\widehat{x}^{i}=\frac{x^{i}-E(x^{i})}{\sqrt{var(x^{i})}} \tag{3}\]  
where \(x^{i}\) denotes the input vector in the \(i\)-th dimension and \(\widehat{x}^{i}\) represents the output subsequent to LN.  
This research introduces a novel approach termed ResBiGRU, which integrates residual structure with layer normalization in a BiGRU network. This combination is visually shown in Figure 6. The feature information (y) could be defined as recursive:  
\[x^{f(i+1)}_{t}=LN(x^{f(i)}_{t}+GRU(x^{f(i)}_{t},W_{i})) \tag{4}\]  
\[x^{b(i+1)}_{t}=LN(x^{b(i)}_{t}+GRU(x^{b(i)}_{t},W_{i})) \tag{5}\]  
\[y_{t}=concat(x^{f}_{t},x^{b}_{t}) \tag{6}\]  
where \(LN\) denotes the normalization of layers. At the same time, the processing of input states in the GRU network is represented by \(GRU\). The \(t\)-th moment in the time series isdenoted by the subscript \(t\). The forward state is indicated by the superscript \(f\), the reverse state by \(b\), and the number of stacked layers by (\(i+1\)). The encoded information at time \(t\) (\(y_{t}\)) is generated by amalgamating the forward and backward states.