With the explosive increase of online learning resources, how to provide students with personalized learning resources and achieve the goal of precise teaching has become a research hotspot in the field of computer-assisted teaching. In personalized learning resource recommendation, exercise recommendation is the most commonly used and most representative research direction, which has attracted the attention of a large number of scholars. Aiming at this, a personalized exercise recommendation framework is proposed in this paper. First, it automatically constructs the relationship matrix between questions and concepts based on students' answering records (abbreviated as Q-matrix). Then based on the Q-matrix and answer records, deep knowledge tracing is used to automatically build the course knowledge graph. Then, based on each student's answer records, Q-matrix and the course knowledge graph, a recommendation algorithm is designed to obtain the knowledge structure diagram of every student. Combined the knowledge structure diagram and constructivist learning theory, get candidate recommended exercises from the exercise bank. Finally, based on their diversity, difficulty, novelty and other characteristics, exercises are filtered and obtain the exercises recommended to students. In the experimental part, the proposed framework is compared with other algorithms on the real data set. The experimental results of the proposed algorithm are close to the current mainstream algorithms without the Q-matrix and curriculum knowledge graph, and the experimental results of some indicators are better than Algorithms exist.