Driver's fatigue driving and mood are two important factors that cause traffic accidents, and with the widespread use of mobile devices, it is of significant research value to detect driver's abnormal driving behavior on the mobile terminal. In this paper, the PFLD model is used on mobile to obtain face keypoints and improve the EAR by fusing binocular opening and closing degree to detect abnormal driving behavior such as fatigue and mood. Fatigue detection integrates the improved EAR, yawning duration, head pitch angle and other multiple features to determine, which mainly includes the process of extracting the driver's both eyes and mouth features through the PFLD model, monitoring the driver's heart rate and head distance with Internet of Things devices, constructing feature vectors and using SVM to determine driving fatigue. The threshold parameters are selected by calculating the five-dimensional features of the face, and the driver's mood is detected based on KNN. Through experiments, the driver fatigue detection accuracy is about 90% and the mood recognition accuracy is up to 96%.