Significant progress has been made in managing construction safety risks based on Building Information Modelling (BIM) technology. BIM is active in all stages of construction, including5 planning, design, pre-construction and construction. However, the causes of risks and accidents are complex and can be related to humans, the environment, data and project portraits. The current construction safety risk management process lacks scientific reference and efficiency in conducting comprehensive inspections for specific projects. The uneven and substandard data quality in BIM models significantly undermines their effectiveness. This article introduces a knowledge graph and accident database through data crawling and structuring, with the use and analysis of an accident causation model, providing key risk elements and management directions for safety managers who require a high level of attention during the early-stage of BIM. The obtained knowledge graph was subjected to data mining analysis to explore the causes of accidents, considering the combined effect of multiple factors, such as “case-date-cause” and “case-address-cause”. The paradigm can be recognized by the BIM, and through the secondary development on the development side, a data interface is constructed to transfer the knowledge graph into the BIM. The approach mentioned in the article can provide standard and structured data for the BIM model, analysing high-risk points of projects, which is valuable for engineering applications.