## 3 Methodology
### The Output Prediction Results Utilizing the Decoder Structure  
In the decoder, to realize the prediction function, the information must be masked in the training. As such, the masking attention mechanism is used. Similar to before, except for the masking operation, the attention computation steps are the same as in the encoder. The detailed steps are as follows. Firstly, embedding is executed to obtain enhanced feature information, as in Equation (37):  
\[X_{DDE},X_{DTE}=Embedding(X_{DD},X_{DT}) \tag{37}\]  
where \(X_{DDE}\) and \(X_{DTE}\in\Re^{b\times(l+p)\times d}\). Secondly, similar to the steps of the encoder, the feature vectors of the \(ith\) sub-layers \(\hat{Q^{\prime\prime}_{i}}\), \(\hat{K^{\prime\prime}_{i}}\), and \(\hat{V^{\prime\prime}_{i}}\) can be obtained according to Equations (14)-(17). Thirdly, a mask matrix is added to the sub-layers of the attention calculation, as referred to in Equation (18), and depicted in Equation (38):  
\[MAttn^{(i)}=Softmax(\frac{\hat{Q^{\prime\prime}_{i}}K^{\prime\prime}_{i}}{ \sqrt{d_{f}}}\times W_{mask})\times\hat{V^{\prime\prime}_{i}} \tag{38}\]  
where \(W_{mask}\in\Re^{b\times(l+p)\times d_{f}}\) denotes the mask matrix, i.e., the 0-1 diagonal matrix. The feature vectors \(X_{DDEA}\) are calculated using Equation (39). \[X_{DDEA}^{\vec{\ }}=Concat(MAttn^{(1)},MAttn^{(2)},\cdots,MAttn^{(h)})\vec{W_{h2}} \tag{39}\]  
where \(\vec{W_{h2}}\) denotes the related parameter matrix. Referring to Equations (20) and (21), the masked feature vectors \(X_{DDEAT}\) can be obtained. The masked feature vectors \(X_{DDEL}^{\vec{\ }}\) are calculated in the same way. The fusion block is utilized to integrate \(X_{DDELAT}^{\vec{\ }}\) and \(X_{DDEL}^{\vec{\ }}\) to obtain \(X_{DD}^{\vec{\ }}\), as shown in Equation (40):  
\[X_{DD}^{\vec{\ }}=\xi\times((1+g)\bigotimes X_{DDEL}^{\vec{\ }}+(1-g)\bigotimes X _{DDEL}^{\vec{\ }}) \tag{40}\]  
where \(X_{DD}^{\vec{\ }}\in\Re^{b\times(l+p)\times d}\), with \(\xi\) denoting a scaling factor and \(g\) denoting a gating parameter. This produces the fused feature vector \(X_{DD}^{\vec{\ }}\), which serves as the integrated feature representation for the subsequent decoding steps. Next, let \(X_{DD}^{\vec{\ }}\) be the input as query vectors to FFT-Attention, and \(X_{ED}^{\vec{\ }}\) be the key and value vectors. This allows the extracted feature information in the encoder to be integrated into the decoder for forecasting. Referring to Equations (14)-(19), the feature vectors \(X_{DDA}^{\vec{\ }}\) can be computed using Equations (41)-(44):  
\[X_{DDA}^{\vec{\ }}=Concat(CAttn^{(1)},CAttn^{(2)},\cdots,CAttn^{(h)}) \tag{41}\]  
\[CAttn^{(i)}=Softmax(\frac{(X_{DDi}^{\vec{\ }}\times\vec{W_{Q^{\prime}}})\times(X_{ EDi}^{\vec{\ }}\times\vec{W_{K^{\prime}}})^{\vec{\ }}}{\sqrt{d_{f}}})\times(X_{EDi}^{\vec{\ }}\times\vec{W_{K^{\prime}}}) \tag{42}\]  
\[X_{DD}^{\vec{\ }}=\{X_{DD1}^{\vec{\ }},X_{DD2}^{\vec{\ }},\cdots,X_{DDh}^{\vec{ \ }}\} \tag{43}\]  
\[X_{ED}^{\vec{\ }}=\{X_{ED1}^{\vec{\ }},X_{ED2}^{\vec{\ }},\cdots,X_{EDh}^{\vec{ \ }}\} \tag{44}\]  
where \(X_{DDi}^{\vec{\ }}\in\Re^{b\times(l+p)\times d_{f}}\), and \(X_{EDi}^{\vec{\ }}\in\Re^{b\times s\times d_{f}}\), \(\vec{W_{Q^{\prime}}}\), \(\vec{W_{K^{\prime}}}\), and \(\vec{W_{V^{\prime}}}\) denote the related parameter matrices, respectively. The extracted trend feature vectors \(X_{DT}^{\vec{\ }}\in\Re^{b\times(l+p)\times d}\) can be obtained in a similar manner. Then, similarly, according to Equations (20)-(35), the feature vectors \(X_{DDF}^{\vec{\ }}\in\Re^{b\times(l+p)\times d}\) of the already fused details are obtained. In a similar way, the fused trend feature vectors \(X_{DTF}^{\prime^{\prime}}\in\Re^{b\times(l+p)\times d}\) can be computed. Furthermore, the fusion block is created to integrate the fused detail and trend feature vectors and obtain the output feature vectors \(X_{out}^{\prime^{\prime}}\in\Re^{b\times(l+p)\times d}\) in Equations (45) and (46), according to Equations (34) and (35).