In order to effectively use the student behavior data recorded by the online learning platform,this paper depicts the portraits of learners from various aspects, which takes full advantage of the online teaching and learning. With the help of artificial intelligence, firstly,we count the students'' learning time and collect their video content data, and analyze their viewing habits and their attention paid to key and difficult content. Secondly,we analyze the influence of course videos, chapter tests , study and sign-in times, and homework performance on students'' study effects based on the k-means++ clustering algorithm. The above methods help summarize students'' learning attitudes, preferences, and habits to categorize students with similar learning styles. In conclusion, teachers can choose teaching contents and adjust teaching methods to improve online teaching effects based on the analysis of online learning behavior.