## 2 Materials and Methods
### LSTM Recurrent Neural Network  
The traditional recurrent neural network (RNN) can pass the previous information to the current task, but when the distance between the related information and the required information is considerable, the RNN becomes unable to connect the relevant information [43]. In order to learn the long-distance dependency problem, [PERSON] and [PERSON] [44] proposed the LSTM network, and it has been improved and promoted by some scholars [45; 46]. LSTM avoids long-term dependency problems through an explicit design. It is practically the default behavior of LSTM to remember the long-term information. The LSTM network replaces the neurons in the RNN with the LSTM unit, and adds input gates, output gates, and forget gates to input, output, and forget past information to control how much information can pass (Figure 2) [47]. LSTM has two transmission states namely, a cell state, and a hidden state. The state of the cell changes slowly with time, and the hidden state at different times may be different. LSTM establishes a gate mechanism to achieve the trade-off between the previous input and the current input. The main essence is to adjust the focus of memory according to the training goal and then perform the whole series of coding. LSTM can alleviate the vanishing gradient problem, exploding gradient problem of RNN, and performs favorably than RNN on longer sequences [44; 48]. Figure 1: Noise monitoring system based on IoT. Figure 2: LSTM architecture with one memory block. The LSTM has a \"gate\" structure to remove or add information to the cell state. A gate is a method of selectively passing information, including a sigmoid neural network layer and a bitwise multiplication operation [44]. The LSTM workflow and mathematical representation mainly have the following four steps [47]:  
(1) Deciding to discard information:  
\[f_{t}=o\big{(}W_{f}[h_{t-1},x_{t}]+b_{f}\big{)} \tag{1}\]  
where \(f_{t}\) is the forget gate, \(\sigma\) is the sigmoid function, \(W_{f}\) is the recurrent weight matrix, \(b_{f}\) is the corresponding bias term, \(h_{t-1}\) is the previous hidden layer output, and \(x_{t}\) is the new input. This step is implemented by a forgetting gate that outputs a value between 0-1 to \(C_{t-1}\) by reading \(h_{t-1}\) and \(x_{t}\), \"0\" means completely discarded, and \"1\" indicates complete retention. (2) Determining updated information:  
\[i_{t}=\sigma(W_{i}[h_{t-1},x_{t}]+b_{i}) \tag{2}\]  
\[\widetilde{C}_{t}=\tanh(W_{C}[h_{t-1},x_{t}]+b_{C}) \tag{3}\]  
where \(i_{t}\) is the input gate, \(\widetilde{C}_{t}\) is the candidate state of the input, \(\sigma\) and \(\tanh\) represent the sigmoid and hyperbolic tangent functions, respectively. \(W_{i}\) and \(W_{C}\) are the recurrent weight matrices, \(b_{i}\) and \(b_{C}\) are the corresponding bias terms, \(h_{t-1}\) is the previous hidden layer output, and \(x_{t}\) is the new input. This step determines what new information is stored in the cell state and consists of two parts, the first part is the sigmoid layer (the input gate), to ascertain which value is to be updated, while the second part is a new candidate value \(\widetilde{C}_{t}\) created by a \(\tanh\) layer. (3) Updating the cell status:  
\[C_{t}=f_{t}*C_{t-1}+i_{t}*\widetilde{C}_{t} \tag{4}\]  
where \(C_{t}\) and \(C_{t-1}\) are the current and previous states of the memory block, \(f_{t}\) is the forget gate, \(i_{t}\) is the input gate, \(\widetilde{C}_{t}\) is the candidate state of the input. This step is implemented by updating the state of the old cell, multiplying the old state by \(f_{t}\), discarding the information to be forgotten, and adding \(i_{t}*\widetilde{C}_{t}\) to obtain a new candidate value. (4) Outputting information:  
\[o_{t}=\sigma(W_{o}[h_{t-1},x_{t}]+b_{o}) \tag{5}\]  
\[h_{t}=o_{t*}\tanh(C_{t}) \tag{6}\]  
where \(o_{t}\) is the output gate, \(\sigma\) and \(\tanh\) represent the sigmoid and hyperbolic tangent functions, respectively.