Intelligent auxiliary drawing review method and system based on large language model
Patent Information
- Application Number
- CN202611216475.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-30
AI Technical Summary
[0006]本发明的目的在于提供一种基于大语言模型的智能辅助审图方法及系统,以解决现有技术中规划条件文本难以精准结构化解析,以及无法根据规划指标组合自适应地从设计方案文件中提取设计指标,导致工业项目建筑设计方案审查自动化程度低、审查效率不高的问题
[0026]1、本发明提供的基于大语言模型的智能辅助审图方法,通过调用大语言模型将规划文件中的规划条件文本解析为以键值对表示的规划指标数据,根据指标名称与预先注册的各提取程序所支持的指标描述进行语义匹配,输出指标名称与提取程序调用标识之间的映射关系,据此调用对应提取程序提取设计指标数据,并根据预设的审查要点库逐项比对输出审查结果。该方案通过大语言模型的语义匹配实现指标名称与提取程序的动态映射,使同一指标的不同名称表述可映射至同一提取程序,突破了固定映射规则无法穷尽指标名称不规范表述的局限;同时映射关系支持一个指标对应多个提取程序的组合调用,满足单一指标需多源数据组合计算的场景需求,实现了规划指标与设计指标全自动化合规审查。
Smart Images

Figure CN123013678A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence-assisted architectural design scheme review technology, specifically to an intelligent assisted drawing review method and system based on a large language model. Background Technology
[0002] The review of architectural design schemes for industrial projects is a crucial task for the planning and natural resources authorities. Its core tasks include: extracting key planning indicators such as plot ratio, building density, and green space ratio from planning documents; reviewing relevant policies and regulations to determine the basis for review; extracting design indicators from CAD design documents; and comparing planning and design indicators to determine compliance. Currently, the automation and intelligence levels in the execution of these tasks are low, resulting in low efficiency in the review of architectural design schemes for industrial projects.
[0003] In recent years, Large Language Models (LLMs) have shone brightly in numerous fields such as text generation, question answering systems, and information retrieval, thanks to their superior natural language processing capabilities and powerful generalization performance. Their outstanding performance has attracted widespread attention across industries, prompting them to explore innovative ways to leverage LLMs to optimize business processes and improve work efficiency. Introducing LLMs into the review of architectural design schemes for industrial projects is also considered a potential solution for enhancing review efficiency.
[0004] However, when applying large language models to the review of architectural design schemes for industrial projects, several technical challenges remain to be overcome. For example, planning indicators in planning condition documents are often in tabular form, accompanied by unstructured information such as notes. Existing large models have poor adaptability in scenarios such as table boundary recognition, merged cell parsing, and multi-source indicator fusion, making accurate structured conversion difficult. Another example is that various design indicators in CAD design scheme documents exist in unstructured forms such as graphics and primitives. Although existing technologies can achieve intelligent recognition of architectural floor plan primitives and spatial layouts, such as the "Graphic Intelligence-PDF Engineering Drawing AI Recognition and Review Reconstruction System" developed by the School of Software at Tsinghua University, this system mainly focuses on one-click review of the "Code for Fire Protection Design of Buildings." For the review scenario of architectural design schemes for industrial projects, the combination of planning indicators for different review projects is complex and varied, requiring the system to have the ability to adaptively recognize design indicators in CAD design scheme documents based on the combination of planning indicators.
[0005] In conclusion, in order to effectively improve the review efficiency of architectural design schemes for industrial projects, there is an urgent need to design an intelligent auxiliary review technology scheme based on a large language model. Summary of the Invention
[0006] The purpose of this invention is to provide an intelligent auxiliary drawing review method and system based on a large language model, in order to solve the problems in the prior art where planning condition text is difficult to accurately and structurally parse, and design indicators cannot be adaptively extracted from design scheme documents according to the combination of planning indicators, resulting in low automation and low review efficiency in the review of architectural design schemes for industrial projects.
[0007] To achieve the objectives of this invention, the following technical solution is adopted:
[0008] An intelligent assisted image review method based on a large language model includes:
[0009] In response to the review request, the large language model is invoked to parse the planning document specified in the review request, and the planning condition text in the planning document is parsed into planning indicator data represented by key-value pairs;
[0010] Based on the indicator names of each planning indicator data and the indicator descriptions supported by each pre-registered extraction program, the large language model is invoked to perform semantic matching between the indicator names and the indicator descriptions, and the mapping relationship between each indicator name and the call identifier of the corresponding extraction program is output; wherein, different name expressions of the same indicator are mapped to the same extraction program through the semantic matching.
[0011] Based on the mapping relationship, the corresponding extraction program is invoked to extract design indicator data from the design file specified in the review request;
[0012] Based on a pre-set review criteria database, the planning indicator data is compared with the design indicator data item by item, and the review result corresponding to the review request is output.
[0013] According to a specific implementation, in the intelligent assisted drawing review method based on a large language model provided by the present invention, the step of calling the large language model to parse the planning document specified in the review request includes: identifying the tables in the planning document and parsing the merged cells, constraining the large language model to output the planning indicator data in a structured format according to a preset structure, and performing format verification on the planning indicator data.
[0014] According to a specific implementation, in the intelligent assisted drawing review method based on a large language model provided by the present invention, at least one indicator name in the mapping relationship corresponds to the call identifier of multiple extraction programs; the call of the corresponding extraction program includes: calling the corresponding multiple extraction programs according to the call identifier in the mapping relationship, and summarizing the design indicator data extracted by each program.
[0015] According to a specific implementation, in the intelligent assisted image review method based on a large language model provided by the present invention, the indicator descriptions supported by each extraction program are determined according to the extraction program registry; the extraction program registry records the calling identifier of each extraction program and the name of the indicator it supports.
[0016] According to a specific implementation, the intelligent assisted map review method based on a large language model provided by the present invention further includes: using a string formed by concatenating the index names of each planning index data after sorting as a cache key to cache the corresponding mapping relationship; in response to a new review request, retrieving the cached mapping relationship based on the generated cache key; if the retrieval is successful, calling the corresponding extraction program according to the cached mapping relationship; if the retrieval is unsuccessful, calling the large language model to output a new mapping relationship and overwriting the cache.
[0017] According to a specific implementation, in the intelligent assisted image review method based on a large language model provided by the present invention, the large language model is a locally deployed model; the invocation of the large language model includes: placing the invocation request into a request queue for asynchronous scheduling, and controlling the number of concurrent requests according to the state of the request queue.
[0018] According to a specific implementation method, in the intelligent auxiliary drawing review method based on a large language model provided by the present invention, the review points in the review point library are extracted and structured from planning policy and regulatory documents and technical specification documents by calling the large language model; the item-by-item comparison includes: matching the planning indicator data with the design indicator data according to the indicator name, performing logical operations on the successfully matched indicator data according to the review points, and outputting the comparison conclusion.
[0019] According to a specific implementation, in the intelligent assisted drawing review method based on a large language model provided by the present invention, the planning policy and regulatory documents and technical specification documents are further stored in a knowledge base after document cleaning and metadata annotation; the metadata includes at least the document source department, version number, and chapter path; it also includes: constructing a knowledge question-and-answer workflow based on the metadata of each document in the knowledge base, so that when a natural language question is received, the answer is generated in the knowledge base based on the metadata.
[0020] Based on the same inventive concept, this invention also provides an intelligent assisted image review system based on a large language model, which includes:
[0021] The indicator structure parsing module is used to respond to review requests by calling a large language model to parse the planning condition text in the planning document specified in the review request into planning indicator data represented by key-value pairs.
[0022] The indicator intelligent scheduling module is used to call the large language model to perform semantic matching between the indicator name and the indicator description supported by each of the planning indicator data and the pre-registered extraction programs, output the mapping relationship between each indicator name and the call identifier of the corresponding extraction program, and call the corresponding extraction program to extract the design indicator data from the design document specified in the review request according to the mapping relationship; wherein, different name expressions of the same indicator are mapped to the same extraction program through the semantic matching.
[0023] The indicator comparison engine module is used to compare the planning indicator data and the design indicator data item by item according to the preset review point library, and output the review result corresponding to the review request.
[0024] Based on the same inventive concept, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the intelligent assisted image review method based on a large language model provided by the present invention.
[0025] Compared with the prior art, this application has the following beneficial effects:
[0026] 1. The intelligent assisted drawing review method based on a large language model provided by this invention parses the planning condition text in the planning document into planning indicator data represented by key-value pairs by calling the large language model. Semantic matching is performed between the indicator name and the indicator descriptions supported by each pre-registered extraction program. The mapping relationship between the indicator name and the extraction program call identifier is output, and the corresponding extraction program is called to extract the design indicator data. The review results are then compared item by item according to a preset review point library. This solution achieves dynamic mapping between indicator names and extraction programs through semantic matching of the large language model, allowing different names of the same indicator to be mapped to the same extraction program. This overcomes the limitation of fixed mapping rules that cannot exhaustively cover non-standard expressions of indicator names. Simultaneously, the mapping relationship supports the combined calling of multiple extraction programs for one indicator, meeting the needs of scenarios where a single indicator requires multi-source data combination calculation, and realizing fully automated compliance review of planning and design indicators.
[0027] 2. The intelligent auxiliary drawing review method based on the large language model provided by this invention performs targeted analysis on the tables and merged cells in the planning documents, outputs planning index data in a structured format according to the preset structural constraint large language model, and performs format verification, which ensures the accuracy and standardization of the analysis of unstructured planning condition text, and reduces the analysis time from several minutes to seconds.
[0028] 3. The intelligent auxiliary drawing review method based on a large language model provided by this invention calls multiple extraction programs according to the call identifier in the mapping relationship for indicator names corresponding to multiple call identifiers and summarizes the design indicator data extracted by each program, so that a single planning indicator can be calculated by combining multiple source data, which is suitable for review scenarios of complex indicators.
[0029] 4. The intelligent auxiliary image review method based on a large language model provided by this invention decouples the registration, expansion and scheduling of extraction programs by recording the call identifier of each extraction program and the name of the indicators it supports in the program registry, and the indicator description is determined accordingly. New extraction programs only need to be registered to be scheduled without modifying the matching logic.
[0030] 5. The intelligent auxiliary map review method based on the large language model provided by this invention uses the string formed by concatenating the index names of each planning index data after sorting as the cache key cache mapping relationship. In response to a new review request, the cache is retrieved. If a match is found, the extraction program is directly called. If no match is found, the large language model is called and the cache is overwritten. While ensuring the adaptive capability of index combination, the large language model is avoided from being called repeatedly, reducing inference latency and resource consumption.
[0031] 6. The intelligent auxiliary drawing review method based on a large language model provided by this invention meets data security and compliance requirements because the large language model is deployed locally, and the planning documents, design documents and review data do not leave the domain; by asynchronously scheduling the request queue and controlling the number of concurrent requests according to the queue status, the stability of the local inference service under high load scenarios is guaranteed.
[0032] 7. The intelligent auxiliary drawing review method based on a large language model provided by this invention achieves automated construction and updating of review rules by extracting and structuring the review points in the review point library from planning policy and regulatory documents and technical specifications documents through calling the large language model; during comparison, the indicator names are matched and logical operations are performed to output the comparison conclusion, and the review conclusion is highly consistent with the expert opinions.
[0033] 8. The intelligent assisted image review method based on a large language model provided by this invention uses the indicator data and review conclusions of historical review cases that have been reviewed and approved as contextual references during semantic matching. It utilizes historical cases to assist the large language model in decision-making and improves the accuracy of the extraction program scheduling. Attached Figure Description
[0034] Figure 1 A flowchart illustrating the overall process of the intelligent assisted image review method based on a large language model provided in this embodiment of the invention;
[0035] Figure 2 This is a schematic diagram of the planning document parsing process provided in an embodiment of the present invention;
[0036] Figure 3 This is a schematic diagram of semantic matching and scheduling of the extraction program provided in an embodiment of the present invention;
[0037] Figure 4 A flowchart of the mapping relationship caching mechanism provided in this embodiment of the invention;
[0038] Figure 5 This is a schematic diagram of the index comparison process provided in an embodiment of the present invention;
[0039] Figure 6 This is a schematic diagram of the architecture of an intelligent auxiliary image review system based on a large language model, provided in an embodiment of the present invention. Detailed Implementation
[0040] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0041] In one embodiment, the present invention provides an intelligent assisted image review method based on a large language model, which runs in a locally deployed server environment. Figure 1 As shown, the overall process of the intelligent assisted drawing review method based on a large language model provided by the present invention includes: responding to a review request, calling the large language model to parse the planning document specified in the review request, and parsing the planning condition text in the planning document into planning indicator data represented by key-value pairs; according to the indicator name of each planning indicator data and the indicator description supported by each pre-registered extraction program, calling the large language model to perform semantic matching between the indicator name and the indicator description, and outputting the mapping relationship between each indicator name and the call identifier of the corresponding extraction program, wherein different name expressions of the same indicator are mapped to the same extraction program through semantic matching; according to the mapping relationship, calling the corresponding extraction program to extract design indicator data from the design document specified in the review request; and according to the preset review point library, comparing the planning indicator data and the design indicator data item by item, and outputting the review result corresponding to the review request.
[0042] This embodiment uses the deployment environment of a municipal planning and natural resources authority as an example. The server environment is configured with four 48GB VRAM inference accelerator cards (totaling 192GB VRAM) as graphics processing resources for local inference of the large language model; a 64-core CPU, 512GB RAM, and 1TB storage are configured for business logic processing and data persistence; all computing resources communicate via a gigabit network. The large language model uses a locally deployed open-source large language model. In this embodiment, a model with approximately 32 billion parameters is selected, loaded in tensor parallel mode using the vLLM inference acceleration framework, and its inference service interface is provided externally. The semantic embedding model uses the Chinese semantic embedding model bge-large-zh for vectorized text representation. Business services are deployed using Spring Boot containers and managed uniformly through the Nacos registry. The local deployment method ensures that planning documents, design documents, and review data never leave the domain, meeting the requirements for government data security and compliance.
[0043] During the knowledge base initialization phase, national, provincial, municipal, and park-level planning policy documents, regulations, and technical specifications are imported into the system. A large language model is used to extract and structure these documents to obtain review points, which are then stored in a pre-defined review point database. Each review point includes at least the indicator name, indicator type, calculation rules, and compliance judgment threshold. The imported text is simultaneously segmented by a recursive character segmenter with 512-character blocks and 64-character overlap, and then vectorized using a semantic embedding model before being stored in the PgVector vector database to support subsequent semantic retrieval. At the same time, indicator data and review conclusions of approved historical review cases are stored in a historical review case database as contextual references for subsequent semantic matching.
[0044] During the review process, the first step is to respond to the review request by calling the large language model to parse the planning document specified in the review request. For example... Figure 2As shown, the planning document parsing process includes: identifying tables in the planning document and parsing merged cells to extract planning condition text from the tables; constraining the large language model to output planning indicator data in a structured format according to a preset structure; and validating the format of the planning indicator data. Planning documents are typically planning condition text in PDF or image format, uploaded by the user through an interactive interface. During upload, the file content is Base64 encoded and submitted to the parsing interface along with the file type. When calling the large language model, the request carries a preset structure, which limits the field composition of the large language model's output content, ensuring that the large language model outputs planning indicator data in a JSON structured format. For example, for the interval-format indicator value "plot ratio 1.0-2.5", the large language model parses it as indicator data containing a lower limit of 1.0 and an upper limit of 2.5, with the type being an interval; for the indicator value with remarks "building density ≥30%, remarks ≤50%", it parses it as indicator data with a lower limit of 30% and an upper limit of 50%, with the unit being a percentage. The output planning indicator data is represented as key-value pairs, each pair including indicator name, indicator value, indicator unit, and constraint relationship. Subsequently, the planning indicator data is format-validated based on a preset indicator list, numerical range, and unit consistency. Specifically, this includes verifying whether the indicator name belongs to the preset indicator list, whether the indicator value is within a reasonable numerical range, and whether the indicator unit matches the indicator. Data with abnormal validation is removed or corrected, ultimately yielding the planning indicator data for each item.
[0045] Next, based on the indicator names of each planning indicator and the indicator descriptions supported by the pre-registered extraction programs, a large language model is invoked for semantic matching. For example... Figure 3As shown, the semantic matching and scheduling process of the extraction program includes: inputting the indicator names and the indicator descriptions supported by each extraction program into the large language model; after semantic matching, the large language model outputs the mapping relationship between each indicator name and the call identifier of the corresponding extraction program; and calling the corresponding extraction program to extract design indicator data according to the call identifier in the mapping relationship. Each extraction program is a program module used to identify and extract corresponding indicator parameters from the design file, such as a green space ratio extraction program, a building height extraction program, a total building area extraction program, and a land area extraction program. Each extraction program is automatically registered in the extraction program registry through component scanning annotations. The extraction program registry records the call identifier of each extraction program and the indicator names it supports using a concurrent hash mapping structure. The indicator descriptions supported by each extraction program are determined based on the extraction program registry. New extraction programs only need to register their call identifier and supported indicator names with the registry to be included in subsequent scheduling without modifying the matching logic. When constructing a decision request, the indicator names of each planning indicator data point and the indicator descriptions supported by each extraction program are input into the large language model. The large language model outputs a mapping relationship with the indicator name as the key and the corresponding extraction program's call identifier list as the value. Since the expression of indicator names in planning condition texts is inconsistent (e.g., plot ratio is written as "gross floor area ratio" in some documents), semantic matching by the large language model maps different names of the same indicator to the same extraction program, eliminating the need for manual exhaustive maintenance of mapping rules. Optionally, semantic matching also uses indicator data and review conclusions from approved historical review cases as contextual references to assist the large language model's decision-making and improve scheduling accuracy. In the mapping relationship, at least one indicator name corresponds to multiple extraction program call identifiers. For example, for the indicator "plot ratio," the large language model outputs a mapping relationship where the call identifiers corresponding to this indicator name consist of a list of identifiers formed by the call identifiers of the total building area extraction program and the land area extraction program.
[0046] Then, based on the mapping relationship, the corresponding extraction program is invoked to extract design indicator data from the design documents specified in the review request. The design documents are CAD drawing files in DWG or DXF format. For indicator names corresponding to multiple call identifiers, multiple corresponding extraction programs are invoked in parallel according to the call identifiers in the mapping relationship: the total building area extraction program identifies the building area elements of each floor in the CAD drawing and calculates the total building area; the land area extraction program identifies the land boundary boundary elements and calculates the land area; then, the extracted design indicator data are summarized to obtain the multi-source indicator data required for plot ratio calculation. For example, the green space ratio extraction program identifies the green space boundary elements in the CAD drawing and calculates the green space area ratio; the building height extraction program identifies the building outline and elevation information to calculate the building height. Each extraction program outputs structured design indicator data.
[0047] To avoid the inference latency and resource consumption caused by calling a large language model for every review task, this embodiment also sets up a caching mechanism for mapping relationships. For example... Figure 4 As shown, the mapping relationship caching mechanism includes: using the concatenated string formed by sorting the indicator names of each planning indicator data as the cache key to cache the corresponding mapping relationship; responding to a new review request, retrieving the cached mapping relationship based on the generated cache key; if the retrieval is successful, directly calling the corresponding extraction program based on the cached mapping relationship; if the retrieval is unsuccessful, calling the large language model to output a new mapping relationship and overwriting the cache. Sorting and concatenation ensure that the same indicator set corresponds to the same cache key regardless of the input order, avoiding repeated calls to the large language model due to differences in input order for the same indicator combination. In specific implementation, the cache can be set with an expiration period. In this embodiment, the expiration period is set to 7 days. Cache items exceeding the expiration period are treated as unsuccessful, to adapt to scenarios where the extraction program is updated or the indicator description is adjusted.
[0048] During the invocation of the large language model, all invocation requests, including parsing and decision invocations, are uniformly processed through the large language model service interface: the invocation requests are placed into a RabbitMQ message queue for asynchronous scheduling, the inference service of the locally deployed large language model is scheduled according to the queue order, and the number of concurrent requests is controlled according to the status of the request queue. In this embodiment, the concurrency is limited to 10 and the queue capacity is limited to 100. At the same time, a timeout of 30 to 60 seconds is set for the invocation requests to prevent local inference resources from being overloaded in high-load scenarios. The large language model service interface also sets up an response cache, and the cached response content is directly returned for invocation requests with the same content.
[0049] Finally, based on the pre-set review criteria database, the planning indicator data and design indicator data are compared item by item. For example... Figure 5 As shown, the indicator comparison process includes: matching planning indicator data with design indicator data by indicator name; for successfully matched indicator data, performing logical operations according to the corresponding review points in the review point library, including at least one of the following logical operations: not greater than, not less than, equal to, or within a range; outputting comparison conclusions, which include three categories: compliant, non-compliant, or not involved; summarizing the comparison conclusions of each indicator item and outputting the review results corresponding to the review request.
[0050] In terms of results presentation, the comparison conclusions are pushed to the interactive interface in real time via WebSocket for streaming display. The pushed content includes fields such as indicator name, comparison conclusion, and deviation value. The interactive interface uses color coding to mark the comparison conclusion categories, supports filtering by compliance, non-compliance, and not applicable, and supports highlighting the corresponding graphic element positions of non-compliance items in the design file. At the same time, the comparison conclusions of each indicator are summarized to generate a review report containing review conclusions, comparison details, and anomaly location information: the review report is generated from structured data using a Markdown template, then parsed and rendered by the front end, supporting GFM syntax, online preview, and PDF format export and download.
[0051] Tests showed that the structured parsing of planning condition text in this embodiment was reduced from 5-10 minutes to seconds, with an accuracy rate of over 95% for parsing 100 test documents; the extraction program scheduling accuracy reached 96%, and the extraction time for a single project indicator was reduced from 20-30 minutes to 2-3 minutes; the full-process compliance review was reduced from 1-2 days to 1-2 minutes, the consistency between the review conclusions and expert opinions reached 96%, and three types of items missed during manual review were identified.
[0052] Furthermore, this embodiment also provides a knowledge-based question-and-answer service for industrial project planning policies. This service shares the same knowledge processing chain as the aforementioned review point database: planning policy and regulatory documents and technical specifications imported during the knowledge base initialization phase are, on the one hand, extracted and structured by a large language model to obtain review points and stored in the review point database for subsequent indicator comparison; on the other hand, after text segmentation and vectorization, they are stored in a vector database to support semantic retrieval for natural language question answering. Through a design of one-time database construction and dual-use reuse, reviewers can obtain automated indicator comparison results during the drawing review process and also directly ask the system questions regarding the review basis. The knowledge-based question-and-answer service uses retrieval-enhanced generation technology as its core architectural concept, with LangChain as the orchestration framework, and is organized according to three stages: indexing, retrieval, and generation.
[0053] During the indexing phase, scattered and unstructured policy documents are offline-constructed into searchable vector indexes. The document loader utilizes LangChain's DirectoryLoader multi-source document loader, uniformly accessing policy documents in PDF, Word, and plain text formats. PDF files are loaded using PyPDFLoader, and Word files using Docx2txtLoader. The loading process employs a multi-threaded mode with 8 threads. Each document object contains text content and metadata, including filename, source department, version number, and chapter path. The text splitter uses the RecursiveCharacterTextSplitter, with a block length of 512 characters and a block overlap of 64 characters. Delimiters are configured according to the priority order of double line breaks, single line breaks, periods, semicolons, commas, and spaces, prioritizing splitting at paragraph or sentence boundaries and discarding the delimiters themselves to prevent semantic breaks. The embedding model encapsulates the bge-large-zh Chinese semantic embedding model using HuggingFaceEmbeddings, runs on a graphics processor, and normalizes the output vectors. Each text block is converted into a high-dimensional vector, which is then stored in a vector database along with the text content and metadata. The vector database uses pgvector, and the vector data is persistently stored in a PostgreSQL database table, with retrieval accelerated based on HNSW or IVFFlat indexes.
[0054] During the retrieval phase, LangChain's retrieval component is used to perform online recall of user-input natural language questions. The system encapsulates the vector database into a standard retrieval interface through a vector storage retrieval tool. User questions are converted into question vectors using the same semantic embedding model as in the indexing phase, and then similarity retrieval is performed. In this embodiment, the maximum number of recalled text blocks is set to 5, and only results with a cosine similarity score of at least 0.7 are retained. To improve retrieval accuracy, three enhanced retrieval tools are further employed. The multi-query retrieval tool rewrites the user question into three semantically similar but differently worded variants using a large language model. Each variant is retrieved separately, and the results are merged. Deduplication is then performed based on the hash value of the text block page content to improve recall. The context compression retrieval tool is wrapped outside the multi-query retrieval tool. It uses a large language model to identify the most relevant sentence to the question in each retrieval result, filters out irrelevant content, and compresses each text block to a length of less than 200 characters. The parent document retriever sets the granular text block to 128 characters and the parent document boundary to 512 characters. During retrieval, it first searches within the granular text block, and after recall, returns the parent document block to which it belongs, ensuring that the answer has sufficient contextual information. The LangChain orchestration framework is responsible for combining and scheduling the different retrieval strategies mentioned above.
[0055] During the generation phase, LangChain's question-and-answer chain component enables end-to-end answer generation. The retrieval-based question-and-answer chain uses a stuff chain type to fill all retrieved text blocks into prompts. The prompt template is constructed using `PromptTemplate`, containing two variables: retrieval context and user question. The template consists of three parts: system instructions, retrieval context, and user question. The system instructions specify that the large language model acts as a planning policy question-and-answer assistant, and require explicitly informing the user rather than fabricating answers when no relevant information is available in the retrieval context. The question-and-answer chain is configured to return the cited source document along with the answer, facilitating source verification by reviewers. For multi-turn continuous question-and-answer scenarios, a conversational retrieval chain combined with a conversation buffer window memory component is used to retain the most recent five rounds of conversation records. Historical questions and answers are stored as message pairs between the user and the assistant, automatically concatenated into the prompt template in subsequent questions and answers, enabling subsequent questions to automatically relate to the preceding semantics. Simultaneously, LangChainExpression Language is used for declarative orchestration of each component, forming a modular, composable, and observable processing pipeline.
[0056] Regarding answer display, the knowledge-based question-answering service uses Server-Sent Events technology to achieve streaming answer presentation. The inference service of the large language model supports streaming generation, and responses are returned incrementally. After receiving each incremental block, the knowledge-based question-answering service pushes it to the front end in real time via SSE connection. The front end renders the code word by word, giving users an interactive experience of word-by-word output.
[0057] Tests showed that the knowledge-based question-and-answer service in this embodiment increased the retrieval recall rate for policy-related questions from 62% to 91%, reduced the time for users to obtain answers from 15-25 minutes of manual review to less than 10 seconds, and improved policy review efficiency by approximately 70%.
[0058] like Figure 6As shown, corresponding to the above method, this invention also provides an intelligent auxiliary drawing review system based on a large language model, including an indicator structured parsing module, an indicator intelligent scheduling module, and an indicator comparison engine module. The indicator structured parsing module, in response to a review request, calls the large language model to parse the planning condition text in the planning document specified in the review request into planning indicator data represented as key-value pairs. The indicator intelligent scheduling module, based on the indicator names of each planning indicator data and the indicator descriptions supported by each pre-registered extraction program, calls the large language model to perform semantic matching between the indicator names and indicator descriptions, outputs the mapping relationship between each indicator name and the corresponding extraction program's call identifier, and calls the corresponding extraction program to extract design indicator data from the design document specified in the review request based on the mapping relationship. Different names of the same indicator are mapped to the same extraction program through semantic matching. The indicator comparison engine module, based on a preset review point library, compares the planning indicator data and design indicator data item by item and outputs the review result corresponding to the review request. The three modules are respectively connected to the large language model, the extraction program registry, and the review point library to collaboratively complete the above review process.
[0059] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described intelligent assisted image review method based on a large language model.
[0060] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An intelligent assisted image review method based on a large language model, characterized in that, include: In response to the review request, the large language model is invoked to parse the planning document specified in the review request, and the planning condition text in the planning document is parsed into planning indicator data represented by key-value pairs; Based on the indicator names of each planning indicator data and the indicator descriptions supported by each pre-registered extraction program, the large language model is invoked to perform semantic matching between the indicator names and the indicator descriptions, and the mapping relationship between each indicator name and the call identifier of the corresponding extraction program is output; wherein, different name expressions of the same indicator are mapped to the same extraction program through the semantic matching. Based on the mapping relationship, the corresponding extraction program is invoked to extract design indicator data from the design file specified in the review request; Based on a pre-set review criteria database, the planning indicator data is compared with the design indicator data item by item, and the review result corresponding to the review request is output.
2. The method according to claim 1, characterized in that, The step of calling the large language model to parse the planning document specified in the review request includes: identifying tables in the planning document and parsing merged cells, constraining the large language model to output the planning indicator data in a structured format according to a preset structure, and performing format validation on the planning indicator data.
3. The method according to claim 1, characterized in that, In the mapping relationship, at least one indicator name corresponds to the call identifier of multiple extraction programs; the call to the corresponding extraction program includes: calling the corresponding multiple extraction programs according to the call identifier in the mapping relationship, and summarizing the design indicator data extracted by each program.
4. The method according to claim 1, characterized in that, The descriptions of the indicators supported by each extraction program are determined based on the extraction program registry; the extraction program registry records the calling identifier of each extraction program and the name of the indicators it supports.
5. The method according to claim 1, characterized in that, Also includes: The corresponding mapping relationship is cached using the string formed by concatenating the sorted indicator names of each planning indicator data as the cache key. In response to a new review request, the cache mapping relationship is retrieved based on the generated cache key. If the retrieval is successful, the corresponding extraction program is invoked according to the cache mapping relationship. If the search fails, the large language model is invoked to output a new mapping relationship and overwrite the cache.
6. The method according to claim 1, characterized in that, The large language model is a locally deployed model; the invocation of the large language model includes: placing the invocation request into a request queue for asynchronous scheduling, and controlling the number of concurrent requests according to the status of the request queue.
7. The method according to claim 1, characterized in that, The review points in the review point library are extracted and structured from planning policy and regulatory documents and technical specifications by calling a large language model; the item-by-item comparison includes: matching the planning indicator data with the design indicator data by indicator name, performing logical operations on the successfully matched indicator data according to the review points, and outputting the comparison conclusion.
8. The method according to claim 7, characterized in that, The planning policy and regulatory documents and technical specifications are also stored in a knowledge base after being cleaned and annotated with metadata. The metadata includes at least the document's source department, version number, and chapter path. The knowledge base also includes: constructing a knowledge question-and-answer workflow based on the metadata of each document in the knowledge base, so that when a natural language question is received, the answer can be retrieved from the knowledge base based on the metadata.
9. An intelligent assisted image review system based on a large language model, characterized in that, include: The indicator structure parsing module is used to respond to review requests by calling a large language model to parse the planning condition text in the planning document specified in the review request into planning indicator data represented by key-value pairs. The indicator intelligent scheduling module is used to call the large language model to perform semantic matching between the indicator name and the indicator description supported by each of the planning indicator data and the pre-registered extraction programs, output the mapping relationship between each indicator name and the call identifier of the corresponding extraction program, and call the corresponding extraction program to extract the design indicator data from the design document specified in the review request according to the mapping relationship; wherein, different name expressions of the same indicator are mapped to the same extraction program through the semantic matching. The indicator comparison engine module is used to compare the planning indicator data with the design indicator data item by item according to the preset review point library, and output the review result corresponding to the review request.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 8.
