Architectural design automation modeling method and system combining LLM and MCP
By combining a large language model with a model context protocol, an automated architectural design modeling method is developed, which solves the problems of high cost and low flexibility in traditional Revit modeling. It achieves highly flexible natural language interaction and cross-platform automated modeling, ensuring that the generated model conforms to industry standards.
Patent Information
- Application Number
- CN202510912809.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-07-03
AI Technical Summary
Traditional Revit modeling relies on manual drawing or custom plugins developed through secondary development, resulting in long development cycles, high maintenance costs, difficulty in quickly responding to design changes, and inability to achieve true end-to-end automation and cross-platform reuse.
By combining Large Language Model (LLM) and Model Context Protocol (MCP), and driven by a local knowledge base and the MCP protocol, the entire process of design management from user requirements to automatic modeling is realized, including knowledge acquisition, indexing and updating, generating MCP protocol instruction sequences, and directly driving the modeling tools through the MCP protocol server.
It achieves highly flexible natural language interaction and cross-platform automated modeling, reduces development and maintenance costs, improves generation accuracy and flexibility, ensures that the model conforms to industry standards, and supports the orchestration of composite instructions across professions and scenarios.
Smart Images

Figure CN120409302B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of building information model automatic modeling, in particular to a building design automatic modeling method and system combining LLM and MCP. BACKGROUND
[0002] Traditional Revit modeling mainly relies on manual drawing or exclusive plug-ins based on secondary development. Such methods not only require writing a large number of scripts and extension modules, have long development cycles and high maintenance costs, but also often require repetitive custom development when adapting to new functional requirements, making it difficult to quickly respond to design changes.
[0003] The prior art CN117688632A discloses a method for intelligent three-dimensional modeling in SolidWorks based on AIGC. By fine-tuning a general large model (such as OpenAI Codex, ChatGPT-4), VB code scripts for SolidWorks are generated, and model construction is completed with the help of Visual Studio driven plug-ins. Although this scheme utilizes the automatic capabilities of large models, it still relies on model fine-tuning and exclusive secondary development tools, making it difficult to achieve cross-platform reuse and full-process automation without human intervention. The main problems are as follows: (1) high development and maintenance costs: fine-tuning models requires a large amount of computing resources, and exclusive plug-ins require repeated development, testing, and upgrading for each software; (2) insufficient flexibility: once the business scenario or software version changes, existing models and plug-ins are often difficult to quickly adapt, with slow response speed; (3) dependent on human intervention: the generated scripts still need to be manually imported into the target software through an IDE (Integrated Development Environment) or command line, and cannot achieve true "zero human operation"; (4) limited reliability: simple fine-tuned models are prone to "hallucination" output outside industry standards, lacking dynamic verification and compliance guarantees. SUMMARY
[0004] The present application provides a building design automatic modeling method and system combining LLM (Large Language Model) and MCP (Model Context Protocol) to solve the above technical problems of traditional Revit modeling methods.
[0005] According to a first aspect, a building design automatic modeling method combining LLM and MCP is provided in an embodiment, the method comprising:
[0006] Obtaining user design requirements, retrieving relevant knowledge of various types in a pre-created local knowledge base according to the user design requirements, creating a prompt word Prompt in combination with the user design requirements and the knowledge base retrieval results, inputting the obtained prompt word Prompt into a large language model, and generating an MCP protocol instruction sequence conforming to the design intent;
[0007] According to the generated MCP protocol instruction sequence, instructions are parsed and distributed, and modeling is gradually performed by calling plug-ins to generate a preliminary building model or drawing, and the obtained preliminary building model or drawing is audited and optimized, and finally automatic modeling based on the MCP protocol instructions is completed.
[0008] Further, the local knowledge base is created, specifically including:
[0009] Knowledge collection, knowledge indexing and vectorization, and knowledge updating;
[0010] The knowledge collection includes:
[0011] According to the timing task or external event, the process of automatically starting to extract items from design specification documents, historical project codes or plug-in documents is started;
[0012] Performing OCR (Optical Character Recognition) recognition on scanned documents or imaged documents, extracting key fields and performing structured processing, and labeling metadata at the same time;
[0013] Adding labels to each extracted record for subsequent quick positioning and retrieval;
[0014] The knowledge indexing and vectorization includes:
[0015] Convert the text content into a high-dimensional vector and store it in a vector database to support fast semantic retrieval;
[0016] According to the "component type-parameter-constraint" triple, establish knowledge graph nodes and relationship edges to facilitate structured query and rule reasoning;
[0017] In combination with the full-text retrieval and vector retrieval results, Top-K aggregation and relevance sorting algorithms are used to improve recall rate and accuracy;
[0018] The knowledge updating includes:
[0019] According to the audit result feedback, automatically identify new rules, abnormal cases or optimization suggestions;
[0020] The extracted new items are imported into the knowledge base in a preset format and the meta information is labeled;
[0021] After the supplement is completed, the incremental indexing process of the vector library and knowledge graph is automatically triggered to ensure that the new knowledge is instantly retrievable.
[0022] Furthermore, the user's design requirements are obtained, and the relevant knowledge is retrieved from the pre-created local knowledge base according to the user's design requirements, including:
[0023] Extract keywords from the acquired user design requirements and identify design intent;
[0024] Based on the obtained keywords and design intent, a search is performed in the local knowledge base, and the knowledge entries containing the keywords are quickly located according to the keywords. The search results are preliminarily screened in combination with the design intent, and design specifications, historical cases or standard requirements that are closely related to the design needs are prioritized.
[0025] Furthermore, the prompt word Prompt is created based on the user design requirements and the knowledge base search results, including:
[0026] Through template matching or statement generation logic, the obtained keywords, design intent, and knowledge points in the knowledge base are organically combined to create an optimized prompt. This ensures that the prompt can fully convey the design requirements and clearly guide the large language model to generate MCP protocol instruction sequences in a direction that conforms to the design intent and relevant specifications and standards.
[0027] Furthermore, the obtained prompt word Prompt is input into the large language model to generate an MCP protocol instruction sequence that meets the design intent, specifically including:
[0028] Use a large language model to generate an initial text description containing the modeling operation steps;
[0029] The generated initial text is subjected to syntax checking, semantic verification, and adjustment according to the standard format of MCP protocol instructions, and finally an MCP protocol instruction sequence is generated to describe the modeling operation steps, ensuring the logic, completeness and operability of the instruction sequence.
[0030] Furthermore, the generated MCP protocol instruction sequence is parsed and distributed, and modeling is gradually performed by calling plug-ins to generate preliminary building models or drawings, specifically including:
[0031] After obtaining the MCP protocol instruction sequence, the instructions are parsed syntactically and semantically to identify the various operation steps and related parameters in the instructions. Then, based on the type and content of the instructions, the instructions are distributed to the corresponding processing modules or plug-in methods.
[0032] Based on the pre-created mapping table of instruction types and Revit-MCP plug-in methods, the corresponding Revit-MCP plug-in method is found according to the instruction type, ensuring that the correct Revit plug-in function can be called to execute the instruction;
[0033] According to the number and complexity of instructions and the performance of Revit, the MCP protocol instruction sequence is divided into multiple batches, and the execution time and interval of each batch are formulated to avoid too many instructions being executed simultaneously, causing tool lag;
[0034] According to the batched MCP protocol instruction sequence, each instruction is pushed to the local MCP server through the JSON-RPC protocol one by one, and the MCP server transfers the instruction to the corresponding Revit plug-in;
[0035] Revit plug-in receives JSON-RPC requests from MCP server and performs parsing, extracting the command and related parameters of the instruction;
[0036] According to the parsed command and parameters, corresponding modeling operations are performed in the model space of Revit, including creating, modifying or deleting components or graphics;
[0037] After executing each instruction, Revit plug-in checks whether the operation is successful, if successful, records relevant information, if failed, captures error information and records, then returns the execution result information to MCP server through JSON-RPC protocol, finally reaches MCP scheduling layer;
[0038] After a series of instruction execution, a preliminary architectural model or drawing is generated.
[0039] Further, the obtained preliminary architectural model or drawing is audited and optimized, specifically including:
[0040] Using rule engine to check the compliance of generated model or drawing according to pre-defined design specifications and rules, verifying whether it meets the design specifications;
[0041] According to the preliminary architectural model or drawing and the compliance check report, using large language model to perform semantic review on the preliminary model and propose optimization suggestions;
[0042] The review results are fed back to the user, and the local knowledge base is updated to improve the continuous learning ability of the system.
[0043] According to the second aspect, an embodiment provides an architectural design automation modeling system combining LLM and MCP, which comprises:
[0044] An AI interaction platform is configured to obtain a user design requirement, search for relevant knowledge of various types in a pre-created local knowledge base according to the user design requirement, create a prompt word Prompt in combination with the user design requirement and the knowledge base search result, input the obtained prompt word Prompt into a large language model, and generate an MCP protocol instruction sequence conforming to a design intention.
[0045] An MCP service calling driver is configured to perform instruction analysis and distribution according to the generated MCP protocol instruction sequence, and gradually perform modeling by calling a plug-in to generate a preliminary building model or drawing, and perform auditing and optimization on the obtained preliminary building model or drawing, and finally complete automatic modeling based on the MCP protocol instruction.
[0046] Further, core components used by the MCP service calling driver include:
[0047] Component mcp-srv: an MCP protocol server bridging the AI interaction platform and the Revit plug-in, responsible for receiving an AI interaction platform instruction and forwarding the instruction to the Revit plug-in through a Socket;
[0048] Component mcp-cmd: a dynamic link library resource DLL with a "function instruction set", loaded and used by the plug-in end mcp-addin;
[0049] Component mcp-addin: a Revit MCP plug-in, an external application in Revit, responsible for loading a command set, establishing communication, and executing a command;
[0050] The AI interaction platform converts a user's design requirement into a request conforming to the MCP protocol according to a preset rule or algorithm, and sends the MCP request to the mcp-srv;
[0051] The mcp-srv receives the MCP request from the AI interaction platform, analyzes the request content, determines the plug-in and function to be called, and generates and sends a corresponding Socket message to the mcp-addin;
[0052] The mcp-addin receives the Socket message from the mcp-srv, triggers an ExternalEvent according to the message content, to call an instruction in the corresponding command set DLL;
[0053] The instruction in the DLL calls a Revit API to perform a specific modeling operation in the Revit application, and after the modeling operation is performed, the Revit application feeds back the execution result to the mcp-addin;
[0054] The mcp-addin processes and encapsulates the execution result, generates a Socket response, and sends the Socket response to the mcp-srv;
[0055] The mcp-srv receives the Socket response from the plug-in, parses and processes the content of the Socket response, generates a response conforming to the MCP protocol, and sends the response to the AI interaction platform.
[0056] According to a third aspect, an embodiment provides an electronic device, the device comprising: a processor and a memory;
[0057] The memory is configured to store one or more program instructions;
[0058] The processor is configured to execute the one or more program instructions to perform the steps of the method for automated modeling of architectural design in combination with LLM and MCP according to any one of the preceding aspects.
[0059] According to a fourth aspect, an embodiment provides a computer-readable storage medium having stored thereon a computer program, the computer program, when executed by a processor, implementing the steps of the method for automated modeling of architectural design in combination with LLM and MCP according to any one of the preceding aspects.
[0060] The present application provides a method and system for automated modeling of architectural design in combination with LLM and MCP. Through four core mechanisms of "native large model reasoning + local knowledge base constraint + MCP protocol driving + man-machine closed loop review", a full-process design management system is constructed from user demand to automatic modeling, intelligent review and knowledge updating. Compared with the traditional single Revit secondary development framework, the present application has significantly improved in design freedom, generation accuracy, operation automation and continuous optimization capability. Specifically, the present application has the following beneficial effects:
[0061] (1) Natural language driven, higher design freedom
[0062] Intuitive interaction: users can directly issue modeling instructions through natural language without mastering complex API (Application Programming Interface) or script syntax, greatly reducing the use threshold and learning cost;
[0063] High flexibility: LLM can understand and respond to diverse needs (such as "create a three-story framework structure and automatically arrange beams and columns") in real time, supporting cross-professional and cross-scenario composite instruction arrangement;
[0064] Collaborative efficiency: the multi-agent collaborative modeling method based on LLM can accelerate design iteration and enhance real-time data exchange and adaptability problem solving capability.
[0065] (2) Local knowledge base, significantly reducing hallucination rate
[0066] Truth assurance: Integrate internal specification documents and historical cases, and strictly constrain the LLM generation process within the range of verifiable knowledge through retrieval-augmented generation (RAG) technology, significantly reducing "fabricated" errors.
[0067] Compliance improvement: Structured vectorization indexing of regulations, standards and company internal processes in the construction industry can verify in real time whether the output model meets various constraint conditions.
[0068] Advanced prompt optimization: Combined with advanced RAG technologies such as Chain-of-Thought (CoT) and Chain-of-Verification (CoVe), further guarantee the logicality and accuracy of the generated results.
[0069] (3) MCP protocol, seamlessly realize full automation driving
[0070] Protocol unification: MCP provides a standard instruction format based on JSON-RPC, allowing LLM to issue consistent modeling commands across tools such as Revit and AutoCAD.
[0071] Transcription-free operation: Through the MCP protocol server, the JSON instructions output by LLM can be directly issued to various tool plugins without the need for manual scripting or copy-pasting scripts.
[0072] Strong scalability: As the MCP ecosystem matures, more professional software and data sources can be easily connected, avoiding the need to develop interfaces for each new tool. BRIEF DESCRIPTION OF DRAWINGS
[0073] Figure 1 A flowchart of an architectural design automation modeling method combining LLM and MCP provided by an embodiment of the present application;
[0074] Figure 2 A flowchart of generating MCP instructions using LLM in combination with a local knowledge base in an architectural design automation modeling method combining LLM and MCP provided by an embodiment of the present application;
[0075] Figure 3 A Revit automatic modeling flowchart based on MCP protocol instructions in an architectural design automation modeling method combining LLM and MCP provided by an embodiment of the present application;
[0076] Figure 4A modeling example in a building design automation modeling method combining LLM and MCP is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0077] The present application will be further described below in detail with specific embodiments in conjunction with the drawings. Similar elements in different embodiments are denoted by similar reference numerals. In the following embodiments, many details are described in order to make the present application better understood. However, one skilled in the art can easily recognize that some features can be omitted in different cases, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification in order to avoid the core part of the present application being overwhelmed by too much description, and it is not necessary to describe these related operations in detail for one skilled in the art according to the description in the specification and general technical knowledge in the art.
[0078] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various embodiments. At the same time, the steps or actions in the method description can also be sequentially adjusted or adjusted in a manner that one skilled in the art can easily see. Therefore, the various sequences in the specification and drawings are only for the purpose of clearly describing a certain embodiment, and do not mean that the sequence is necessary, unless otherwise stated that a certain sequence must be followed.
[0079] The building design automation modeling method combining LLM and MCP provided by the embodiment of the present application is described below in conjunction with Figure 1 in detail.
[0080] The present embodiment is composed of two application programs:
[0081] (1) Visual LLM interaction program (hereinafter referred to as AI interaction platform):
[0082] Responsible for receiving user input, knowledge retrieval and prompt optimization, and interaction with large language models.
[0083] The core functions include local knowledge base management, Prompt assembly, multi-round context maintenance, etc.
[0084] After the user completes the construction of the local knowledge base system, the "AI interaction platform" undertakes all design interaction tasks of the large language model. Its core responsibilities are: through the retrieval of the enhanced Prompt generation mechanism, dynamically combine the user's natural language requirements with the specifications and cases in the local knowledge base, output optimized MCP instructions, significantly reduce the model illusion risk, and directly drive the backend modeling tool.
[0085] The "AI Interaction Platform" draws on the interactive design of ChatGPT web page. Users can conduct natural language dialogue and model invocation through the browser without writing command lines. Model inference and data processing are completed in the local environment without any cloud dependence, ensuring data privacy and response speed.
[0086] Its main functions are as follows:
[0087] 1. Multi-model backend adaptation:
[0088] Supports mainstream LLMs such as Ollama, OpenAI API, and Claude, seamlessly switching and connecting as needed.
[0089] 2. Knowledge retrieval and Prompt optimization.
[0090] 3. Semantic analysis of user input, retrieval of standard clauses, historical cases, and graph nodes in the local knowledge base.
[0091] 4. Fusion of retrieval results and structured templates to dynamically generate high-quality prompts and significantly reduce hallucinations.
[0092] 5. Conversation management and template library.
[0093] 6. Automatic labeling of conversation topics, supporting conversation saving, recovery, and cross-project tracking.
[0094] 7. Built-in building, structural, mechanical, and electrical scene Prompt templates for one-click application and accelerated startup.
[0095] 8. MCP Proxy (mcpo) transparent integration.
[0096] 9. Convert JSON-RPC of MCP protocol to standard OpenAPI (RESTful) interface without modifying existing tools.
[0097] 10. Plug and play: after starting mcpo, any MCP-compliant server can be invoked in the platform.
[0098] 11. With mcpo, any MCP can be connected to the "Interaction Platform" and produce strong synergy with LLM and third-party applications.
[0099] 12. With the mcpo function of the interaction platform, RevitMCP tools can be connected to the "AI Interaction Platform" and use the local knowledge base system to generate MCP instructions with LLM.
[0100] (2) MCP service invocation driver:
[0101] Responsible for parsing, scheduling and delivering MCP instruction sets output by LLM to specific BIM tools (such as Revit).
[0102] Core functions include MCP instruction compilation, JSON-RPC service management, instruction batch and rhythm control, execution result feedback, etc.
[0103] Together they form a closed-loop "design management system" that realizes the full-process automation of "user demand → knowledge retrieval → prompt optimization → model reasoning → MCP scheduling → tool modeling → review feedback".
[0104] Core module description:
[0105] 1. Visual LLM interaction program
[0106] 1.1 Web front-end interaction interface
[0107] Function: Receive user natural language requirements, show progress and visual review results.
[0108] Technology stack: React / Vue + RESTful API.
[0109] 1.2 Local knowledge base management system
[0110] Document collection: automatically import internal network design specification documents and historical project design files.
[0111] Knowledge graph construction: organize "component-parameter-constraint" relationships in node / edge mode, support rule query.
[0112] Vector index: vectorize text and graph nodes for fast semantic retrieval.
[0113] Retrieval optimization: Top-K result aggregation, summary generation, context relevance sorting.
[0114] 1.3 Prompt optimization engine
[0115] Intention analysis: NLP (Natural Language Processing) module multi-round analysis of user demand intention.
[0116] Prompt generation: integrate user intention, specification fragments and historical dialogue to generate structured prompts.
[0117] Context maintenance: manage dialogue state, support segmented reuse and multi-task switching.
[0118] 1.4 LLM reasoning interface
[0119] Request packaging: pass the optimized Prompt to large models such as DeepSeek through gRPC / REST.
[0120] Response analysis: pre-analyze the natural language or JSON MCP instructions output by the LLM.
[0121] Among them, the specific content of the local knowledge base management system is as follows:
[0122] Although the local knowledge base management system is an embedded subsystem of the "visual LLM interaction platform" (hereinafter referred to as "AI interaction platform"), it needs to be used as a pre-module of the system, responsible for the management of the knowledge base and the key of large model prompt optimization. Users need to pre-process internal design specifications, experience documents, and existing project data, use the local knowledge base system to build a knowledge graph or embedded vector library, and introduce internal design specifications, design experience, and other documents to build a knowledge graph / semantic constraint.
[0123] The local knowledge base system is an open-source RAG engine based on deep document understanding, which provides a simplified RAG workflow and reliable question and answer based on large language models for various complex format data provided by users.
[0124] Its main functions are as follows:
[0125] 1. Based on deep document understanding, it can extract key information from various complex unstructured data.
[0126] 2. The text slicing process is visualized and supports manual adjustment.
[0127] 3. The answer provides key references and supports tracing the source, minimizing illusions.
[0128] 4. Supports compatibility with various file types, including Word documents, PPT, Excel spreadsheets, txt files, images, PDFs, etc.
[0129] 5. Supports large language model LLM and vector model configuration.
[0130] 6. Based on multi-path recall, fusion and reordering.
[0131] 7. Provides easy-to-use APIs that can be integrated into various third-party systems.
[0132] Local knowledge base management system process overview:
[0133] The local knowledge base management system is composed of three sub-processes: knowledge acquisition, knowledge indexing and vectorization, and knowledge updating, and forms a closed loop with the review feedback link of the main program, continuously improving the knowledge base content. The specific process is as follows:
[0134] Phase 1: Knowledge Acquisition
[0135] Step 1: Automated Trigger. Initiate the extraction process from design specification documents (PDF, Word), historical project code, and plugin documentation based on scheduled tasks or external events.
[0136] Step 2: OCR and Structuring. Perform OCR on scanned or imaged documents, extract key fields, and structure them while annotating metadata (e.g., version number, release date).
[0137] Step 3: Metadata Management. Add tags (project, specialty, source) to each extracted record for quick location and retrieval later.
[0138] Phase 2: Knowledge Indexing and Vectorization
[0139] Step 4: Vectorization Storage. Convert specification clauses, experience points, and other textual content into high-dimensional vectors and store them in a vector database like FAISS (Facebook AI Similarity Search), supporting fast semantic retrieval.
[0140] Step 5: Knowledge Graph Construction. Establish graph nodes and relationship edges based on "component type - parameter - constraint" triples for structured query and rule reasoning.
[0141] Step 6: Retrieval Optimization. Combine full-text retrieval and vector retrieval results, use Top-K aggregation and relevance sorting algorithms to improve recall and precision.
[0142] Phase 3: Knowledge Update
[0143] Step 7: Review Feedback Extraction. Automatically identify new rules, abnormal cases, or optimization suggestions from the main program's review results and user modification records.
[0144] Step 8: Knowledge Supplement. Import the extracted new items into the knowledge base in a preset format, and annotate metadata such as source and time.
[0145] Step 9: Index Trigger. After completion, automatically trigger the incremental indexing process of the vector library and graph to ensure that new knowledge is immediately retrievable.
[0146] 2. MCP Service Call Driver Program
[0147] The "MCP service call driver" (shortened as "driver") of the present embodiment is mainly written in C# and is an independent encapsulated Revit auxiliary program. Not only does it define a series of core operation command sets such as CRUD (create, get, modify, delete) on Revit elements, but also serves as a C# plug-in that can run within Revit. By loading the command set and implementing the logic of receiving, scheduling, and executing commands, Revit can truly execute the operations issued by AI.
[0148] 2.1 MCP Instruction Set Management
[0149] Protocol Definition: Based on the JSON-RPC command specification, define general modeling instructions (create / modify / delete components).
[0150] Instruction Compilation: Compile the high-level instruction text output by LLM into a JSON object conforming to the MCP Schema.
[0151] 2.2 MCP-Server Service
[0152] Communication Management: Listen to the instruction queue from the LLM interface and maintain a two-way channel with the front end and tool plug-ins.
[0153] Security Check: Check user permissions, instruction legality, and rate limit.
[0154] 2.3 Instruction Scheduling and Pace Control
[0155] Batch Strategy: According to complexity and system load, split instructions into several batches.
[0156] Rate Limiting: Dynamically adjust the issuance frequency to avoid tool lag or network congestion.
[0157] 2.4 Tool Plug-in Adaptation Layer
[0158] Revit-MCP Adapter: Receive MCP calls and map them to Revit API operations.
[0159] 2.5 Execution Feedback and Logs
[0160] Execution Result Summary: Collect the success / failure status and error information of each instruction.
[0161] Real-time Monitoring Panel: Display tool execution progress and abnormal alarms on the front end.
[0162] For example, Figure 1As shown, in step S100, the user's design requirements are obtained, and relevant knowledge of various types is obtained by searching in the pre-created local knowledge base according to the user's design requirements. The prompt words Prompt are created in combination with the user's design requirements and the knowledge base search results, the obtained prompt words Prompt are input into the large language model, and the MCP protocol instruction sequence conforming to the design intention is generated.
[0163] As shown, the following is a specific step-by-step discussion of generating MCP instructions using LLM combined with local knowledge base: Figure 2
[0164] S110: User input requirements
[0165] Input: The user inputs design requirements to the system through natural language, for example, "design a conference room layout that can accommodate 500 people".
[0166] Output: The system receives the text information, and there is no additional output.
[0167] Logical association: This is the starting point of the entire process, and the user's input requirements provide a basis and direction for all subsequent operations.
[0168] S120: System receives and displays preliminary feedback
[0169] Input: Receive the design requirement text input by the user in the previous step.
[0170] Output: The system shows the user preliminary feedback such as "Your conference room layout design requirements have been received, and we are processing them" and other simple prompt information.
[0171] Logical association: It shows the user that the system has started working, and plays a role in interacting with the user to avoid the user's uncertainty about whether the system is running due to no feedback.
[0172] S130: Extract keywords and identify design intention
[0173] Input: Natural language design requirements input by the user, for example, "design a conference room layout that can accommodate 500 people".
[0174] Output: Extracted keywords such as "500 people", "conference room", "layout", etc., and the identified design intention is to design a conference room space layout, focusing on the design requirements related to accommodating the number of people.
[0175] Intermediate calculation process: The system uses natural language processing technology to perform morphological analysis, syntactic analysis, etc. on the input text, and through semantic understanding to mine keywords and intentions. This may involve pre-trained language models extracting text features and pattern recognition to accurately grasp the core points of the user's requirements.
[0176] Logical association: Accurate keyword extraction and design intent recognition are crucial for subsequent retrieval of effective information in the local knowledge base. Only when the user's true demand point is clear can useful knowledge be targeted from the knowledge base.
[0177] S140: Local knowledge base retrieval
[0178] Input: Keywords extracted in the previous step, such as "conference room", "layout", "capacity", etc., and the identified design intent.
[0179] Output: Retrieve design specifications related to conference room layout design (such as conference room space planning standards, safety passage requirements, etc.), historical cases (past successful or typical conference room layout design schemes), standard requirements (including building codes, fire codes, etc. applicable requirements in conference room design) from the local knowledge base.
[0180] Intermediate calculation process: The local knowledge base uses retrieval techniques such as inverted index to quickly locate knowledge items containing these keywords, and combines the design intent to preliminarily filter the retrieval results, and preferentially selects various types of knowledge resources closely related to conference room layout design.
[0181] Logical association: The local knowledge base provides rich background knowledge and practical experience support for the entire instruction generation process. These retrieval results will serve as materials for building optimized prompts (Prompts) and will be integrated into subsequent guidance to large language models, enabling them to generate MCP instructions that are more in line with actual needs based on accurate and relevant information.
[0182] S150: Build optimized prompts (Prompts)
[0183] Input: Extracted keywords, design intent, and relevant design specifications, historical cases, and standard requirements retrieved from the local knowledge base.
[0184] Output: Build an optimized prompt, such as "Design a conference room layout that can accommodate 500 people according to conference room design specifications, refer to past successful conference room cases, and meet fire safety standards and maximize space utilization requirements", etc., forming a context-rich and targeted prompt information.
[0185] Intermediate calculation process: Through certain template matching or sentence generation logic, keywords, design intent, and knowledge points in the knowledge base are organically combined to ensure that prompt information can fully convey design requirements and clearly guide large language models to generate instruction sequences that meet design intent and relevant specification standards. This may involve further processing and organizing of retrieval results to integrate scattered knowledge points into a coherent, logically structured prompt sentence.
[0186] Logical connection: This optimized prompt serves as a bridge, integrating the various types of information obtained earlier into a form that is easy for large language models to understand and process, thereby providing strong guidance for generating high-quality MCP instructions.
[0187] S160: Input prompt to native large language model
[0188] Input: The above-mentioned optimized prompt, such as "According to the conference room design specifications, design a conference room layout that can accommodate 500 people, refer to successful conference room cases in the past, and meet the requirements of fire safety standards and maximum space utilization."
[0189] Output: The native large language model (such as DeepSeek) receives this prompt and begins processing based on its internal training knowledge and model architecture.
[0190] Intermediate calculation process: The native large language model uses its vast training data and complex neural network structure to perform semantic understanding and knowledge association on the prompt, generating corresponding text output. It will follow the requirements in the prompt and combine its knowledge of architectural layout, space planning, etc. to think about how to construct a conference room layout that meets the requirements, such as initial modeling operation steps such as planning seat arrangement, determining podium location, etc.
[0191] Logical connection: The native large language model is the core engine for generating the final MCP instructions, using its powerful language generation capabilities to convert the previously optimized and integrated prompt into specific, executable modeling operation steps, thereby realizing the transformation from requirements to actual operational instructions.
[0192] S170: Generate MCP instruction sequence
[0193] Input: The initial text information generated by the native large language model based on the prompt, such as some operation suggestions or step descriptions about conference room layout.
[0194] Output: MCP instruction sequence that meets the design intent, specifically describing the operation steps for building a conference room layout model, such as "Step 1: Draw the general outline of the conference room; Step 2: According to the requirement of accommodating 500 people, determine the seat area according to the space standard required by each person; Step 3: Arrange the aisle position in the seat area to meet the fire evacuation requirements; Step 4: Set the podium position to ensure good visibility and coordinate the layout with the seat area" and a series of detailed modeling instruction sequences.
[0195] Intermediate computation: The text generated by the native large language model is further screened, organized, and optimized to ensure the logic, completeness, and operability of the instruction sequence. This may involve syntax checking and semantic verification of the generated text, as well as adjusting it to the standard format of MCP instructions, to ensure that it can accurately guide subsequent modeling work.
[0196] Logical association: This is the final output link of the entire process. The generated MCP instruction sequence will be directly applied to the actual modeling operation, realizing the transformation of user design requirements into specific model building steps, providing a clear operational guide for the entire modeling process, and completing the entire task goal from requirement input to instruction generation.
[0197] like Figure 1 As shown, in step S200, instructions are parsed and distributed according to the generated MCP protocol instruction sequence, and modeling is gradually performed by calling the plug-in to generate a preliminary building model or drawing, and the obtained preliminary building model or drawing is reviewed and optimized, and finally the automatic modeling based on the MCP protocol instructions is completed.
[0198] like Figure 3 As shown, the following is a detailed discussion of the Revit automatic modeling process based on MCP protocol instructions:
[0199] S210: Receive and execute MCP instructions, parse and distribute instructions.
[0200] Input: MCP instruction sequence, for example, the instruction sequence for conference room layout generated from the previous process: "Design a conference room layout that can accommodate 500 people, meeting the floor space requirement of 1.5 square meters per person..."
[0201] Output: parsed instructions and dispatched instruction sequence.
[0202] Intermediate computational process: After receiving an MCP instruction, the system first parses the instruction grammatically and semantically, identifying the individual operational steps and related parameters, such as specific requirements for conference room layout design, such as seating arrangement, aisle width, and podium location. Based on the instruction type and content, the system then dispatches the instruction to the appropriate processing module or plug-in method.
[0203] Logical association: This is the starting point of the entire automatic modeling process, ensuring that subsequent operations can be executed accurately according to instructions.
[0204] S220: Look up the table based on the command type and find the corresponding Revit-MCP plug-in method.
[0205] Input: Parsed MCP instructions, such as "Draw the rough outline of the conference room and determine its length and width..."
[0206] Output: Corresponding Revit-MCP plugin method, such as "Revit-Create-Room-Outline".
[0207] Intermediate calculation process: The system maintains a mapping table of instruction types and Revit-MCP plugin methods. By looking up this table, the corresponding plugin method is found according to the instruction type (such as drawing outlines, arranging seats, etc.).
[0208] Logical association: Provides method basis for subsequent specific modeling operations, ensuring that the correct Revit plugin function can be called to execute the instruction.
[0209] S230: To avoid tool lag, batch and rhythm control of instructions.
[0210] Input: MCP instruction sequence that needs to be executed.
[0211] Output: Batched instruction sequence and execution rhythm plan.
[0212] Intermediate calculation process: According to the number and complexity of instructions, as well as the performance of Revit, the instruction sequence is divided into multiple batches, and the execution time and interval of each batch are formulated to avoid simultaneous execution of too many instructions causing tool lag.
[0213] Logical association: Ensures the smoothness of the entire modeling process, improves the stability and user experience of the system.
[0214] S240: Push each instruction to the local MCP server in turn through JSON-RPC, and the server gives it to the corresponding Revit plugin.
[0215] Input: Batched MCP instruction sequence.
[0216] Output: Instruction request sent through JSON-RPC protocol.
[0217] Intermediate calculation process: Convert each instruction into a JSON-RPC format request, including the instruction's method name, parameters, etc. Then send it to the local MCP server in turn, and the server forwards the request to the corresponding Revit plugin.
[0218] Logical association: Implements the transmission and invocation of instructions from the MCP system to the Revit plugin, providing technical support for subsequent modeling operations.
[0219] S250: Revit plugin receives JSON-RPC and parses commands and parameters.
[0220] Input: JSON-RPC instruction request from the MCP server.
[0221] Output: Parsed command and parameters.
[0222] Intermediate calculation process: After receiving the JSON-RPC request, the Revit plugin parses it, extracting the command (such as creating a component, modifying properties, etc.) and related parameters (such as the type, size, and location of the component).
[0223] Logical association: Prepare for subsequent execution of specific operations in the Revit model, ensuring that the plugin can correctly understand the requirements of the instructions.
[0224] S260: Create, modify, or delete components or graphics in the model space
[0225] Input: Parsed command and parameters, such as "create a conference room outline, 30 meters long, 25 meters wide".
[0226] Output: Updated Revit model containing newly created, modified, or deleted components or graphics.
[0227] Intermediate calculation process: Perform corresponding operations in the Revit model space based on the parsed command and parameters. For example, use the Revit API to create a conference room outline component with specified dimensions, or modify the properties of existing components, such as moving seats, adjusting aisle width, etc.
[0228] Logical association: This is the actual modeling operation step, which translates instructions into specific model changes and gradually builds a complete building model, as shown in the figure. Figure 4
[0229] S270: Return the execution result (success / failure, error information) of each instruction to the MCP scheduling layer
[0230] Input: The result of instruction execution, such as "create a conference room outline successfully" or "modify seat position failed, parameter error".
[0231] Output: Return the execution result information to the MCP scheduling layer.
[0232] Intermediate calculation process: After executing each instruction, the Revit plugin checks whether the operation is successful. If successful, it records the relevant information; if failed, it captures error information and records it. Then it returns this information to the MCP server through the JSON-RPC protocol, and finally to the MCP scheduling layer.
[0233] Logical association: Allows the MCP system to understand the execution of instructions in real time, handle failed instructions or make appropriate adjustments in a timely manner, ensuring the smooth progress of the entire modeling process.
[0234] S280: Generate preliminary architectural model or drawings
[0235] Input: Revit model after a series of instructions are executed.
[0236] Output: Preliminary architectural model or drawings.
[0237] Intermediate calculation process: In Revit, based on the completed modeling operations, a preliminary three-dimensional architectural model or two-dimensional drawing view is generated. This may involve setting the display style of the view, adding annotations and dimensions, and other operations.
[0238] Logical association: Provides a basis for subsequent model checking and optimization, ensuring that the generated model meets basic design requirements.
[0239] S290: Rule engine performs compliance check on the generated model or drawings to verify compliance with design specifications
[0240] Input: Preliminary architectural model or drawings.
[0241] Output: Compliance check report indicating which parts of the model comply with and do not comply with design specifications.
[0242] Intermediate calculation process: The rule engine automatically checks the model according to predefined design specifications and rules (such as building codes, fire safety codes, etc.). For example, check whether the width of the evacuation passage in the conference room meets the minimum requirement, whether the seat arrangement meets the field of view requirement, etc.
[0243] Logical association: Ensures that the generated model is correct in terms of design specifications, and timely discovers and corrects possible problems, improving the quality and reliability of the model.
[0244] S2100: Large model performs semantic review of the model and proposes optimization suggestions
[0245] Input: Preliminary architectural model or drawings and compliance check report.
[0246] Output: Optimization suggestions proposed by the large model, such as "Suggest adjusting the seat arrangement in the conference room to improve space utilization."
[0247] Intermediate calculation process: The large model combines its understanding of architectural knowledge and analysis of the model to identify possible improvements in the model. For example, by analyzing the layout and use of the conference room, it suggests adjusting the seat arrangement to better utilize space, or optimizing the passage design to improve personnel evacuation efficiency.
[0248] Logical association: Further improves the performance and quality of the model, making it more in line with actual use requirements and design intentions.
[0249] S2110: Feedback the review results to the user and update the local knowledge base to improve the continuous learning ability of the system
[0250] Input: Optimization suggestions and compliance check reports proposed by the large model.
[0251] Output: Feedback the review results and optimization suggestions to the user, and update the local knowledge base.
[0252] Intermediate calculation process: Organize the review results and optimization suggestions into a report that users can understand, and feedback to the user through the user interface. At the same time, record these review results and suggestions as new knowledge in the local knowledge base for reference and learning in future design and modeling processes.
[0253] Logical association: Achieve continuous improvement and learning of the system, continuously improve the accuracy and quality of automatic modeling by accumulating experience and knowledge, and provide better services to users.
[0254] In this embodiment, the "driver" can achieve the technical purpose of LLM interaction driving Revit, mainly relying on its core components: "mcp-srv", "mcp-cmd" and "mcp-addin", which constitute an end-to-end solution based on MCP.
[0255] Component description:
[0256] Component mcp-srv: As a Revit MCP protocol service end, it bridges the AI interaction platform and the MCP protocol server of the Revit plug-in. Specifically, the MCP server implemented by Node.js / TypeScript interfaces the AI interaction platform, responsible for receiving AI instructions and forwarding Revit through Socket.
[0257] Component mcp-cmd: As a Revit MCP command set library, it defines and implements the core command library for Revit element operations. Specifically, the core command set library written in C# defines a series of operation commands such as CRUD (create, get, modify, delete) for Revit elements, as a "function instruction set" dynamic link library resource (DLL), which is loaded and used by the plug-in end (mcp-addin).
[0258] Component mcp-addin: As a Revit MCP plug-in, it is an external application in Revit, responsible for loading command sets, establishing communication and executing commands. Specifically, the C# plug-in running in Revit loads the command set (including mcp-cmd) and implements the logic of receiving, scheduling and executing these commands, so that Revit can really execute the operations issued by AI. The interaction process between components is as follows:
[0259] Step 1: AI Client Makes a Request
[0260] Input: User inputs design requirements or operation instructions in the "AI Interaction Platform".
[0261] Intermediate Calculation Process: The "AI Interaction Platform" converts the user's input into a request that complies with the MCP protocol based on pre-set rules or algorithms.
[0262] Output: Generate MCP request and send to mcp-srv.
[0263] Step 2: MCP Server Receives Request
[0264] Input: MCP server receives MCP request from "AI Interaction Platform".
[0265] Intermediate Calculation Process: Server parses the request content, determines the required plug-in and function, and generates corresponding Socket messages.
[0266] Output: Send Socket messages to mcp-addin.
[0267] Step 3: Plug-in Triggers ExternalEvent
[0268] Input: mcp-addin receives Socket messages from MCP server.
[0269] Intermediate Calculation Process: Plug-in triggers ExternalEvent based on message content to call instructions in corresponding command set DLL.
[0270] Output: Call instructions in mcp-cmd DLL through ExternalEvent.
[0271] Step 4: Call Revit API
[0272] Input: mcp-cmd DLL receives trigger signal of ExternalEvent.
[0273] Intermediate Calculation Process: Instructions in DLL execute specific modeling operations by calling Revit API.
[0274] Output: Execute corresponding modeling operations in Revit application and return execution results.
[0275] Step 5: Feedback Execution Results
[0276] Input: Revit application executes modeling operations and feeds back execution results to mcp-addin.
[0277] Intermediate computing process: the plug-in processes and encapsulates the execution result to generate a Socket response.
[0278] Output: send the Socket response to the MCP server.
[0279] Step 6: the MCP server returns a response
[0280] Input: the MCP server receives the Socket response from the plug-in.
[0281] Intermediate computing process: the server parses and processes the response content to generate a response conforming to the MCP protocol.
[0282] Output: send the MCP response to the AI client
[0283] Corresponding to the above disclosed building design automation modeling method combining LLM and MCP, the embodiment of the present application further discloses a building design automation modeling system combining LLM and MCP, which specifically comprises:
[0284] An AI interaction platform is used to obtain user design requirements, retrieve related knowledge of various types in a pre-created local knowledge base according to the user design requirements, create a prompt word Prompt in combination with the user design requirements and the knowledge base retrieval results, input the obtained prompt word Prompt into a large language model, and generate an MCP protocol instruction sequence conforming to the design intent.
[0285] A MCP service calling driver is used to perform instruction parsing and distribution according to the generated MCP protocol instruction sequence, and gradually perform modeling by calling plug-ins, generate a preliminary building model or drawing, and perform auditing and optimization on the obtained preliminary building model or drawing, and finally complete automatic modeling based on the MCP protocol instructions.
[0286] Further, the core components used by the MCP service calling driver include:
[0287] Component mcp-srv: MCP protocol server bridging the AI interaction platform and Revit plug-in, responsible for receiving AI interaction platform instructions and forwarding them to Revit plug-in through Socket;
[0288] Component mcp-cmd: as a "function instruction set" dynamic link library resource DLL, loaded and used by the plug-in end mcp-addin;
[0289] Component mcp-addin: as a Revit MCP plug-in, an external application in Revit, responsible for loading the command set, establishing communication and executing the command;
[0290] The AI interaction platform converts the design requirements of the user into a request conforming to the MCP protocol according to preset rules or algorithms, and sends the MCP request to the mcp-srv;
[0291] The mcp-srv receives the MCP request from the AI interaction platform, parses the request content, determines the required plug-in and function to be called, and generates a corresponding Socket message and sends it to the mcp-addin;
[0292] The mcp-addin receives the Socket message from the mcp-srv, triggers an ExternalEvent according to the message content, to call the instructions in the corresponding command set DLL;
[0293] The instructions in the DLL execute specific modeling operations in the Revit application by calling the Revit API, and after executing the modeling operations, the Revit application feeds back the execution result to the mcp-addin;
[0294] The mcp-addin processes and encapsulates the execution result, generates a Socket response, and sends the Socket response to the mcp-srv;
[0295] The mcp-srv receives the Socket response from the plug-in, parses and processes the Socket response content, generates a response conforming to the MCP protocol, and sends it to the AI interaction platform.
[0296] It should be noted that the detailed description of the building design automation modeling system combining LLM and MCP provided by the embodiment of the present application can refer to the related description of the building design automation modeling method combining LLM and MCP provided by the embodiment of the present application, which will not be repeated here.
[0297] In addition, the embodiment of the present application also provides an electronic device, which comprises a processor and a memory; the memory is used to store one or more program instructions; the processor is used to run one or more program instructions to execute the steps of the building design automation modeling method combining LLM and MCP as described in any one of the above.
[0298] It should be noted that the detailed description of the electronic device provided by the embodiment of the present application can refer to the related description of the building design automation modeling method combining LLM and MCP provided by the embodiment of the present application, which will not be repeated here.
[0299] In addition, the embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the building design automation modeling method combined with LLM and MCP.
[0300] It should be noted that the detailed description of the computer readable storage medium provided by the embodiment of the present application can refer to the related description of the building design automation modeling method combined with LLM and MCP provided by the embodiment of the present application, and will not be repeated here.
[0301] Those skilled in the art can understand that all or part of the functions of the various methods in the above embodiments can be realized by hardware or by a computer program. When all or part of the functions in the above embodiments are realized by a computer program, the program can be stored in a computer readable storage medium, and the storage medium can include a read-only memory, a random access memory, a magnetic disk, an optical disk, a hard disk, etc. The above functions are realized by executing the program by a computer. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, the above all or part of the functions are realized. In addition, when all or part of the functions in the above embodiments are realized by a computer program, the program can also be stored in a server, another computer, a disk, an optical disk, a flash disk or a mobile hard disk, etc. The storage medium is downloaded or copied into the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, the above all or part of the functions in the embodiments are realized.
[0302] The above application of specific examples is used to illustrate the present application, and is only used to help understand the present application, and does not limit the present application. According to the idea of the present application, those skilled in the art can make several simple deductions, deformations or substitutions.
Claims
1. A method for architectural design automation modeling by combining LLM and MCP, characterized in that, The method comprises: Obtaining user design requirements, retrieving relevant knowledge of various types in a pre-created local knowledge base according to the user design requirements, creating a prompt word Prompt in combination with the user design requirements and the knowledge base retrieval results, inputting the obtained prompt word Prompt into a large language model, and generating an MCP protocol instruction sequence conforming to the design intent; According to the generated MCP protocol instruction sequence, the instructions are parsed and distributed, and modeling is performed step by step by calling the plug-in to generate a preliminary building model or drawing, and the obtained preliminary building model or drawing is audited and optimized to finally complete the automatic modeling based on the MCP protocol instructions; Obtaining user design requirements, retrieving relevant knowledge of various types in a pre-created local knowledge base according to the user design requirements, specifically including: Extracting keywords from the obtained user design requirements and identifying design intent; Based on the obtained keywords and design intent, the local knowledge base is searched, the knowledge items containing the keywords are quickly located according to the keywords, and the design specifications, historical cases or standard requirements closely related to the design requirements are selected by combining the design intent and the search results; Creating a prompt word Prompt in combination with the user design requirements and the knowledge base retrieval results, specifically including: Through template matching or sentence generation logic, the obtained keywords, design intent and knowledge points in the knowledge base are organically combined to create an optimized prompt word Prompt, ensuring that the prompt word Prompt can completely convey the design requirements and clearly guide the large language model to generate an MCP protocol instruction sequence conforming to the design intent and related specifications and standards; According to the generated MCP protocol instruction sequence, the instructions are parsed and distributed, and modeling is performed step by step by calling the plug-in to generate a preliminary building model or drawing, specifically including: After obtaining the MCP protocol instruction sequence, the instructions are parsed in terms of syntax and semantics, the operation steps and related parameters in the instructions are identified, and then the instructions are distributed to the corresponding processing modules or plug-in methods according to the type and content of the instructions; Based on the pre-created mapping table of instruction types and Revit-MCP plug-in methods, the instruction type is looked up according to the table to find the corresponding Revit-MCP plug-in method, ensuring that the correct Revit plug-in function can be called to execute the instructions; According to the number and complexity of the instructions and the performance of Revit, the MCP protocol instruction sequence is divided into multiple batches, and the execution time and interval of each batch are formulated to avoid tool lag caused by simultaneous execution of too many instructions; According to the MCP protocol instruction sequence after batching, each instruction is pushed to the local MCP server through the JSON-RPC protocol one by one, and the instructions are transferred to the corresponding Revit plug-in through the MCP server; The Revit plug-in receives the JSON-RPC request from the MCP server and performs parsing to extract the command and related parameters of the instruction; According to the parsed command and parameters, corresponding modeling operations are performed in the model space of Revit, including creating, modifying or deleting components or graph elements; After executing each instruction, the Revit plug-in checks whether the operation is successful. If successful, it records the relevant information. If failed, it captures the error information and records it, and then returns the execution result information to the MCP server through the JSON-RPC protocol, finally reaching the MCP scheduling layer; After a series of instruction execution, a preliminary building model or drawing is generated; The preliminary building model or drawing obtained is audited and optimized, specifically including: Using the rule engine to check the compliance of the generated model or drawing according to the pre-defined design specifications and rules, and verify whether it meets the design specifications; According to the preliminary building model or drawing and the compliance check report, use the large language model to conduct semantic review on the preliminary model and propose optimization suggestions; The review results are fed back to the user, and the local knowledge base is updated to improve the continuous learning ability of the system.
2. The method for building design automation modeling combined with LLM and MCP according to claim 1, wherein, The local knowledge base is created, specifically including: Knowledge acquisition, knowledge indexing and vectorization, and knowledge update; The knowledge acquisition includes: According to the timing task or external event, automatically start the extraction process from the design specification document, historical project code or plug-in document; Perform OCR identification on scanned documents or image documents, extract key fields and perform structured processing, and label metadata at the same time; Add labels to each extraction record for subsequent quick positioning and retrieval; The knowledge indexing and vectorization includes: Convert the text content into a high-dimensional vector and store it in the vector database to support fast semantic retrieval; According to the "component type-parameter-constraint" triple, establish knowledge graph nodes and relationship edges for structured query and rule reasoning; Combine full-text retrieval and vector retrieval results, and use Top-K aggregation and relevance sorting algorithm to improve recall and accuracy; The knowledge update includes: According to the audit result feedback, automatically identify new rules, abnormal cases or optimization suggestions; Import the extracted new items into the knowledge base in the preset format and label the meta information; After the supplement is completed, automatically trigger the incremental indexing process of the vector database and the knowledge graph to ensure that the new knowledge can be retrieved immediately.
3. An architectural design automation modeling system that combines LLM with MCP, characterized by, The system includes: An AI interaction platform for obtaining user design requirements, retrieving relevant knowledge from a pre-created local knowledge base according to user design requirements, creating a prompt word Prompt based on user design requirements and knowledge base retrieval results, inputting the obtained prompt word Prompt into a large language model, and generating an MCP protocol instruction sequence that meets the design intent; An MCP service call driver for instruction parsing and distribution according to the generated MCP protocol instruction sequence, and modeling step by step through plug-in calls to generate a preliminary building model or drawing, and auditing and optimizing the preliminary building model or drawing obtained, finally completing the automatic modeling based on the MCP protocol instruction; Obtain user design requirements, retrieve relevant knowledge from a pre-created local knowledge base according to user design requirements, specifically including: Extract the keywords of the obtained user design requirements and identify the design intent; Based on the obtained keywords and design intent, search in the local knowledge base, quickly locate the knowledge entries containing the keywords according to the keywords, and preliminarily screen the search results combined with the design intent to select the design specifications, historical cases or standard requirements closely related to the design requirements; Create a prompt word Prompt combined with the user's design requirements and the knowledge base search results, specifically including: Through template matching or sentence generation logic, the obtained keywords, design intent and knowledge points in the knowledge base are organically combined to create an optimized prompt word Prompt, ensuring that the prompt word Prompt can completely convey the design requirements and clearly guide the large language model to generate MCP protocol instruction sequences in the direction consistent with the design intent and related specifications and standards; Input the obtained prompt word Prompt into the large language model to generate MCP protocol instruction sequences consistent with the design intent, specifically including: Generate an initial text description containing modeling operation steps using a large language model; Perform syntax checking, semantic verification and adjustment according to the specification format of MCP protocol instructions on the generated initial text to finally generate MCP protocol instruction sequences for describing modeling operation steps, ensuring the logicality, completeness and operability of the instruction sequences; According to the generated MCP protocol instruction sequences, perform instruction analysis and distribution, and gradually perform modeling by calling plugins, to generate a preliminary building model or drawing, specifically including: After obtaining the MCP protocol instruction sequences, perform syntax and semantic analysis on the instructions, identify each operation step and related parameters in the instructions, and then distribute the instructions to corresponding processing modules or plugin methods according to the type and content of the instructions; Based on the pre-created mapping table of instruction types and Revit-MCP plugin methods, look up the table according to the instruction type to find the corresponding Revit-MCP plugin method, ensuring that the correct Revit plugin function can be called to execute the instructions; According to the number and complexity of the instructions and the performance of Revit, divide the MCP protocol instruction sequences into multiple batches, and formulate the execution time and interval of each batch to avoid tool lag caused by simultaneous execution of too many instructions; According to the batched MCP protocol instruction sequences, sequentially push each instruction to the local MCP server through the JSON-RPC protocol, and pass the instructions to the corresponding Revit plugin through the MCP server; Revit plugin receives JSON-RPC requests from MCP server and performs analysis, extracting the command and related parameters of the instruction; According to the analyzed command and parameters, perform corresponding modeling operations in the model space of Revit, including creating, modifying or deleting components or graph elements; After executing each instruction, Revit plugin checks whether the operation is successful, and if successful, records the relevant information, and if failed, captures error information and records, then returns the execution result information to the MCP server through the JSON-RPC protocol, and finally to the MCP scheduling layer; After a series of instruction execution, a preliminary building model or drawing is generated.
4. An electronic device, comprising: The device comprises a processor and a memory; The memory is configured to store one or more program instructions; The processor is configured to execute the one or more program instructions to perform the steps of the method for automated architectural design modeling combined with LLM and MCP according to any one of claims 1-2.
5. A computer readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium and is configured to be executed by the processor to perform the steps of the method for automated architectural design modeling combined with LLM and MCP according to any one of claims 1-2.
Citation Information
Patent Citations
Intelligent three-dimensional modeling method in SolidWorks based on AIGC
CN117688632A
Transformer substation AI aided design method and system based on LLM and RAG
CN119939863A