Aiming at the problems of inadequate user feature extraction, cold start and sparse data, a personalized course recommendation algorithm that utilizes TB-BGAT is suggested. First, the Tiny Bidirectional Encoder Representation from Transformers (TinyBERT) model is utilized to output character-level word vectors; then, Bidirectional Recurrent Neural Network (BiGRU) model is utilized to obtain the embedded contextual semantic features. Finally, the attention mechanism is utilized to allocate weights to various course features by assigning their importance and to obtain the output results. The results of experiment on the publicly available dataset MOOCs-Course prove that the proposed method improves at least 3.62%, 3.04%, and 3.33% in precision, recall, and F1-score, correspondingly, in contrast to several other state-of-the-art course resource recommendation algorithms. The proposed method can enhance the effectiveness of the course recommendation model, enhance the quality of learners' online learning, and provide good technical support for online education learning platforms.