Abstract The trend of our country into an aging society is becoming more and more obvious, and the elderly education service has become the focus of social attention. The integration of artificial intelligence into elderly education is one of the inspiring ideas in which the personalized recommendation algorithm can recommend educational resources according to the characteristics of older people, and it has the prospect of application. In this paper, we first provide a CTransD-GAT recommendation model based on a knowledge graph, which improves traditional problems such as data sparsity by setting weight preference and feature aggregation. A dynamic preference-capturing method is proposed based on contextual interaction to capture the variable user learning interests more accurately and flexibly. This paper examines the practical utility of personalized recommendation methods for educational resources based on these two improved techniques. The post-test mean score of each knowledge module test of the experimental group is improved by 1.83 points compared with the pre-test, 11.46 points improve the score of teaching ability, and the scores of perceived usefulness, ease of use, and intention to use are 3.82, 3.89, and 3.97, respectively. It shows that the improved educational resource recommendation model has an excellent effect on improving knowledge structure and teaching ability, and it is characterized by simplicity and ease of use.