The transmission of high-frequency signals over long distances depends on the ionosphere’s reflective properties, with the selection of operating frequencies being closely tied to variations in the ionosphere. The accurate prediction of ionospheric critical frequency foF2 and other parameters in low latitudes is of great significance for understanding ionospheric changes in high-frequency communications. Currently, deep learning algorithms demonstrate significant advantages in capturing characteristics of the ionosphere. In this paper, a state-of-the-art hybrid neural network is utilized in conjunction with a temporal pattern attention mechanism for predicting variations in the foF2 parameter during high- and low-solar activity years. Convolutional neural networks (CNNs) and bidirectional long short-term memory (BiLSTM), which is capable of extracting spatiotemporal features of ionospheric variations, are incorporated into a hybrid neural network. The foF2 data used for training and testing come from three observatories in Brisbane (27°53′S, 152°92′E), Darwin (12°45′S, 130°95′E) and Townsville (19°63′S, 146°85′E) in 2000, 2008, 2009 and 2014 (the peak or trough years of solar activity in solar cycles 23 and 24), using the advanced Australian Digital Ionospheric Sounder. The results show that the proposed model accurately captures the changes in ionospheric foF2 characteristics and outperforms International Reference Ionosphere 2020 (IRI-2020) and BiLSTM ionospheric prediction models.