## 3 System Design
### SM-TCNNET Model  
#### 3.2.1 Model Introduction  
Our proposed SM-TCNNET was mainly divided into two parts, which are a spatial module and a TCN module, and the residual module was a part of the TCN. The model structure diagram is shown in Figure 7:  
The first part is a spatial feature extraction module. Specifically, it takes time series data as input and applies techniques such as convolution, batch normalization, maximum pooling, and discard regularization to extract spatial features from the input data. These spatial features are contained in the output tensor, which will be used as the input of the next module for continuing the processing of the time series data. In this way, the network can pay more attention to the more important temporal features and ignore some irrelevant spatial features when performing subsequent convolution operations, thus improving the effectiveness and efficiency of the network.  
The second part is the TCN module, which is composed of three residual modules, a dilated convolutional kernel, and a 1D convolutional layer. In the loop, each residual module consists of a 1D convolutional layer with dilation rate, a dropout layer, a \(1\times 1\) convolutional layer, and a jump connection to add the output of the current layer to the output of the previous layer. The overall role of the TCN is to model the data in time, allowing the model to take into account the temporal characteristics of the input data. The one-dimensional convolutional layer helps the model to quickly capture the long-range dependencies of the input data. The residual module helps the model to better learn complex time-series relationships. In Figure 7, the input to the residual module is \(\hat{Z}^{(i-1)}\), which indicates the output of the previous layer. \(\hat{Z}^{(i)}\) denotes the output of the network at layer i. Each of its elements is a normalized version of \(\hat{Z}^{(i-1)}\), the output of the previous layer. The dilated convolution kernel is compared with the standard CNN in order to obtain the global information of the whole sequence, as shown in Figure 8. The standard CNN obtains a larger perceptual field by adding pooling layers, and there is definitely a problem of information loss after the pooling layers. Dilated convolution is used to inject voids into the standard convolution as a way to increase the perceptual field. The advantage of dilated convolution is that the perceptual field is increased without the loss of information  
Figure 7: Model structure diagram.  
from pooling, so that each convolutional output contains a larger range of information. Among them, the mathematical relationship of the dilated convolution kernel is as follows:  
\[F(s)=\sum_{i=0}^{k-1}f(i)\cdot X_{s-d\cdot i} \tag{4}\]  
where \(F(s)\) is the representation of the output signal in the frequency domain; \(k\) is the length of the convolution kernel; \(X\) is the representation of the input signal in the frequency domain; \(f(i)\) is the weight of the convolution kernel, indicating the value at the \(i\)th position of the convolution kernel when convolving with the input signal in the time domain; \(d\) is the hole rate, indicating how many input values are sampled every other time in the convolution operation; and \(s\) is the index of the position in the output signal, indicating which position of the output signal is computed in the frequency domain.  
The mathematical relationship of the residual blocks is as follows:  
\[output=Activation(x+f(x)) \tag{5}\]  
The residual concatenation represents the summation of the input tensor \(x\) and the tensor obtained by the convolution operation, and the nonlinear transformation by an activation function _Activation_, resulting in the output tensor \(output\).