Aiming at the safety risk problems caused by the incorrect wearing of helmets, safety belts and illegal smoking of operators during the construction of power grid, this paper designs a detection and identification system for the safety risk caused by operators based on YOLOv7 deep learning model. This paper designs the framework of the online monitoring system for personnel safety risk factors of smart grid, analyzes the structure and application of YOLOv7 model on this basis, and finally analyzes and verifies the method based on the improved data set of personnel risk behavior factors. The experimental results show that compared with the previous generations of YOLO model, YOLOv7 has higher detection efficiency and speed in the monitoring of behavioral risk factors of operators, which can better meet the real-time detection requirements of the smart grid monitoring system on safety risk factors of operators.