| Time series data has complex characteristics,such as trend,seasonality,periodicity,and irregularity,etc.,which make the data difficult to fit and predict.Existing prediction algorithms often cannot make full use of relevant information and changes in data,and are prone to overfitting or underfitting problems.On the other hand,although Transformer has demonstrated strong sequence modeling capabilities in the field of natural language processing and can be migrated to the field of time series prediction,it still faces problems such as difficulty in establishing long-distance time series relationship dependencies,and the computational complexity of the self-attention mechanism is too high.In order to solve these problems,this paper studies the time series forecasting algorithm based on the deep learning method,and combines the attention mechanism and time-frequency analysis to construct different network models and achieve better forecasting results.The main content of this article is as follows:This chapter proposes a multivariate time series forecasting algorithm that fuses feature encoding and hierarchical attention mechanisms.The Transformer model is powerful,but it does not preserve the global features of sequence order well,and it is insufficient for multi-period feature extraction.To address these issues,this paper employs multidimensional position embeddings,including raw data,sinusoidal position embeddings,and global temporal encoding,to enhance sequence order and global information.At the same time,this paper uses a hierarchical attention mechanism to extract features of time dimensions of different granularities and reduce computational complexity.Finally,each component is nonlinearly transformed and output through the forward propagation module.Compared with the Transformer model,the MAE on the IHEPC and ETT datasets decreased by 10.9%,and the MAE decreased by 7.3%,indicating that the combination of global and local feature encoding used can better integrate temporal features and help the model capture dependencies.This chapter proposes a multivariate time series forecasting algorithm combined with Fourier transform.Most of the current time series forecasting models only extract time domain features,ignoring frequency domain features.In order to make full use of frequency domain information,this paper decomposes the time series into seasonal trends and processes different components to improve the flexibility of the model.The time series is then converted from the time domain to the frequency domain using a Fast Fourier Transform and reduces the input sequence length.Finally,this paper performs nonlinear transformation on each component through the forward propagation module,performs residual connection and layer normalization on the results,and then undergoes a seasonal trend decomposition to output the prediction results.Compared with the Transformer model,the MSE decreased by 21.7% and the MAE decreased by 16.9%,which shows that the introduction of frequency features can enhance the expressive ability of the model.To sum up,after studying the time series forecasting problem,this paper gives full play to the advantages of the Transformer model and focuses on the existing problems.From the perspective of model structure,feature encoding method,time domain and frequency domain,this paper proposes two multivariate time series forecasting algorithms.Through relevant experimental verification,it is proved that the method proposed in this paper is effective. |