The modular teaching mode has been introduced into many disciplines, especially in higher education, computer education, and other skill-based disciplines. The modular teaching mode is more widely used. Based on the modularization project, this paper explores the pain points in teaching, starting from the principle of modularization project teaching and listing the advantages of modularization project teaching. Based on the principle of modular project teaching, a diagnostic model for teaching pain points is proposed. The K-means algorithm is used to construct a student learning profile, analyze the students’ learning pain points, and design a modular project teaching model to address these pain points. Through experimental analysis, we verify the effect of the model on teaching pain point problems. The experimental class saw a rise in student performance from 104 to 110 points. The pre-and post-test academic performance of the experimental class is significantly different at the 0.05 level, as indicated by the significant difference of 0.001. In the case of improving learning interest, close to 70% of the students expressed greater interest in learning after learning from the teaching model proposed in this paper.