As a component of the capital market, the stock market plays a very important role in economic development. How to predict the stock price more accurately is the key concern of researchers and investors. To solve the above problems, this paper proposes an Informer based method for stock intraday price prediction. Informer based on attention mechanism can efficiently capture precise long-range dependencies between input and output to increase the prediction capacity. In this research, historical K-line data of traditional securities in China’s financial market are collected. Based on this data set, the intraday stock price prediction performance of Informer and Long Short-Term Memory neural network (LSTM) is compared. The experiment also uses the three-day K-line model to perform pattern recognition on the K-line data of candidate stocks. The results show that the prediction performance of Informer is significantly higher than that of LSTM, and the data information after three-day K-line pattern recognition can improve the prediction accuracy of Informer and reduce time and space overhead of Informer.