# Product Evaluation Prediction Model Based on Multi-Level Deep Feature Fusion
## 2 Using Genetic Algorithm to Optimize Spatiotemporal Correlation Forecast Model
### Spatiotemporal Correlation Prediction Model
#### 2.1.2 The Second Feature Extraction Based on BiLSTM  
LSTM is an improved result of the traditional Recurrent Neural Network (RNN), which can perform long-term analysis and prediction on sequence data and effectively prevent the gradient from disappearing during RNN training. The LSTM structure (as shown in Figure 3) adopts the control gate mechanism, which is composed of memory cells, input gates, output gates, and forgetting gates. Among them, \(x_{t}\) is the input of the current time, and \(h_{t}\) is the state of the cell.  
The input gate \(\mathrm{i_{t}}\) receives the current input \(\mathrm{x_{t}}\) and the final hidden state \(\mathrm{h_{t-1}}\) as input, and calculates \(\mathrm{i_{t}}\) according to Formula (1).  
\[\mathrm{i_{t}}=\sigma(W_{\mathrm{ix}}\mathrm{x_{t}}+W_{\mathrm{ih}}\mathrm{h_{ t-1}}+\mathrm{b_{i}}) \tag{1}\]  
After calculation, when \(\mathrm{i_{t}}\) is 0, it means that any information input will not enter the unit state, and when \(\mathrm{i_{t}}\) is 1, it means that all the information currently input will enter the unit state. In Formula (2), \(\mathrm{c_{t}}^{\sim}\) will calculate another value, called candidate value, which is used to calculate the current cell state.  
\[\mathrm{c_{t}}^{\sim}=\mathrm{tan}\,\mathrm{h}(W_{\mathrm{cx}}\mathrm{x_{t}}+ W_{\mathrm{ch}}\mathrm{h_{t-1}}+\mathrm{b_{c}}) \tag{2}\]  
The forget gate will do the following: a forget gate value of 0 means that no information about \(\mathrm{c_{t-1}}\) is passed to the computation of \(\mathrm{c_{t}}\), and a value of 1 means that all information is passed to \(\mathrm{c_{t}}\).  
\[\mathrm{f_{t}}=\sigma(W_{\mathrm{fx}}\mathrm{x_{t}}+W_{\mathrm{fh}}\mathrm{h_{ t-1}}+\mathrm{b_{f}}) \tag{3}\]  
The final \(h_{t}\) state of the LSTM cell:  
\[\mathrm{o_{t}}=\sigma(W_{\mathrm{ox}}\mathrm{x_{t}}+W_{\mathrm{oh}}\mathrm{h_{ t-1}}+\mathrm{b_{o}}) \tag{4}\]  
Figure 3: LSTM structure diagram.  
Figure 2: DSCNN structure diagram.  
\[\mathrm{h_{t}}=\mathrm{o_{t}}\mathrm{tanh}\left(\mathrm{c_{t}}\right) \tag{5}\]  
Equations (1)-(5), \(W_{\mathrm{ix}}\), \(W_{\mathrm{ih}}\), \(W_{\mathrm{cc}}\),\(W_{\mathrm{ch}}\),\(W_{\mathrm{fv}}\), \(W_{\mathrm{fh}}\),\(W_{\mathrm{ox}}\),\(W_{\mathrm{oh}}\) represent the weight matrix of each control gate; and \(\mathrm{b_{i}}\), \(\mathrm{b_{c}}\), \(\mathrm{f_{t}}\), \(\mathrm{b_{o}}\) represent the bias of each control gate; \(\mathrm{\sigma}\) and \(\mathrm{tanh}\) are the sigmoid and \(\mathrm{tanh}\) activation functions, respectively.  
BiLSTM is composed of two LSTMs with the same structure and opposite directions (as shown in Figure 4), so it can process satisfaction sequence of product evaluation in both directions at the same time, better capture the dependencies between features, fully mine the hidden information in the data, and make overall plans. Considering factors such as historical evaluation satisfaction and price, secondary correlation features can be extracted to further improve the prediction accuracy [19].