In response to the problems of dispersed professional knowledge, complex management system, and complex business processes in the infrastructure business control of State Grid Corporation, this article proposes a personnel safety risk warning technology based on power infrastructure samples. Firstly, preprocess the scattered infrastructure business data to form a high-quality infrastructure sample library; Next, based on the sample library, a safety risk knowledge graph for infrastructure personnel is constructed based on dynamic graphs; Finally, based on the constructed safety risk knowledge graph of infrastructure personnel, the PinSage model and DynGCN model are combined to capture the spatial structure features and time series features of the dynamic graph. The model is trained through comparative learning, and knowledge inference technology is used to predict the risk information of construction personnel, achieving rapid identification and warning of typical risk sections, providing intelligent auxiliary decision-making for the assessment of personnel behavior and facility status risks on the infrastructure site.