## 3 Methodology
### Knowledge Graph Construction  
To construct a knowledge graph for tunneling-induced geotechnical risk assessment, this study adopted Stanford's Seven-Step Methodology, a widely recognized framework for ontology development. This approach ensures a systematic, structured, and scalable representation of key entities, relationships, and rules governing the interactions between tunneling activities, geological conditions, structural responses, and emergency response measures. The seven steps include determining the domain and scope, considering reuse, enumerating important terms, defining classes and hierarchy, establishing properties, creating instances, and finally evaluating and refining the ontology. By following this methodology, the knowledge graph effectively integrates multi-source data, including geotechnical properties, tunneling parameters, structural integrity data, and risk mitigation strategies, enabling a comprehensive semantic representation of the domain. For ontology modeling and implementation, Protege was employed to construct and manage the knowledge graph structure. The developed ontology encompassed key entities and their hierarchical relationships, enabling a structured representation of geotechnical risks and emergency response mechanisms. As shown in Figure 5, the ontology consisted of several primary categories, including emergency response plans, bearing structures, monitoring points, and risk assessment rules. The emergency response plan category was further subdivided into preventive measures, emergency response during disasters, and post-disaster handling strategies, ensuring a comprehensive framework for risk mitigation. The bearing structures category included critical infrastructure elements such as buildings, bridges, pipelines, roads, retaining walls, and tunnels, representing the physical entities affected by tunneling activities. Additionally, mechanical equipment and the natural environment were incorporated to reflect their roles in geotechnical stability. Figure 4: Development of single digital twin model: taking geotechnical soil and rock mass as an example. The ontology also integrated monitoring points and risk assessment rules, which are essential for real-time hazard identification and mitigation. Within the monitoring system, risk indicators were explicitly defined to facilitate automated risk evaluation and early warning mechanisms. The risk assessment rules category included reporting and early warning regulations, enabling standardized procedures for assessing and responding to potential settlement and structural instability. By capturing these multi-layered relationships, the knowledge graph provides a semantic foundation for automated reasoning, intelligent decision support, and dynamic risk assessment in urban tunnel construction. To enhance automated reasoning and intelligent risk assessment, the Semantic Web Rule Language (SWRL) was employed to define inference rules within the ontology. SWRL enables the system to reason over structured data and trigger alerts when predefined settlement thresholds are exceeded. For example, in accordance with standard regulations, the settlement criteria included a maximum cumulative settlement of 24 mm, a maximum cumulative uplift of 8 mm, and a maximum settlement rate of 2.4 mm/day. These thresholds were defined based on domain expert input and empirical rules derived from historical data. These conditions can be encoded into SWRL rules as follows:  
These rules define conditions in which the settlement, uplift, or settlement rate exceed regulatory limits, triggering a corresponding early warning mechanism. When real-time monitoring data are input into the ontology, the SWRL engine automatically evaluates these thresholds and generates alerts if a violation occurs. To ensure reliable inference within the knowledge graph, all the input data were first semantically standardized and validated during ingestion.