IFC file natural language interactive query method based on large language model

Through a collaborative framework of large language models and dedicated toolchains, natural language interactive querying of IFC files was realized, solving the problems of high user threshold and low efficiency in BIM technology, and providing efficient and clear query results.

CN121833741APending Publication Date: 2026-04-10HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing BIM technology suffers from high user barriers, low query efficiency, and unclear results when querying IFC files, making it difficult to achieve intuitive and efficient information retrieval.

Method used

Employing a collaborative framework of a large language model and a dedicated toolchain, the system generates structured query results and provides them to the user through natural language parsing, IFC file preprocessing, conditional filtering, and attribute extraction.

Benefits of technology

It lowers the barrier to entry for users, improves query response speed and efficiency, reduces computing costs, and provides clear query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833741A_ABST
    Figure CN121833741A_ABST
Patent Text Reader

Abstract

The invention provides an IFC file natural language interactive query method based on a large language model. The method comprises the following steps: a big language model natural language query analysis step; an IFC preprocessing step; a condition filtering and attribute extraction step; and generating a large language model result and feeding back a natural language. According to the method, the powerful semantic understanding, reasoning and generating capacity of a large language model is combined with the accurate and efficient processing capacity of a special tool on IFC data. According to the method, a user can interact with complex BIM data by using the most natural language; compared with the prior art, the method has the advantages that massive IFC data is not required to be directly input into a large language model, compared with direct reading of IFC files, the query response time is shortened from the minute level to the second level, Token consumption is reduced by two orders of magnitude, the method has the capacity of reading complex IFC files, efficiency, cost and robustness are greatly optimized, and the method is suitable for popularization and application. And a feasible technical path is provided for popularization application of the BIM technology.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of building information modeling (BIM) data processing and artificial intelligence, and particularly relates to an IFC file natural language interactive query method based on a large language model. BACKGROUND

[0002] As a core technology of modern architectural design, construction and operation management, building information modeling (BIM) has been widely applied in the whole life cycle management of the construction industry. IFC (Industry Foundation Classes) as an international standard data exchange format in the field of BIM, can express the geometric information, attribute information and semantic relationship of the building project completely, and provides important support for the digital transformation of the construction industry. However, with the in-depth application of BIM, the size and complexity of IFC files grow rapidly, containing a large amount of structured data, which makes users face great challenges when querying information.

[0003] In the practice of BIM application, users often need to extract relevant information from IFC models according to specific conditions. Traditional query methods usually require users to be familiar with IFC data structure and query language, and to set complex parameters through professional software interface, which has high technical requirements for users and high learning cost, seriously hindering the wide application of BIM technology.

[0004] There are many limitations in the prior art in the aspect of IFC information query. First, most BIM software only supports simple attribute filtering, and cannot handle natural language queries, so users must use specific query syntax or interface operations, which makes it difficult to realize intuitive and efficient interaction. Second, existing methods are often inefficient when dealing with multi-condition combined queries, requiring traversal of the entire IFC file, which has high computational cost and long response time. In addition, existing solutions lack structured organization and classification of query results, making it difficult to provide clear and organized query results, which affects the decision-making efficiency of users. These defects seriously restrict the practical application of BIM technology in the construction industry, and an IFC information query method that can support natural language interaction and be efficient and accurate is urgently needed. SUMMARY

[0005] The present application aims to solve the problems in the prior art and proposes an IFC file natural language interactive query method based on a large language model. The method builds a collaborative framework of "large language model (semantic understanding and task planning) + special tool chain (accurate data operation)", which enables users to use natural language to directly perform complex semantic retrieval and information extraction on IFC files without any professional software or programming knowledge, while ensuring the efficiency and accuracy of the query.

[0006] The application is realized by the following technical solutions, the application provides an IFC file natural language interactive query method based on a large language model, the method comprises: S1: large language model natural language query analysis step: used for semantic analysis of user input natural language query, extracting target entity, filtering condition and target attribute; S2: IFC preprocessing step: used for converting IFC file into structured JSON format and dividing according to object type; S3: condition filtering and attribute extraction step: used for accurate filtering and attribute extraction of IFC JSON data based on extracted target entity, filtering condition and target attribute, generating structured query result; S4: large language model result generation and natural language feedback step: used for converting structured query result into natural language description and returning to user.

[0007] Further, the S1 step comprises: target entity extraction step: extracting the standard IFC entity name corresponding to the target entity type from the natural language query; filter list extraction step, identifying and constructing a filtering condition list with attribute name as key and condition value as value from the natural language query; query attribute extraction step, identifying the attribute category list expected to be obtained from the natural language query as the target attribute.

[0008] Further, the S2 step comprises: IFC file analysis step, used for converting IFC file into structured JSON format; specifically, converting IFC file into original JSON file containing all component information, the original JSON file contains data field, entity type and relationship reference; object type segmentation step, used for dividing structured JSON data into independent files according to object type; temporary directory management step, used for generating files in temporary folder.

[0009] Further, the S3 step comprises: condition filtering step, used for sequentially filtering IFC JSON data based on extracted filtering condition; attribute extraction step, used for extracting specified attribute from filtered data based on extracted target attribute; structured result generation step, used for classifying and summarizing components with same target attribute value, generating component type statistical information.

[0010] Further, the condition filtering step adopts a step-by-step filtering mechanism to filter the component set in sequence according to the order of the filtering condition list, wherein each filtering condition independently acts on a specific attribute of the component.

[0011] Further, when the attribute extraction step extracts attribute information from the filtered component, an attribute category-based extractor plug-in is adopted, each extractor plug-in is specially used to extract a category of attribute information from the IFC component; the category of the attribute information includes at least one of the following: project basic information, component basic information, component type definition associated attribute information, component attribute definition associated general attribute information, component classification system definition information, associated material information, spatial position information, and geometric attribute information.

[0012] Further, in the structured result generation step, the component set with extracted attribute information is subjected to structure similarity analysis, and components with the same or similar attribute structure are classified; based on the classification result, summary information is generated, and the summary information includes the total number of components, the number of different structure categories, and representative substructures.

[0013] Further, the S4 step includes: A structured result conversion step is used to convert the structured query result into a natural language description.

[0014] The application further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the IFC file natural language interactive query method based on a large language model when executing the computer program.

[0015] The application further provides a computer readable storage medium for storing computer instructions, wherein the computer instructions implement the steps of the IFC file natural language interactive query method based on a large language model when executed by a processor.

[0016] The application has the following beneficial effects: The application provides an IFC file natural language interactive query method based on a large language model, which combines the powerful semantic understanding, reasoning and generation capabilities of a large language model with the accurate and efficient processing capabilities of a special tool on IFC data. The significant effects are as follows: on the one hand, users can interact with complex BIM data in the most natural language, greatly reducing the use threshold; on the other hand, it avoids directly inputting massive IFC data into a large language model, compared with using a large language model to directly read an IFC file, the query response time is reduced from minutes to seconds, the Token consumption is reduced by two orders of magnitude, and the ability to read complex IFC files is achieved, realizing a substantial optimization of efficiency, cost and robustness, and providing a feasible technical path for the popularization and application of BIM technology. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.

[0018] Figure 1 A flowchart of the IFC file natural language interactive query method based on a large language model. DETAILED DESCRIPTION

[0019] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0020] In combination with Figure 1 The present application provides an IFC file natural language interactive query method based on a large language model, which comprises: S1: Large language model natural language query analysis step: used for semantic analysis of user input natural language query, extracting target entity, filtering condition and target attribute; the S1 step is used to receive user input natural language query, and the query is structured and analyzed by using a large language model. The analysis process includes: identifying the query type and extracting the key query elements therefrom, which at least include: target entity (corresponding to the entity type in IFC standard, such as IfcWall), filtering condition (such as floor, space, material attribute, etc.), and target attribute (the attribute category corresponding to the information that the user wants to obtain).

[0021] The S1 step comprises: Target entity extraction step: extracting the standard IFC entity name corresponding to the target entity type from the natural language query; Filter list extraction step, identifying and constructing a filtering condition list with attribute name as key and condition value as value from the natural language query; Query attribute extraction step, identifying the attribute category list that the user expects to obtain from the natural language query as the target attribute.

[0022] S2: IFC preprocessing step: for converting IFC files into structured JSON format and splitting by object type; the S2 step is used for preprocessing IFC files, calling a dedicated IFC preprocessing tool by LLM, converting the input IFC file into a JSON format file easy for program processing, and splitting the converted JSON format file into multiple sub-JSON files based on IFC entity type, laying a foundation for subsequent efficient filtering.

[0023] The S2 step includes: An IFC file parsing step for converting IFC files into structured JSON format; specifically, converting IFC files into a raw JSON file containing all component information, the raw JSON file containing data fields, entity types and relationship references; An object type splitting step for splitting structured JSON data by object type into independent files; A temporary directory management step for generating files in a temporary folder.

[0024] S3: Condition filtering and attribute extraction step: for accurate filtering and attribute extraction of IFC JSON data based on extracted target entities, filtering conditions and target attributes, and generating structured query results; the S3 step is used to call the corresponding condition filtering and attribute extraction tool by LLM according to the query elements parsed by S1. The tool includes a condition filtering step, an attribute extraction step, and a structured result generation step. The tool first locates the corresponding data subset according to the target entity; secondly, the condition filtering step gradually filters the components in the subset according to the filtering conditions; then the attribute extraction step accurately extracts the target attribute information from the filtered components; finally, the structured result generation step structures and generates summary information to output in a structured format (such as JSON). The condition filtering step includes multiple predefined condition filters, each corresponding to an IFC attribute, for processing specific query conditions of the attribute, such as floor filter, space filter, etc. The attribute extraction step includes multiple predefined attribute extractors, which are constructed with the principle of low granularity and high reusability to reduce code size while improving the understanding ability of large language models for results. The structured result generation step uses a structure signature algorithm to classify the result set, greatly reducing the token consumption of large language models when processing complex IFC models, and facilitating LLM to understand the results.

[0025] The S3 step includes: A condition filtering step for multi-condition filtering of IFC JSON data based on extracted filtering conditions; The attribute extraction step is configured to extract specified attributes from the filtered data based on the extracted target attributes. The structured result generation step is configured to classify and summarize components of the same structure to generate component type statistical information.

[0026] The condition filtering step adopts a step-by-step filtering mechanism to filter the component set according to the order of the filtering condition list, wherein each filtering condition independently acts on a specific attribute of the component.

[0027] The attribute extraction step extracts attribute information from the filtered component, and adopts an attribute category-based extractor plug-in, each of which is used to extract a category of attribute information from the IFC component; the category of the attribute information includes at least one of the following: project basic information, component basic information, component type definition associated attribute information, component attribute definition associated common attribute information, component classification system definition information, associated material information, spatial position information, and geometric attribute information.

[0028] The component type definition associated attribute information is extracted through the following path: The IfcRelDefinesByType relationship is found in the isTypedBy relationship of the component, and the associated IfcWallType (or IfcSlabType, etc.) relationship is further found, the associated IfcPropertySet attribute set is obtained from the relationship, and the attribute value of the IfcPropertySingleValue type is extracted from the attribute set.

[0029] The component attribute definition associated common attribute information is extracted through the following path: The IfcRelDefinesByProperties relationship is found in the isDefinedBy relationship of the component, and the attribute value of the IfcPropertySingleValue type is extracted from the IfcPropertySet with the name Pset_WallCommon (or Pset_SlabCommon, etc.) referenced by the relatingPropertyDefinition of the relationship.

[0030] The component classification system definition information is extracted through the following path: The IfcRelAssociatesClassification relationship is found in the hasAssociations relationship of the component, and the classification system definition information of the relatingClassification type is extracted.

[0031] The conditional filtering step and the attribute extraction step are provided in the form of plug-ins and support dynamic expansion by following a predefined interface specification.

[0032] In the structured result generation step, the component set with extracted attribute information is subjected to structural similarity analysis, and components with the same or similar attribute structures are classified; based on the classification result, summary information is generated, including the total number of components, the number of different structure categories and representative substructures.

[0033] S4: Large language model result generation and natural language feedback step: for converting structured query results into natural language descriptions and returning to the user. The S4 step is used to input the structured query results obtained in S3 into a large language model again. The large language model organizes and summarizes the results and generates natural language descriptions easy for users to understand and feeds back to the user, completing a closed loop of interaction.

[0034] The S4 step includes: A structured result conversion step for converting structured query results into natural language descriptions.

[0035] The present application effectively solves the gap between natural language flexibility and IFC data operation accuracy through the collaborative architecture of "semantic understanding and scheduling hub (LLM)" + "professional data operation tool chain". Its significant progress lies in: 1) low interaction threshold: users do not need to master IFC standards or professional software; 2) high query efficiency: through preprocessing and tool calling, the large model avoids processing massive raw data, the response speed is improved by an order of magnitude, and the calculation cost is reduced by two orders of magnitude; 3) strong result readability: providing structured classification and natural language summary. To achieve the above purpose, the technical scheme provided by the present application follows the core process of "natural language analysis → IFC data preprocessing → conditional filtering and attribute extraction → result organization and feedback". The method uses a large language model as a central controller to coordinate and schedule multiple special function tools for execution.

[0036] Embodiments The following Figure 1 The specific implementation of each step is described in detail.

[0037] The natural language analysis step (S1) is the core task of the LLM to parse the user query into a triple {target_entity, conditions, target_property}.

[0038] Further, for the target entity, the model needs to map the user's language (such as "wall", "window") to the standard IFC entity type (such as IfcWall, IfcWindow). This is achieved by embedding an IFC entity type knowledge base in the system prompt of the large model.

[0039] Further, for the filter conditions, the model needs to identify the restrictive phrases in the query and normalize them into a list of filter conditions executable by the tool. The invention defines a set of standard condition expression JSON formats. The LLM expresses the conditions in the natural language query in JSON format. The key of the JSON is the name of the attribute extractor supported by the system, which is a series of conditions predefined in the form of prompt engineering inside the LLM; the value is any one of a string, a number, a boolean value, an array with string or number as elements, and an object. Among them, the number list is used to represent the range. For example, "three to four" is represented as "[3, 4]"; "greater than two" is represented as "[2]"; "less than two or more than three" is represented as "{[0, 2],[3]}". For example, "two-story wall with fire rating greater than 2 hours" is parsed as "conditions: ["floor": "two-story", "fire_rating": [2]]".

[0040] Further, for the target property, the model needs to identify the information dimension that the user is interested in and map it to the attribute extractor name supported by the system, which is predefined in the form of prompt engineering inside the LLM, such as "materialset" (associated material information), "spatialset" (spatial location information), "typeset" (component type definition associated attribute information), etc. The attribute extractor is constructed with the principle of low granularity and high reusability. Each attribute extractor will extract all the associated attributes of the component, such as "materialset" will find "IfcRelAssociatesMaterial" and all the associated information from the "hasAssociations" relationship of the component; "typeset" will find "IfcRelDefinesByType" relationship from the "isTypedBy" relationship of the component, and further find the associated "IfcWallType" (or other types such as "IfcSlabType") relationship, and get the associated "IfcPropertySet" attribute set and all the associated information from the relationship.

[0041] The output of this step is a structured JSON object, which serves as precise instructions for calling downstream tools.

[0042] The IFC preprocessing step (S2) is a standalone tool developed using the Python ifcopenshell library. Its main process includes two steps: format conversion and logical block division.

[0043] Furthermore, the format conversion step utilizes the open-source library IFC2JSON to completely convert the IFC (.ifc) file into a single JSON file (raw_ifcjson.json) containing all the original information. This process specifically handles the complex multi-level nested references within the IFC, ensuring that attribute information is not lost.

[0044] Furthermore, for the logical block-based step, this step reads the aforementioned JSON file, aggregates objects of the same type based on the "type" field (i.e., the IFC entity type) of each object, and stores them as separate JSON files (such as IfcWall.json and IfcSlab.json). This avoids parsing the entire large file for each query, greatly improving subsequent retrieval efficiency.

[0045] The conditional filtering and attribute extraction step (S3) is the core toolchain of this invention. It receives query instructions from the natural language parsing step and a preprocessed data catalog from the IFC preprocessing step. Its main process includes three steps: conditional filtering, attribute extraction, and result merging and structuring.

[0046] Furthermore, for the conditional filtering step, the tool first loads the corresponding chunk file (such as IfcWall.json) based on the target_entity. Then, it uses a step-by-step filtering algorithm (corresponding to the filter_step_by_step function in the code) to apply each condition in the conditions list sequentially. Each condition is processed by a registered filtering function. For example, for the condition {"floor": "Second Floor"}, the system calls the "floor filter". The implementation logic of this filter is as shown in the code example: by parsing the containedInStructure reference chain of the component, it locates the floor entity to which it belongs and matches it with the target value.

[0047] Further, for the attribute extraction step, after obtaining the filtered list of elements, the tool invokes the corresponding attribute extractor according to the target_property list. For example, for "typeset", the system invokes the type definition extractor (e.g. code example typeset.py). The key algorithm of this extractor is: 1) locate the type entity that the element belongs to through isTypedBy or global search of IfcRelDefinesByType relationship; 2) extract all property sets associated with the type and IfcPropertySingleValue under them through the hasPropertySets relationship, and form a structured type attribute tree.

[0048] Further, for the result merging and structuring step, the tool merges all extracted attributes according to the element globalId. Then, the result set is classified using the structure signature algorithm, and finally a summary report containing the total number, category statistics and category examples is output. This design makes the query result clear and compact, greatly reduces the token consumption of the large language model, and facilitates user understanding.

[0049] The large language model result generation and natural language feedback step (S4) reads the JSON report generated by the conditional filtering and attribute extraction step through the LLM, analyzes and organizes the report, and generates a natural language answer that is easy for users to understand.

[0050] To more intuitively demonstrate the working process of the present application, a specific query will be used as an example for illustration.

[0051] In the embodiment, the user will query the relevant information for an example IFC standard file. The query question is: "Please tell me the material and thermal conductivity of the internal wall with fire resistance level 2h or above on the third to fourth floors of this building." To fully verify the ability of the method of the present application to process large-scale and high-complexity BIM models, the IFC model selected in this embodiment is derived from the professional Revit design sample "Snowdon Towers Sample Architectural.rvt" into IFC 4 format, with a file size of about 130 MB and a total of more than 1.33 million IFC entity objects. The model is complex in structure, covering building, structure, equipment and other multi-specialty information, including detailed geometric data, spatial relationships, material attributes, type definitions and performance parameters (such as thermal properties), and is an ideal test case for testing the effectiveness and robustness of the natural language query system in engineering practice.

[0052] S1: First is the large language model natural language query parsing step, the LLM will try to parse the user's natural language query question into three kinds of semantic information. In this embodiment, the LLM parses the query as: target_entity: "IfcWall", conditions: [{"floor": [three layers, four layers], "fire_rating": [2], "is_external":false}], target_property: ["materialset", "typeset"].

[0053] S2: Second is the IFC preprocessing step, the IFC preprocessing tool will convert the IFC file to JSON format and block it, and generate the original JSON file and the temporary directory containing IfcWall.json and other IFC object subfiles.

[0054] S3: Then is the condition filtering and attribute extraction step, the LLM will call the condition filtering and attribute extraction tool, the parameters are the above parsing results and the temporary directory path. The tool executes the following steps: a. Based on the value of "target_entity", load the original JSON file and IfcWall.json file in the path. b. Based on the value of "conditions", use the built-in program in the filter to run all the corresponding condition filtering code one by one, and filter out all the IfcWall objects in IfcWall.json that meet the conditions. Assuming that N components are obtained. c. Based on the value of "target_property", for the N components, call the built-in program in the extractor to get the material properties, construction properties and other information associated with each component. d. Merge the results by component and use the structure signature algorithm to classify, and generate the final JSON report.

[0055] S4: Finally, the large language model result generation and natural language feedback step. The LLM will receive the above JSON report, extract the information related to the question from the report, and generate a natural language answer. For example: "After querying, there are XX faces of IfcWall that meet the requirements in the three to four layers of the building. According to the construction, it can be divided into Y categories: the first category (a total of AA faces), the material composition is……, the thermal conductivity is……; the second category (a total of BB faces)……." In summary, the user can get the professional information that needs to be familiar with the software operation and write complex queries to get, and has been summarized and arranged, in a few tens of seconds through a simple question.

[0056] The application relates to the technical field of building information model data processing, and proposes an IFC file natural language interactive query method based on a large language model. The method realizes efficient semantic retrieval through a multi-agent architecture, including: a main agent used for analyzing a user natural language query intention, classifying the natural language query intention into a semantic retrieval or parameter calculation type, and extracting three elements of a target entity, a query condition and a target attribute; an IFC preprocessing tool used for converting an IFC format file into structured JSON data and splitting the IFC format file into multiple subfiles according to entity types; a condition filtering and attribute extraction tool used for filtering the JSON data in stages based on the three elements, extracting corresponding attributes and encapsulating the corresponding attributes into high-density information packages. A semantic retrieval agent coordinates the above tools to execute a process, and supports dynamic expansion of filtering conditions and attribute types through a plug-in architecture. The application aims to give full play to the capability of an LLM in natural language understanding and reasoning and task scheduling, simultaneously utilize a tool calling mechanism to realize analysis, conversion and calculation of IFC files (Industry Foundation Classes), and thus build a knowledge-type intelligent assistant capable of efficiently and semantically interacting with a user on building information.

[0057] The application further provides an electronic device including a memory and a processor, the memory storing a computer program, and the processor realizing steps of the IFC file natural language interactive query method based on the large language model when executing the computer program.

[0058] The application further provides a computer readable storage medium for storing computer instructions, and the computer instructions realize steps of the IFC file natural language interactive query method based on the large language model when executed by a processor.

[0059] The memory in the embodiments of the application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read only memory (read only memory, ROM), a programmable read only memory (programmable ROM, PROM), an erasable programmable read only memory (erasable PROM, EPROM), an electrically erasable programmable read only memory (electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (random access memory, RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM) and direct memory bus random access memory (direct rambus RAM, DR RAM). It should be noted that the memory of the method described in the application is intended to include but not limited to these and any other suitable type of memory.

[0060] In the above embodiments, all or part of the methods can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the methods can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a high-density digital video disc (DVD)), or a semiconductor medium (such as a solid state disc (SSD)), etc.

[0061] In the implementation process, each step of the above method can be completed by integrated logic circuit of hardware in the processor or instruction in the form of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware processor execution completion, or executed by hardware and software modules in the processor. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.

[0062] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with a signal processing capability. In the implementation process, each step of the method embodiments can be completed by the integrated logic circuit of hardware in the processor or the instructions in the form of software. The processor mentioned above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method.

[0063] The above describes in detail the IFC file natural language interactive query method based on a large language model. The principles and implementation manners of the present application are described by using specific examples. The above embodiment is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed. In summary, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A natural language interactive query method for IFC files based on a large language model, characterized in that, The method includes: S1: Large Language Model Natural Language Query Parsing Steps: Used to perform semantic parsing on the natural language query input by the user, extracting target entities, filtering conditions and target attributes; S2: IFC preprocessing step: used to convert IFC files into structured JSON format and split them by object type; S3: Conditional Filtering and Attribute Extraction Steps: Used to accurately filter and extract attributes from IFCJSON data based on the extracted target entities, filtering conditions, and target attributes, generating structured query results; S4: Large Language Model Result Generation and Natural Language Feedback Steps: Used to convert structured query results into natural language descriptions and return them to the user.

2. The method according to claim 1, characterized in that, Step S1 includes: Target entity extraction steps: Extract the standard IFC entity name corresponding to the target entity type from the natural language query; The filter list extraction step involves identifying and constructing a filter condition list from the natural language query, with attribute names as keys and condition values ​​as values. The query attribute extraction step identifies the list of attribute categories that the user expects to obtain from the natural language query as the target attribute.

3. The method according to claim 1, characterized in that, Step S2 includes: The IFC file parsing step is used to convert the IFC file into a structured JSON format; specifically, the IFC file is converted into a raw JSON file containing all component information, the raw JSON file containing data fields, entity types and relationship references; The object type splitting step is used to split structured JSON data into separate files according to object type; Temporary directory management steps are used to generate files in temporary folders.

4. The method according to claim 1, characterized in that, Step S3 includes: The conditional filtering step is used to filter IFC JSON data sequentially based on the extracted filtering conditions; The attribute extraction step is used to extract specified attributes from filtered data based on the extracted target attributes. The structured results generation step is used to classify and summarize components with the same target attribute values ​​and generate component type statistics.

5. The method according to claim 4, characterized in that, The conditional filtering step employs a stepwise filtering mechanism, filtering the component set sequentially according to the order of the filter condition list, where each filter condition independently acts on a specific attribute of the component.

6. The method according to claim 4, characterized in that, When the attribute extraction step extracts attribute information from the filtered components, it uses an extractor plugin based on attribute category. Each extractor plugin is specifically designed to extract one type of attribute information from the IFC component. The attribute information categories include at least one of the following: basic project information, basic component information, component type definition associated attribute information, component attribute definition associated general attribute information, component classification system definition information, associated material information, spatial location information, and geometric attribute information.

7. The method according to claim 4, characterized in that, In the structured result generation step, structural similarity analysis is performed on the component set from which attribute information has been extracted, and components with the same or similar attribute structures are classified. Summary information is generated based on the classification results. The summary information includes the total number of components, the number of different structural categories, and representative substructures.

8. The method according to claim 1, characterized in that, The S4 step includes: The structured result transformation step is used to convert structured query results into natural language descriptions.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-8.

10. A computer-readable storage medium for storing computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-8.