Abstract The power grid system has diverse structures consisting of multiple subnets, equipment, and components that are interrelated and mutually influential. At the same time, there are various types of power grid accidents, including short circuits, open circuits, overloads, grounding faults, etc. Each type of fault may have its specific cause and manifestation. This complexity and diversity make establishing a comprehensive and accurate early warning model difficult. Therefore, this study proposes an adaptive warning method based on hazard sources and weighted coefficients for power grid accidents. To transform raw data containing a large amount of redundant information and noise into data with targeted features for representation, power grid accident information feature labels are generated based on weighted coefficients. Based on this, based on the improved YOLOv3, potential risks in the power grid are identified and assessed. Identification based on implementing risk prevention and control measures defines multiple warning levels to achieve adaptive warning of power grid accidents. Test data validation shows that the proposed solution has an accuracy up to 97.85%. There is also a significant improvement in other indicators, all of which remain above 98%. Indicator validation shows that the research method meets the actual process standards. For the entire day period, the precision and recall of the research method remained stable at over 90%.