In online teaching situations, a decision tree (DT) analysis algorithm is proposed in order to enable teachers to track students' learning behaviors and learning status in a timely manner. With the help of this algorithm, teachers can use the existing learning record files to analyze students' learning behaviors through multiple observation dimensions. In this paper, by constructing a learning achievement classification prediction (CP) model based on ID3 decision tree algorithm (DTA), the optimized ID3 DTA is used to analyze students' learning achievement and predict students who may not reach the expected teaching goals, so that teachers can give appropriate teaching assistance in time to achieve teaching goals. Through experiments, it is proved that with the increase of data volume, the accuracy of the model for CP of learning achievement is stable above 80%, which realizes the function of ID3 algorithm achievement prediction.