Children hospital BIM compliance inspection method based on LLM-driven knowledge graph

By constructing a dynamic knowledge graph using LLM-driven GraphRAG technology and combining it with NLP to parse spatial relationships, a BIM compliance inspection for children's hospitals can be achieved. This solves the problems of low inspection efficiency and high missed detection rate in existing technologies, and provides an efficient and accurate compliance inspection method.

CN121936024APending Publication Date: 2026-04-28XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
Filing Date
2026-01-13
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies for BIM compliance inspections in children's hospitals suffer from problems such as high construction complexity, imperfect dynamic update mechanisms, insufficient handling of complex spatial relationships, and poor domain adaptability, resulting in low inspection efficiency, high missed detection rates, and difficulty in meeting the accessibility design needs of children's hospitals.

Method used

By using LLM-driven GraphRAG technology and combining it with NLP to analyze spatial relationships, a dynamically updated knowledge graph is constructed to achieve automated compliance checks on key components of children's hospitals, outputting a list of non-compliance items and a visual report.

Benefits of technology

It significantly improves examination efficiency, reduces the rate of missed diagnoses, ensures the accuracy and timeliness of examination results, and meets the accessibility design requirements of children's hospitals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121936024A_ABST
    Figure CN121936024A_ABST
Patent Text Reader

Abstract

The invention discloses a child hospital BIM compliance inspection method based on an LLM-driven knowledge graph. The method comprises the following steps of: 1, extracting a latest barrier-free design specification and a functional standard by combining LLM with GraphRAG, and performing entity recognition, relational mapping and subgraph construction by combining component data acquired in a children hospital BIM model to generate a structured component-parameter-standard-position data set; 2, constructing a knowledge graph KG model, and storing the knowledge graph KG model in a Neo4j graph database to form a multi-layer relation network with component nodes, standard nodes and position nodes as cores; 3, generating a dynamic compliance check rule keeping real-time consistency; and 4, performing automatic conformity judgment on the BIM component parameters of the child hospital by utilizing a Cypher query language of the Neo4j graph database, calculating parameter deviation, and summarizing and outputting a non-compliance component list, deviation details and a visual report. The detection efficiency is greatly improved, and the omission ratio is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of Building Information Modeling (BIM) and Artificial Intelligence, specifically to a method for BIM compliance inspection of children's hospitals based on a Large Language Model (LLM) and driven by a Knowledge Graph (KG) using GraphRAG. Background Technology

[0002] As specialized medical buildings, children's hospitals must meet stringent accessibility design standards (such as the wheelchair ramp gradient not exceeding 1:12 (approximately 8.33°) and door width not less than 900 mm, as stipulated in GB 50763-2012), to ensure accessibility for children with disabilities, as well as functional standards (such as relevant building codes' requirements for daylighting coefficients in play areas and sound insulation levels in treatment rooms) to improve the medical experience for children. Traditional BIM compliance checks rely on manual comparison of component parameters with standards, which is time-consuming (approximately 2 hours per 100 components), has a high rate of missed checks (>5%), and struggles to handle complex component relationships (such as location associations) or dynamic standard updates (such as code revisions).

[0003] In existing technologies, Knowledge Graphs (KGs) have seen preliminary applications in BIM data structuring, such as storing component parameters and standard relationships. However, these are mostly static storage methods, lacking real-time update mechanisms, which makes them ineffective in responding to specification revisions or changes in component relationships. Large Language Models (LLMs) perform well in knowledge extraction and semantic parsing, such as parsing building codes through Natural Language Processing (NLP), but they have not yet been deeply integrated with KGs for BIM compliance checks in children's hospitals. GraphRAG, an emerging technology proposed by Microsoft Research, drives KG construction, retrieval, and updates through LLMs, improving data freshness and the ability to handle complex relationships. However, due to the following shortcomings, it has not yet been widely applied in the field of medical building BIM compliance checks: High complexity in construction: GraphRAG needs to automatically extract entities and relationships from unstructured text and build a hierarchical knowledge graph. In the BIM field, it involves a large number of professional terms, geometric relationships and standard specifications. Existing implementations lack optimization for the construction field, resulting in high graph construction costs and insufficient accuracy.

[0004] Imperfect dynamic update mechanism: Although GraphRAG supports LLM-driven incremental updates, existing applications are mostly for general text retrieval. When dealing with frequent revisions of building codes or real-time changes to BIM models, it lacks an efficient event-driven mechanism and version management, which can easily lead to standard lag or inconsistencies in relationships.

[0005] Insufficient handling of complex spatial relationships: BIM compliance checks involve topological relationships between components (such as "the ramp is located at the entrance of the radiology department"). Although the existing GraphRAG can handle semantic relationships, its support for reasoning about geometric and locational relationships is limited, and it cannot directly integrate BIM's IFC data model.

[0006] Poor domain adaptability: Existing tools are not specifically optimized for the accessibility and child-friendly needs of children's hospitals (such as wheelchair access safety, anti-pinch design, and play area lighting), making it difficult to meet the special compliance scenarios of medical buildings.

[0007] In summary, how to build an automated, dynamically updated, and efficient compliance inspection method has become a key technical challenge in the BIM design of children's hospitals. Summary of the Invention

[0008] To overcome the above technical problems, the present invention aims to provide a BIM compliance inspection method for children's hospitals based on LLM-driven knowledge graphs. This method focuses on the automated compliance detection and problem localization of existing BIM models, rather than the proactive optimization and adjustment of parameters. By deeply integrating LLM and GraphRAG to drive the real-time construction and incremental updates of the knowledge graph, and combining it with NLP for accurate analysis of complex spatial relationships, the method achieves automatic standard compliance checks on key components of children's hospitals (such as ramps, doors, play area lighting windows, and soundproof walls in treatment rooms), outputting a list of non-compliant items and a visual report, thereby significantly improving inspection efficiency and reducing the missed detection rate.

[0009] A method for BIM compliance inspection in children's hospitals based on LLM-driven knowledge graphs includes the following steps; Step 1: Using LLM combined with GraphRAG, the latest accessibility design specifications and functional standards are extracted in real time from authoritative data sources. Combined with component data collected from the children's hospital BIM model, entity recognition, relationship mapping and subgraph construction are performed to generate a structured component-parameter-standard-location dataset. Step 2: Based on the structured component-parameter-standard-location dataset generated in Step 1, use Natural Language Processing (NLP) to parse the spatial location relationships in the component descriptions (such as "located at the entrance of the radiology department on the 1st floor" and "adjacent to the game area"), construct a knowledge graph KG model, and store the knowledge graph KG model in the Neo4j graph database to form a multi-layered relationship network with component nodes, standard nodes, and location nodes as the core. Step 3: Based on the KG model built in Step 2, the LLM+GraphRAG method described in Step 1 (hereinafter referred to as LLM+GraphRAG) is adopted. Through scheduled tasks or event-driven mechanisms, authoritative data sources are queried periodically to verify and incrementally update standard thresholds and component relationships. Only nodes and edges affected by the revision are adjusted to generate dynamic compliance check rules that maintain real-time consistency. Step 4: Based on the dynamic compliance check rules generated in Step 3, use the Cypher query language of the Neo4j graph database to automatically judge the compliance of the BIM component parameters of the children's hospital, calculate the parameter deviation, summarize and output the list of non-compliant components, deviation details and visualization report (including the spatial distribution heat map of non-compliant components and the component-standard relationship network diagram).

[0010] In step one, LLM+GraphRAG is mainly responsible for extracting entities and relationships from unstructured specification text and component descriptions. In step three, it is responsible for difference detection, subgraph matching, and precise incremental updates. This enables the dynamic evolution of the knowledge graph and the adaptive maintenance of rules throughout the entire method, ensuring that compliance checks are always based on the latest standards and accurately reflect complex spatial topological relationships.

[0011] The core of this method lies in performing only compliance checks and report outputs, without involving generative optimization or modification of component parameters. This is distinct from parameter optimization techniques based on generative adversarial networks, enabling efficient, accurate, and automated checks without human intervention during the BIM review phase of children's hospitals.

[0012] Step one specifically involves: BIM compliance checks for children's hospitals must meet multi-dimensional standards, including accessibility design specifications and functional standards. Key constraint formulas include: (1) (2) (3) in, Indicates the slope angle. The width of the door. The door clearance is designed to ensure wheelchair safety and prevent pinching injuries. Functional standards include: (4) (5) This indicates the daylighting factor of the game area. The dB level indicates the sound insulation rating of the treatment room, used to ensure adequate lighting in the children's activity area and a quiet treatment environment.

[0013] Using LLM (such as GPT-4o or GPT-3.5-turbo) combined with GraphRAG, the latest standard and specification texts are extracted in real time from authoritative data sources (such as the official website of the Ministry of Housing and Urban-Rural Development and the method of full-text publication of national standards). At the same time, the component data (including parameters of components such as ramps, doors, windows, and soundproof walls, such as slope, width, safety gap, daylighting coefficient, sound insulation level, and location description information, such as "ramp at the entrance of the radiology department on the 1st floor" and "south window of the play area on the 2nd floor") collected by the children's hospital BIM model are combined to generate a structured dataset.

[0014] The specific combination method and extraction process of LLM and GraphRAG are as follows: First, LLM is used to segment the descriptive text of standard specification documents and components (using a semantic sliding window, window size 512 tokens, 30% overlap). Each segment performs a cue-driven knowledge extraction task, including entity recognition (standard clauses, thresholds, applicable component types) and relation extraction ("constraints", "applicable to", etc.). Then, the entities and relations extracted by LLM are fed into the GraphRAG module as input. GraphRAG constructs a global knowledge graph and generates local subgraphs, performing entity alignment, relation completion, and hierarchical clustering to achieve a more accurate structured mapping. This process is represented by the following formula: (6) in, As an authoritative standard text, For hospital component data, This indicates concatenated input. A dedicated extraction prompt template (instructing LLM to output entity-relation triples in JSON format); LLM first generates an initial set of triples, and GraphRAG then performs subgraph queries, entity disambiguation, and relation enhancement based on the global graph context, ultimately outputting a structured dataset of component-parameter-criteria-location quadruple associations. , containing node set (Component entities such as "ramp", standard entities such as "slope threshold 8.33°"), edge sets (Relationships such as "compliant", "located in", "constrained").

[0015] GraphRAG's subgraph query mechanism effectively improves extraction accuracy, especially when dealing with the hierarchical relationship of standard clauses and the description of component locations. It can automatically complete implicit associations (such as aligning "wheelchair ramp" with "accessibility specification"), providing high-quality and standardized data support for subsequent knowledge graph construction.

[0016] The specific process of constructing the knowledge graph (KG) model in step two is as follows: First, NLP tools (such as spaCy or HanLP) are used to perform entity recognition and dependency parsing on the location description text of components (such as "ramp at the entrance of the radiology department on the 1st floor", "the skylight on the south side of the game area adjacent to the corridor", "the soundproof wall of the treatment room on the 1st basement floor adjacent to the elevator lobby"), identifying location entities (LOCs, such as "1st floor" and "radiology department entrance") and spatial relation predicates (such as "located in", "adjacent to", "adjacent to", and "at the entrance"). Then, based on a predefined domain rule base and LLM-assisted semantic completion, standardized relation triples are generated. The mathematical expression of the knowledge graph (KG) model is: (7) in, This is a set of nodes, including: component nodes (e.g., "ramp_ID001", "door_ID002"), with additional attributes such as slope, width, and other parameters; standard nodes (e.g., "slope threshold_8.33°", "door width threshold_900mm"); and location nodes (e.g., "1st floor", "radiology department entrance", "game area"). Let be the set of edges, representing the relationships between nodes; This is a set of relation types, including "CONFORMS_TO" (component conforms to a standard), "LOCATED_IN" (component is located at a certain position), "ADJACENT_TO" (component is adjacent to another component), and "PART_OF" (component belongs to a certain functional area). The formula for extracting positional relationships is: (8) in, Describe the location of the component. For domain-specific rules (such as "entry point" → "LOCATED_AT_ENTRANCE"), An optional LLM refining step (used to handle fuzzy or non-standard descriptions), outputting a set of positional relationship edges. .

[0017] Once constructed, the KG model is imported into the Neo4j database in batches using Cypher statements, supporting efficient subgraph queries and path reasoning (such as querying "whether the accessible wheelchair path from the radiology department to the play area is continuous"). This relational network not only establishes a direct association between component parameters and standards, but also captures spatial topology through location nodes, providing a complete semantic foundation for subsequent dynamic updates and compliance checks, ensuring accurate modeling and rapid retrieval of complex spatial relationships.

[0018] Step three specifically involves: Based on the knowledge graph (KG) model constructed in step two, the LLM combined with GraphRAG approach described in step one (hereinafter referred to as LLM+GraphRAG) is adopted. Through scheduled tasks or event-driven mechanisms, standard thresholds and component relationships are periodically verified and updated to generate dynamically updated compliance check rules, ensuring the real-time consistency of the knowledge graph and the adaptability of the check rules. The update process specifically includes: The method maintains a standard version monitoring module, which is updated periodically (e.g., weekly) or when changes to authoritative data sources are detected. First, LLM is used to perform difference analysis on the latest standard text to generate a structured change summary (including added / modified / deleted clauses and threshold adjustments). Then, the change summary is input into the GraphRAG module for subgraph matching and entity alignment, identifying and updating only affected nodes and relation edges to avoid full graph reconstruction. The dynamic update formula is: (9) in, For the latest standard text data, Subgraph representation of an existing knowledge graph ( (Indicates context concatenation) The template for difference detection (instructing LLM to output change triples in JSON format, such as "node: slope threshold, old value: 8.33°, new value: 8.0°") is used. LLM first generates a set of change candidates, and GraphRAG then performs subgraph isomorphic matching and conflict resolution based on the global graph context, ultimately achieving incremental updates.

[0019] For example, when a slope criterion is detected to be revised to no greater than 8.0°, the update process is as follows: LLM identifies the threshold change and generates a summary; GraphRAG locates all relevant criterion nodes (such as the "Slope Threshold" node) and their associated edges (such as the "CONFORMS_TO" edge connecting to all "Ramp" component nodes); and updates node attributes. (10) The update operation uses Neo4j's transactional writes to ensure atomicity and consistency. Simultaneously, the method generates a change log (recording time, change type, and affected component ID), supporting version rollback and traceability.

[0020] After the update, LLM+GraphRAG automatically refreshes the compliance check rule cache, such as regenerating or optimizing Cypher query templates (e.g., "MATCH (c:Component)-[:CONFORMS_TO]->(s:Standard) WHEREc.slope>s.value RETURN c"), ensuring that subsequent checks are always based on the latest standards. This mechanism effectively solves the standard lag problem of traditional static KGs and is also applicable when component position relationships change (such as design adjustments), enabling continuous evolution of the knowledge graph and dynamic maintenance of rules, providing a timely and accurate rule foundation for the automated compliance checks in step four.

[0021] The fourth step of the inspection process specifically includes: The method loads the updated KG rule cache from step three and uses a parallel processing mechanism to perform batch checks on all components. First, it traverses the component nodes using the Cypher query language of the Neo4j database, retrieves the threshold values ​​of the associated standard nodes, and compares the actual parameter values ​​one by one. Then, it calculates the deviation and classifies the severity of non-compliance. Finally, it aggregates the results to generate a report. The compliance assessment formula is as follows: (11) The meaning is: perform a binary judgment on the compliance of the $i$th component $c_i$. If its actual parameter value $P_{c_i}$ meets the corresponding standard threshold $S_{c_i}$ (such as slope ≤ threshold), then it is compliant (1), otherwise it is not compliant (0).

[0022] The formula for summarizing non-compliant items is: (12) Where N is the total number of components; the inspection results output a list of non-compliant items (such as "Ramp ID001: Exceeding Standard") and a visualization report, and generate a relationship network diagram and a non-compliance distribution diagram using Python (matplotlib, seaborn); The inspection engine employs streaming parallel processing: component data is sharded by floor or function and pushed to a message queue (such as Kafka). Multiple inspector instances concurrently execute the following Cypher query template: MATCH (c:Component)-[:CONFORMS_TO]->(s:Standard), which means: match all paths where component nodes (c) are connected to standard nodes (s) through "conformance" relationship edges; WHERE c.id = $component_id AND NOT (c.value SATISFIESs.threshold), which means: filter components with the specified ID whose parameter values ​​do not meet the associated standard threshold (SATISFIES is a Neo4j custom predicate that supports comparisons such as >, <, ≥, ≤); RETURN c.id, c.param, c.value, s.threshold, c.location, which means: return the ID, parameter type, actual value, standard threshold, and location information of the non-compliant component.

[0023] After the query results are aggregated locally, an interactive visualization report is generated, including: a detailed list of non-compliant components (in tabular form, including a rectification suggestion template); a component-standard relationship network diagram (showing the non-compliant path); a heat map of the spatial distribution of non-compliant components (based on location nodes, displaying density by floor or region); and a scatter plot or bar chart comparing parameters with standards.

[0024] The report supports export in multiple formats (PDF, HTML, JSON) and provides an API interface for designers or reviewers to use. This step fully leverages the KG (Key Group) built and dynamically maintained in the preceding steps to ensure that the inspection results are always based on the latest standards and complete spatial relationships, significantly reducing the missed detection rate. At the same time, it provides intuitive and traceable problem location support for subsequent rectification, achieving efficient automation of BIM compliance inspections for children's hospitals.

[0025] A children's hospital BIM compliance inspection system based on LLM-driven knowledge graph includes a data extraction module, a knowledge graph construction module, a dynamic update module, and a compliance inspection module. The data extraction module uses LLM combined with GraphRAG technology to extract the latest standards and specifications from authoritative data sources, and integrates the BIM component data and location descriptions of the children's hospital to generate a structured component-parameter-standard-location dataset, providing accurate and timely basic input for subsequent knowledge graph construction; The knowledge graph construction module is based on a structured component-parameter-standard-location dataset. It uses NLP to parse the spatial location relationships of components, builds and stores a knowledge graph model in the Neo4j database, forming a multi-layered relationship network of components, standards and locations, providing an efficient semantic query foundation for dynamic updates and compliance checks. The dynamic update module adopts LLM+GraphRAG and incrementally updates the knowledge graph through a timed or event-driven mechanism to ensure the real-time consistency of standard thresholds and component relationships, providing up-to-date rule support for compliance checks. The compliance inspection module is based on the updated knowledge graph and uses Cypher queries to automatically determine the compliance of component parameters, summarize non-compliant items and generate a visual report, thereby achieving automated detection and problem localization.

[0026] The above modules are interconnected and work closely together: the output of the data extraction module lays the data foundation for the knowledge graph construction module; the semantic network formed by the knowledge graph construction module supports the operation of the dynamic update module and the compliance inspection module; the dynamic update module maintains the timeliness of the entire process; and finally, the compliance inspection module completes the end-to-end BIM compliance review of the children's hospital, significantly improving inspection efficiency, accuracy, and adaptability to dynamic changes in standards.

[0027] The beneficial effects of this invention are: Through the above steps, the LLM-driven KG model outputs compliance inspection results for BIM components of the children's hospital. LLM+GraphRAG dynamically updates standard thresholds and component relationships in the KG by querying authoritative sources in real time, ensuring the accuracy and timeliness of the inspection. NLP parses complex component location description text (such as "1st floor radiology entrance ramp") through dependency parsing, entity recognition, and relation extraction; it constructs a syntax tree using a pre-trained language model to identify location entities and spatial predicates (such as "located in" and "adjacent to"), and combines domain rules to complete standardized relation triples, converting them into structured edges in the KG. This addresses the shortcomings of traditional BIM tools in location association processing, achieving accurate spatial topology reasoning. The method automates the inspection of key components, with efficiency and accuracy far exceeding manual methods, precisely meeting the accessibility needs of the children's hospital.

[0028] This invention significantly improves the efficiency and accuracy of accessibility design checks in children's hospitals by combining LLM-driven dynamic updates, knowledge graph-based structured modeling, and efficient compliance checking algorithms. LLM+GraphRAG automatically acquires the latest standards without manual intervention, achieving incremental KG updates through subgraph queries and entity alignment, maintaining real-time consistency between standards and component relationships. The knowledge graph unifies the modeling of component parameters, spatial locations, and standard thresholds, supporting rapid reasoning about complex relationships. The compliance checking algorithm, based on Cypher queries and parallel processing, achieves end-to-end automation. These technologies work synergistically to enable high-precision and high-efficiency accessibility compliance checks in scenarios with dynamically changing standards, complex relationships, and large-scale data.

[0029] LLM+GraphRAG uses scheduled tasks and event-driven mechanisms to monitor revisions in real time and automatically update the KG, eliminating the risk of lag and ensuring traceability through change logs.

[0030] This invention achieves high-precision structured transformation of unstructured location descriptions through a hybrid parsing strategy combining NLP and rule engines, constructing spatial topological relationships without requiring a global coordinate system. This strategy, combining semantic understanding from a language model with domain rule constraints, achieves higher parsing accuracy than traditional regular expression matching, providing a reliable foundation for wheelchair path verification and emergency evacuation checks. Deeply adapted to the needs of children's hospitals, it introduces multi-dimensional constraints (such as wheelchair passage width, anti-pinch gaps, lighting coefficient, and sound insulation level) to construct a compliant system oriented towards the child's experience. This not only meets legal standards but also ensures sufficient lighting in play areas, a quiet treatment environment, and unobstructed, continuous passageways, providing intelligent technical support.

[0031] This invention provides a novel automated solution for accessible design in children's hospitals by integrating an LLM-driven KG framework with efficient graph querying. It features high precision, high efficiency, and scalability, demonstrating significant advantages and application value in BIM review of medical buildings, child-friendly space design, and smart hospital construction. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating the BIM compliance inspection method for children's hospitals based on LLM-driven knowledge graphs, showing the entire process of data input, KG construction, LLM update, and compliance inspection.

[0033] Figure 2 This is a flowchart of updating KG standards and relationships in LLM+GraphRAG, describing the steps of standard querying, verification, and node updating.

[0034] Figure 3 This is a network diagram of the components of a children's hospital, showing the KG structure (nodes and edges of components, standards, and locations).

[0035] Figure 4 It is a comparison chart of compliance inspection results, showing the relationship between component parameters and standards.

[0036] Figure 5 This is a distribution map of non-compliant components, showing the spatial distribution of non-compliant components (such as ramps and doors) in a children's hospital. Detailed Implementation

[0037] The present invention will now be described in further detail with reference to the accompanying drawings.

[0038] This invention presents a BIM compliance inspection method for children's hospitals based on LLM-driven knowledge graphs, which realizes an accessibility design compliance inspection scheme based on dynamic standard updates and complex relationship parsing.

[0039] The following steps provide a detailed description of the invention and the specific execution process, as follows: Figure 1 As shown: Step 1: Standard Extraction and Dataset Generation; To address the multidimensional standards that children's hospitals must meet for BIM compliance inspections (such as accessibility design standards, building lighting design standards, and civil building sound insulation design standards), the method employs LLM combined with GraphRAG technology. The latest standards and specifications are extracted from authoritative data sources (such as the official website of the Ministry of Housing and Urban-Rural Development and the method of full-text publication of national standards). Combined with component data collected by the children's hospital (including parameters of components such as ramps and doors, such as slope, width, safety clearance, and location information, such as "1st floor radiology department entrance" and "2nd floor south side of play area"), a structured dataset containing component parameters and their corresponding standards is generated.

[0040] The process is as follows Figure 2 As shown, LLM first divides the standard document into blocks, generating a summary and entity list for each block. Then, it constructs a subgraph using GraphRAG to identify the hierarchical relationships between standards and aligns the entities with the component data to form a unified structured representation.

[0041] The dataset contains unique component identifiers (IDs), parameter vectors (such as slope, width, clearance, etc.), location coordinates (x, y, z), and standard thresholds (such as 8.33°, 900 mm, etc.), providing complete input for subsequent KG construction. Standard document chunking employs a semantic-based sliding window strategy with a window size of 512 tokens and an overlap rate of 30% to ensure contextual continuity. LLM performs a summary generation task on each chunk, outputting a structured summary containing standard terms, threshold ranges, and applicable scope. GraphRAG then constructs subgraphs using the summaries as anchors. Nodes include standard entities (such as "slope standard" and "door width standard"), threshold entities (such as "8.33°" and "900 mm"), and component entities (such as "ramp" and "door"). Edges represent relationships such as "applies to," "constraints," and "equivalent to." In the entity alignment stage, LLM matches standard entities with component parameters using vector similarity calculation (cosine similarity threshold > 0.85), generating a standard-component mapping table. The final dataset is stored in JSON Lines format, with each line containing a unique component identifier, parameter fields (slope, width, clearance, etc.), location coordinates (x, y, z), standard threshold, and associated standard number, providing a standardized input interface for KG construction.

[0042] Step 2: Constraint Graph Construction and Topological Reasoning; Based on the structured dataset generated in step one, the method uses NLP techniques to construct a constraint graph, employing a hierarchical strategy in the construction process. The bottom layer consists of component nodes, which are supplemented with current parameters (such as slope, width, daylight factor, safety clearance, etc.) and location attributes (including floor, functional area and text description labels, such as "1st floor radiology department entrance", "2nd floor game area south side daylight window", "basement 1 treatment room"). The middle layer consists of standard nodes, with additional thresholds (such as ≤8.33°, ≥900 mm, etc.) and applicable conditions (such as "suitable for wheelchair access" and "suitable for side lighting in the play area"). The top layer consists of function nodes, with additional compliance check weights (such as accessibility weights and functionality weights, used for priority assessment).

[0043] The positional attributes of the aforementioned component nodes provide the foundational data for subsequent positional relationship parsing. Positional relationship parsing employs a hybrid strategy, implemented as follows: First, the spaCy tool is used to perform dependency parsing and named entity recognition (NER) on the location description text of the components to extract explicit location relationships. For example, in the description "ramp connects to the entrance of the game area on the first floor", "ramp" is identified as the main entity, "game area entrance" is identified as the location entity, and "connects" is identified as the relation modifier, thereby generating the explicit edge "connected to" (CONNECTED_TO).

[0044] Secondly, implicit relationships are completed through a domain-specific rule-based engine. For example, for a description of "wheelchair access from the radiology department to the game area", predefined rule templates (such as "access from A to B" → "path connection" (PATH_CONNECTS)) or multi-hop dependency path analysis are used to complete implicit edges, ensuring that topological relationships that are not directly expressed (such as continuous access under turning radius requirements) are captured.

[0045] Topological reasoning is implemented through Cypher path queries. For example, a specific query example for finding the wheelchair path from the radiology department to the game area is: MATCH path = (start:Location {name: "Radiology Department Entrance"})-[:connect to *]->(end:Location {name: "Game Area Entrance"}), which means matching a multi-hop "connect to" path from the radiology department entrance node to the game area entrance node (* represents any number of hops); RETURN nodes(path),relationships(path), length(path) AS path_length, which means returning the nodes, relationship edges, and path length on the path, used to calculate the connectivity score.

[0046] The query returns the path length, node sequence, and relationship type, which the method uses to calculate a path connectivity score (e.g., a score normalized based on path length and relationship weights; a score ≥ 0.8 is considered continuous and barrier-free). The score is used for path assessment in subsequent compliance checks (e.g., wheelchair turning radius and continuity requirements).

[0047] After the graph is constructed, the method performs a consistency check, which includes: checking that all component nodes are associated with at least one standard node (no isolated components), there are no circular dependencies (avoiding infinite recursive queries), and the edge weights are reasonable (deviation values ​​are normalized to the range of 0-1). After passing the check, real-time Cypher queries (sub-second response) and incremental updates (modifying only affected subgraphs) are supported, and the relationship network is as follows: Figure 3 As shown.

[0048] Step 3: Update KG using LLM+GraphRAG; The overall architecture of this method comprises four main modules: a standard extraction and dataset generation module, a constraint graph construction and topology reasoning module, an LLM+GraphRAG knowledge graph (KG) update module, and an automated compliance check module. These modules form a closed-loop process: the standard extraction module provides the initial dataset, the constraint graph construction module generates the knowledge graph (KG), the KG update module is responsible for dynamically maintaining the real-time status of the KG, and the compliance check module performs checks based on the latest KG and outputs a report.

[0049] In the KG update module, the method maintains the standard version repository, periodically queries standard revisions (a weekly standard check, implemented as a scheduled task via LangChain), or executes immediately upon urgent standard changes via a manually triggered interface. Standard revision detection employs an incremental crawling strategy, retrieving only changed pages since the last check from the same authoritative sources as in step one, and extracting the changed document text through HTML parsing and PDF OCR.

[0050] LLM performs difference analysis on the extracted change document text, generating a structured difference summary (identifying new clauses, deleted clauses, and threshold changes), outputting a JSON patch (recording the set of additions, modifications, and deletions). GraphRAG receives this structured summary, constructs a temporary constraint subgraph, and performs graph matching with the existing main KG (using a subgraph isomorphism algorithm) to identify the affected node set. Then, incremental merging is performed: for new criteria, new nodes are created and corresponding constraint edges are established; for threshold changes, the attributes of the corresponding criterion nodes are directly updated; for clause deletions, a soft deletion strategy is adopted (marking relevant edges as "deleted" and adding a deletion timestamp, rather than physically deleting nodes or edges, to preserve historical versions for auditing and rollback support).

[0051] Update operations employ transactional write operations (Neo4j ACID transactions) to ensure KG consistency. After an update, a change log is generated, recording the operation time, change type, operator (automatic or manual method), before and after version snapshots, scope of impact, and version number. Auditing and one-click rollback are supported.

[0052] Synchronous events are broadcast via an event-driven mechanism (based on Kafka, publishing the standard_updated event, which includes a change summary and a list of affected component IDs). The downstream automatic compliance check module subscribes to this event and refreshes its local rule cache in real time, ensuring that the check process always uses the latest constraints.

[0053] Step 4: Automated compliance check; Based on the updated KG rules (dynamic standard thresholds and relationships in the knowledge graph) from step three, the method automatically performs compliance checks on the parameters of the children's hospital BIM components. The specific process is as follows: The inspection engine employs a streaming processing architecture. Component data is consumed from a message queue (Kafka topic bim_components) and distributed in parallel to multiple inspector instances, layer by layer. Each inspector instance executes a Cypher query template to quickly retrieve the latest standard threshold for the corresponding component from the KG (Knowledge Store) and calculates parameter deviations. Non-compliant items are categorized by severity (e.g., deviation >10% is severe, 5%-10% is moderate) and a priority queue is generated. After aggregation, the results are processed by the report generation module, ultimately outputting a list of non-compliant components and an interactive visual report.

[0054] The report includes: unique ID of the non-compliant component, current parameter value, standard threshold, deviation value, location coordinates, and a rectification suggestion template (e.g., "Suggest adjusting the slope to below 8.0°"). The visualization is generated using the Plotly library. Figure 4 A scatter plot comparing parameters and standards (scatter points represent component parameters, horizontal lines represent thresholds, and red dots highlight non-compliant items). Figure 5 This report provides a floor heat map (heat gradients indicate non-compliant density, with dense red areas representing concentrated problem areas, such as entrance ramps or skylights). The report supports exporting to PDF and HTML formats and provides an API for external methods to use.

[0055] Through the aforementioned automated checks, the method can efficiently identify non-compliance items under complex component relationships and dynamic standards, and output intuitive and easy-to-understand reports, supporting designers to make rapid rectifications and improving the accuracy and efficiency of BIM compliance checks in children's hospitals.

[0056] Through the above steps, this invention successfully constructs a BIM compliance inspection method for children's hospitals based on LLM-driven knowledge graphs. This method can efficiently parse complex component relationships and achieve barrier-free compliance inspection under dynamic standards. Its core lies in the LLM+GraphRAG-driven KG adaptive update mechanism, which significantly improves inspection accuracy and timeliness, overcoming the bottlenecks of traditional methods in terms of standard lag and insufficient relationship parsing.

[0057] In summary, the LLM-driven knowledge graph-based BIM compliance inspection method for children's hospitals proposed in this invention constructs a compliance inspection framework that combines real-time performance with robustness by integrating large-scale language models and efficient graph database technology. This framework overcomes the limitations of traditional static inspection strategies by adapting to the latest standards and specifications in real time through LLM+GraphRAG; semantic network modeling of the knowledge graph accurately captures the spatial topology and standard associations between components; and distributed querying and streaming processing work together to ensure the efficiency and scalability of compliance inspection.

[0058] Step one serves as the data source for building the KG model in step two. It efficiently extracts standard and component features using LLM+GraphRAG to establish a structured dataset and accurately map the correspondence between parameters and thresholds. Step two builds a knowledge graph based on the dataset from step one, generating a semantic network of component-standard-location to achieve efficient reasoning about relationships. Step three dynamically updates standards and relationships based on the KG model from step two using LLM+GraphRAG to maintain the real-time consistency of the inspection rules. Step four updates the rules based on step three and uses Cypher queries and parallel computing to complete automated compliance checks, achieving efficient evaluation of components across the entire domain.

[0059] Example: The LLM-driven knowledge graph-based BIM compliance inspection method for children's hospitals of the present invention has been verified in the actual construction project of Wujiang District Children's Hospital in Suzhou City, Jiangsu Province.

[0060] For the BIM model of this children's hospital, the computational domain covers three floors above ground and one basement level, including 101 key functional components such as doors, ramps, play areas, and treatment rooms. These include 10 sets of ramps, 20 sets of doors, 15 sets of safety clearance components, 5 sets of play area lighting components, and 8 sets of treatment room soundproofing components. The remainder are auxiliary components such as corridors and staircases. Component parameters include slope, width, safety clearance, lighting coefficient, and sound insulation level. Location information is accurate to the floor, area, and functional zone, such as "first-floor pediatric outpatient corridor entrance ramp," "second-floor play area south-side lighting window," and "basement radiology treatment room soundproofing wall." This data was jointly collected by the hospital's design institute and construction team. After exporting IFC files from the Revit model, attributes and geometric information were extracted to form a standardized component dataset.

[0061] The method loads the latest versions of national and industry standards, including accessibility design specifications, building lighting design standards, and civil building sound insulation design specifications, covering key indicators such as slope, door width, safety clearance, daylighting factor, and sound insulation level. The standards are obtained in real-time from authoritative sources via LLM+GraphRAG to ensure that the thresholds are consistent with the latest revisions.

[0062] The method runs on a high-performance computing cluster and is deployed using a containerized architecture. The verification process is as follows: The BIM model was imported in IFC format. The parser automatically extracted the geometric and attribute information of 101 components, generating a structured dataset. LLM extracted standard specifications from authoritative sources using GraphRAG to construct the initial KG. The KG includes component nodes, standard nodes, location nodes, and relationship edges such as "conforms to" (CONFORMS_TO), "located in" (LOCATED_IN), and "adjacent to" (ADJACENT_TO). The initial KG construction took approximately 45 seconds and was stored in the Neo4j database.

[0063] Simulation standard revision: The slope threshold was adjusted from 8.33° to 8.0°, and the door width was adjusted from 900 mm to 920 mm. The method involves a timed task to detect changes, LLM generating a change summary, and GraphRAG performing subgraph matching, updating only the affected ramp and door nodes, with an update time of 3.2 seconds. The change log records operation details and supports rollback.

[0064] A full compliance check was performed on 101 components. The inspection engine processed the checks in parallel by floor, executing Cypher queries to obtain the latest thresholds and calculating deviations. The results showed: 8 groups of ramps were compliant, and 2 groups had deviations; 18 groups of doors were compliant, and 2 groups had deviations; all groups of safety gaps were compliant; 4 groups of lighting in the game area were compliant, and 1 group had deviations; 7 groups of sound insulation in the treatment room were compliant, and 1 group had deviations. There were 6 non-compliant components, and the total inspection time was 28 seconds.

[0065] The method generates interactive reports, such as Figure 4 As shown, the parameter-standard comparison scatter plot clearly displays the non-compliant points; Figure 5 As shown, the floor heat map visually presents the spatial distribution of non-compliant components, with the highest density in the area near the radiology department entrance on the first floor. The report includes a list of non-compliant components, deviation values, location coordinates, and rectification suggestions, and supports export in PDF and HTML formats. According to feedback from the design institute, the report is intuitive and easy to understand, improving rectification efficiency by approximately 70%.

[0066] The method proposed in this invention, through LLM-driven dynamic standard updates and semantic reasoning based on knowledge graphs, has been successfully applied to BIM compliance inspection at Wujiang Children's Hospital. This method demonstrates excellent accuracy, efficiency, and operability in a real hospital setting, overcoming the shortcomings of traditional manual inspections in terms of outdated standards, complex relationships, and low efficiency. It provides an efficient, reliable, and intelligent compliance tool for barrier-free design in children's hospitals.

Claims

1. A method for BIM compliance inspection in children's hospitals based on LLM-driven knowledge graphs, characterized in that, Includes the following steps; Step 1: Using LLM combined with GraphRAG, the latest accessibility design specifications and functional standards are extracted in real time from authoritative data sources. Combined with component data collected from the children's hospital BIM model, entity recognition, relationship mapping and subgraph construction are performed to generate a structured component-parameter-standard-location dataset. Step 2: Based on the structured component-parameter-standard-location dataset, use Natural Language Processing (NLP) to parse the spatial relationships in the component descriptions, construct a Knowledge Graph (KG) model, and store the KG model in the Neo4j graph database to form a multi-layered relationship network with component nodes, standard nodes, and location nodes as the core. Step 3: Based on the KG model, using the LLM+GraphRAG approach in Step 1, authoritative data sources are queried periodically through scheduled tasks or event-driven mechanisms to verify and incrementally update standard thresholds and component relationships. Only nodes and edges affected by the revisions are adjusted to generate dynamic compliance check rules that maintain real-time consistency. Step 4: Based on the dynamic compliance check rules, use the Cypher query language of the Neo4j graph database to automatically determine the compliance of the BIM component parameters of the children's hospital, calculate the parameter deviations, and summarize and output a list of non-compliant components, deviation details, and a visualization report.

2. The method for BIM compliance inspection of children's hospitals based on LLM-driven knowledge graph as described in claim 1, characterized in that, Step one specifically involves: BIM compliance checks for children's hospitals must meet multi-dimensional standards, including accessibility design specifications and functional standards. Key constraint formulas include: (1) (2) (3) in, Indicates the slope angle. The width of the door. The door clearance is designed to ensure wheelchair safety and prevent pinching injuries. Functional standards include: (4) (5) This indicates the daylighting factor of the game area. The dB level indicates the sound insulation rating of the treatment room, used to ensure adequate lighting in the children's activity area and a quiet treatment environment.

3. The method for BIM compliance inspection of children's hospitals based on LLM-driven knowledge graph as described in claim 2, characterized in that, By combining LLM with GraphRAG, the latest standard and specification texts are extracted in real time from authoritative data sources. At the same time, the component data collected by the children's hospital BIM model is combined to generate a structured component-parameter-standard-location dataset.

4. The method for BIM compliance inspection of children's hospitals based on LLM-driven knowledge graph as described in claim 3, characterized in that, The specific combination method and extraction process of LLM and GraphRAG are as follows: First, LLM is used to segment the descriptive text of standard specification documents and components. Each segment performs a prompting engineering-driven knowledge extraction task, including entity recognition and relation extraction. Then, the entities and relations extracted by LLM are fed into the GraphRAG module as input. GraphRAG constructs a global knowledge graph and generates local subgraphs, performing entity alignment, relation completion, and hierarchical clustering to achieve a more accurate structured mapping. The process is represented by the following formula: (6) in, As an authoritative standard text, For hospital component data, This indicates concatenated input. A dedicated extraction hint template is provided; LLM first generates an initial set of triples, and GraphRAG then performs subgraph queries, entity disambiguation, and relation enhancement based on the global graph context, ultimately outputting a structured dataset of component-parameter-criteria-location quadruple associations. .

5. The method for BIM compliance inspection of children's hospitals based on LLM-driven knowledge graph as described in claim 4, characterized in that, The specific process of constructing the knowledge graph (KG) model in step two is as follows: First, NLP tools are used to perform entity recognition and dependency parsing on the location description text of components, identifying location entities and spatial relation predicates. Then, based on a predefined domain rule base and LLM-assisted semantic completion, standardized relation triples are generated. The mathematical expression of the knowledge graph (KG) model is: (7) in, This is a collection of nodes, including: component nodes, additional attribute parameters; standard nodes; and location nodes. Let be the set of edges, representing the relationships between nodes; It is a set of relation types, including "CONFORMS_TO" components that conform to the standard, "LOCATED_IN" components that are located at a certain position, "ADJACENT_TO" components that are adjacent, and "PART_OF" components that belong to a certain functional area; The formula for extracting positional relationships is: (8) in, Describe the location of the component. Domain-specific rules, As an optional LLM refining step, output the set of positional relationship edges. .

6. The method for BIM compliance inspection of children's hospitals based on LLM-driven knowledge graph as described in claim 5, characterized in that, Step three specifically involves: Based on the knowledge graph KG model constructed in step two, the LLM combined with GraphRAG approach described in step one is adopted. Through scheduled tasks or event-driven mechanisms, the standard thresholds and component relationships are periodically verified and updated to generate dynamically updated compliance inspection rules, ensuring the real-time consistency of the knowledge graph and the adaptability of the inspection rules. The update process specifically includes: The method maintains a standard version of the monitoring module, which is updated periodically or when a change in the authoritative data source is detected. First, LLM is used to perform difference analysis on the latest standard text and generate a structured change summary; Subsequently, the change summary is input into the GraphRAG module for subgraph matching and entity alignment, identifying and updating only the affected nodes and relation edges to avoid full graph reconstruction; The dynamic update formula is: (9) in, For the latest standard text data, This is a subgraph representation of an existing knowledge graph. Indicates context concatenation, The LLM first generates a set of change candidates, and then GraphRAG performs subgraph isomorphic matching and conflict resolution based on the global graph context, ultimately achieving incremental updates.

7. The method for BIM compliance inspection of children's hospitals based on LLM-driven knowledge graph as described in claim 4, characterized in that, The fourth step of the inspection process specifically includes: The method loads the updated KG rule cache from step three and uses a parallel processing mechanism to perform batch checks on all components. First, it traverses the component nodes using the Cypher query language of the Neo4j database, retrieves the threshold values ​​of the associated standard nodes, and compares the actual parameter values ​​one by one. Then, it calculates the deviation and classifies the severity of non-compliance. Finally, it aggregates the results to generate a report. The compliance assessment formula is as follows: (11) The meaning is: perform a binary judgment on the compliance of the $i$th component $c_i$. If its actual parameter value $P_{c_i}$ meets the corresponding standard threshold $S_{c_i}$, then it is compliant (1), otherwise it is not compliant (0).

8. The method for BIM compliance inspection of children's hospitals based on LLM-driven knowledge graph as described in claim 7, characterized in that, The formula for summarizing non-compliant items is: (12) Where N is the total number of components; the inspection results output a list of non-compliant items and a visualization report, and generate a relationship network diagram and a non-compliance distribution diagram using Python (matplotlib, seaborn); The inspection engine employs streaming parallel processing: component data is sharded by floor or function and pushed to a message queue. Multiple inspector instances concurrently execute the following Cypher query template: MATCH (c:Component)-[:CONFORMS_TO]->(s:Standard), which means: match all paths where component nodes (c) are connected to standard nodes (s) through "conformance" relationship edges; WHERE c.id = $component_id AND NOT (c.value SATISFIES s.threshold), which means: filter components with the specified ID whose parameter values ​​do not meet the associated standard threshold; RETURN c.id, c.param, c.value, s.threshold, c.location, which means: return the ID, parameter type, actual value, standard threshold, and location information of the non-compliant component; After the query results are aggregated locally, an interactive visualization report is generated, including: a detailed list of non-compliant components; a component-standard relationship network diagram; a heat map of the spatial distribution of non-compliant components; and a scatter plot or bar chart comparing parameters with standards.

9. A children's hospital BIM compliance inspection system based on LLM-driven knowledge graph for implementing the method of any one of claims 1-8, characterized in that, It includes a data extraction module, a knowledge graph construction module, a dynamic update module, and a compliance check module; The data extraction module uses LLM combined with GraphRAG technology to extract the latest standards and specifications from authoritative data sources, and integrates the BIM component data and location descriptions of the children's hospital to generate a structured component-parameter-standard-location dataset, providing accurate and timely basic input for subsequent knowledge graph construction; The knowledge graph construction module is based on a structured component-parameter-standard-location dataset. It uses NLP to parse the spatial location relationships of components, builds and stores a knowledge graph model in the Neo4j database, forming a multi-layered relationship network of components, standards and locations, providing an efficient semantic query foundation for dynamic updates and compliance checks. The dynamic update module adopts LLM+GraphRAG and incrementally updates the knowledge graph through a timed or event-driven mechanism to ensure the real-time consistency of standard thresholds and component relationships, providing up-to-date rule support for compliance checks. The compliance inspection module is based on the updated knowledge graph and uses Cypher queries to automatically determine the compliance of component parameters, summarize non-compliant items and generate a visual report, thereby achieving automated detection and problem localization.