Aiming at the collaborative needs of optimistic psychological explanation style recognition and educational planning for senior primary school students, a Bayesian discriminant model integrating GB, G, B and six-dimensional explanation style features, student attribute features and stage response features is constructed, and a hierarchical educational planning and dynamic feedback optimization mechanism is designed accordingly. The identification experiment was carried out based on 534 valid samples of 560 questionnaires, and the experimental group-control group, pre-test-posttest-follow-up test certificates were implemented on 188 intervention samples. The results show that the Accuracy, Recall and F1-score of the model reach 88.7%, 87.9%and 88.1%respectively, which are better than logistic regression, decision tree and support vector machine. After the implementation of the plan, GB of the experimental class increased from -1.81 to -0.56, and reached 0.19 in the follow-up test stage, B decreased from 12.31 to 10.73, and PVB decreased from 3.72 to 2.72. The research showed that the Bayesian discriminant model could effectively identify students ‘optimistic psychological explanation style, and the recognition results could support the generation of differentiated education planning, and had continuous application value for reducing pessimistic attribution and improving optimistic quality.