With the rapid development of educational technology and the deepening of educational system reform, personalized education has gradually become an important topic in education. However, existing classroom teaching decision-making methods often fail to meet students’ personalized learning needs, resulting in some students being unable to reach their full potential in the classroom. To solve this problem, this study proposed a multi-conditional factor classroom teaching decision optimization method based on the improved particle swarm optimization (IPSO) algorithm, and predicted students’ personalized learning needs by combining with the improved ant colony optimization-support vector regression (IACO-SVR) model. First, the IACO-SVR model was used to collect students’ learning data, such as grades, interests, hobbies and learning progress, to accurately predict their needs in different teaching contexts. Second, the IPSO algorithm was used to optimize the multi-conditional factor classroom teaching decisions, thus meeting the personalized needs of students. The IPSO algorithm had strong global search ability, which effectively found the optimal solution to achieve personalized teaching strategies. It is expected that the teaching quality can be improved by predicting the personalized learning needs of students and optimizing classroom teaching decisions in this study, thus providing better support for their comprehensive development. In addition, the results of this study can provide theoretical basis and reference for administrative departments of education and schools to formulate personalized education policies.