In the online learning environment,exploring learners'behavioral preferences can greatly reduce learners'learning blindness and improve learning efficiency.Based on the portrait of learners,the study uses Python language to divide online learning learners into four categories by K-means algorithm according to their learning characteristics,and recommends personalized learning strategies for learners according to the principles of precision,timeliness and implemensibility of personalized learning recommendations.The results show that personalized learning strategies can help learners effectively improve their academic performance.