A CIM construction government document RAG method for AI intelligent interaction

CN122412580BActive Publication Date: 2026-10-09XUZHOU SURVEYING & MAPPING RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610882271.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-09
Estimated Expiration
2046-06-18

AI Technical Summary

Technical Problem

对于表格类数据,现有方案多将其转换为线性纯文本进行存储与检索,未能充分发挥关系型数据库的结构化索引、条件筛选与关联查询优势,不仅检索效率低下,还极易造成行列关系错乱、数据关联丢失,丧失了表格数据的可计算性与可比对性;对于图片、流程类非文本数据,现有技术大多仅实现原始文件的归档存储,未构建有效的语义提取与文字化索引机制,导致图中文字、关键对象、流程节点、业务逻辑、空间特征等核心信息无法参与语义检索与智能分析,形成大量“信息孤岛”,严重制约了CIM建设政务大数据的智能化利用深度与广度

Benefits of technology

[0070] 1. This invention is deeply adapted to the lightweight large-scale model operating environment of government intranets, effectively solving the problem of semantic fragmentation in long documents. Existing technologies, constrained by the computing power and data security of government intranets, can only deploy lightweight large-scale models and employ rule-based mechanical segmentation methods based on character count and paragraph count. This results in the splitting of government content with strong relationships such as causality, conditionality, and progression, damaging the legal format and business logic integrity of documents, ultimately leading to core defects such as missing cross-segment information, distorted interpretation of professional clauses, and irrelevant answers. This invention proposes a semantically driven three-level directory hierarchical decomposition technology, establishing a dynamic threshold adaptation mechanism based on the context window size of the lightweight large-scale model. The system automatically calculates the upper limit of single-level directory content and reserves 20% margin for prompt words and instruction information, ensuring accurate matching between processing units and model capabilities. It extracts the core logic of documents through global semantic parsing, constructs a cascading directory index system, and adopts an iterative decomposition method until the content of all leaf nodes meets the threshold requirements. It fully preserves the original semantic associations and business logic of government documents. This invention can stably process long CIM construction government documents with multiple chapters and length without increasing the number of model parameters. It effectively solves a series of technical problems caused by semantic fragmentation and greatly improves the availability and reliability of AI intelligent interaction applications in government intranets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122412580B_ABST
    Figure CN122412580B_ABST
Patent Text Reader

Abstract

The application discloses a kind of AI intelligent interaction-oriented CIM construction government document RAG method, belong to big data artificial intelligence technical field, the core of this method includes seven steps: the input and hierarchical disassembly of government document, document multi-type data identification and extraction, government document and spatial data association fusion, hierarchical classification storage, multi-round layered retrieval, search result output and interaction with CIM platform.The application executes differentiating specialized processing to multi-element heterogeneous data by the three-level catalog disassembly of semantic driving dynamically adapting lightweight model context window, constructs the accurate mapping relationship of government document and CIM space resource, and realizes accurate matching using the multi-round layered retrieval strategy of first rough then fine.The application deeply adapts government intranet security deployment specification, retains government document semantics and business logic completely, realizes multi-element heterogeneous data value release and spatial data deep fusion, while giving consideration to search efficiency, matching accuracy and government-level full-link traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data and artificial intelligence technology, specifically to a CIM construction government document RAG method oriented towards AI intelligent interaction. Background Technology

[0002] The deep integration of digital government construction with City Information Modeling (CIM) platforms is a core lever for the high-quality development of new smart cities and a core support for the digital and intelligent transformation of urban spatial governance. CIM construction covers the entire lifecycle of policy formulation, project approval, planning and design, construction, acceptance and evaluation, and operation and maintenance supervision. The massive amounts of government documents generated in this process are core assets of government big data. These documents not only contain plain text information such as legal clauses, business rules, and approval processes, but also carry diverse and heterogeneous data such as project indicator tables, spatial coordinate forms, construction site photos, business approval flowcharts, and spatial planning diagrams. They comprehensively record key business information for urban spatial governance, full-cycle management of engineering projects, and government service approvals, serving as core data support for government office work, intelligent approval, planning control, decision analysis, and public services. The in-depth mining and efficient utilization of this data value directly determines the effectiveness of the CIM platform's implementation and the level of intelligent construction of digital government.

[0003] In recent years, the rapid iteration of natural language processing, large language models, and retrieval augmentation (RAG) technologies has provided a mature technical path for the intelligent processing and AI interactive applications of massive amounts of government documents. Currently, in the process of building intelligent government intranets, the batch collection, structured parsing, vectorized storage, and basic semantic retrieval functions of government documents have been gradually realized. Document segmentation and indexing schemes based on rule engines or lightweight pre-trained models can complete the preprocessing and storage of routine government documents in a short time, supporting basic intelligent question answering and information retrieval scenarios, significantly improving the efficiency of government information management and utilization, and laying the foundation for AI intelligent interactive applications in the government intranet environment.

[0004] However, in the actual application of CIM construction in government scenarios, due to the strict security and compliance requirements of government intranets, limited computing resources, and the industry characteristics of CIM construction government documents such as complex structure, diverse data types, high requirements for semantic rigor and business relevance, and prominent spatial attributes, existing RAG technology solutions still have many technical shortcomings and cannot adapt to the actual application needs of AI intelligent interaction in CIM construction scenarios. Specifically, these shortcomings are reflected in the following aspects:

[0005] First, existing technologies are ill-suited to the operating environment of lightweight large-scale models within government intranets. Long document processing can easily compromise semantic integrity and business logic. Due to stringent requirements for data security and computing power control, government intranets typically only deploy lightweight AI models with a small number of parameters. While these models perform stably in short text semantic understanding tasks, their limited context window length prevents them from directly processing long, multi-chapter, and logically complex CIM construction government documents. To accommodate model window limitations, existing document processing tools often employ rule-driven, mechanical segmentation methods based on character count, paragraph count, or line breaks. These methods fail to consider the legal format, chapter logic, and clause relationships of government documents, resulting in the fragmentation of continuous content with strong causal, conditional, explanatory, and progressive relationships into different segments, creating "semantic fragments." This fragmented processing method directly undermines the global semantic association and business logic integrity of government documents, causing lightweight large models to be unable to restore the complete semantics of the original text during the retrieval and generation stages. This frequently results in problems such as missing cross-section information, biased understanding of context, distorted interpretation of professional clauses, and irrelevant answers, failing to meet the high requirements for accuracy and reliability of intelligent interaction in scenarios such as CIM project approval, compliance verification, and administrative law enforcement.

[0006] Secondly, existing technologies lack targeted processing mechanisms for the diverse and heterogeneous data in CIM construction government documents, resulting in a large amount of high-value business information not being effectively utilized. CIM construction-related government documents contain a high proportion of non-text data such as tables, forms, construction site photos, business approval flowcharts, and spatial planning diagrams, which carry a large amount of core business information, including project core indicators, spatial coordinates, approval nodes, and on-site conditions. However, existing technologies generally lack dedicated processing solutions adapted to CIM government scenarios. For tabular data, existing solutions mostly convert it into linear plain text for storage and retrieval, failing to fully leverage the advantages of relational databases in terms of structured indexing, conditional filtering, and related queries. This not only results in low retrieval efficiency but also easily leads to disordered row and column relationships, loss of data associations, and loss of the computability and comparability of tabular data. For non-text data such as images and processes, existing technologies mostly only achieve the archiving and storage of the original files, without building an effective semantic extraction and textual indexing mechanism. As a result, core information such as text, key objects, process nodes, business logic, and spatial features in the images cannot participate in semantic retrieval and intelligent analysis, forming a large number of "information silos" that seriously restrict the depth and breadth of intelligent utilization of government big data in CIM construction.

[0007] Furthermore, existing technologies lack a mechanism for linking and integrating non-spatial data from government documents with CIM spatial data, failing to meet the core business needs of CIM construction. The core value of a CIM platform lies in achieving deep integration and collaborative application of urban spatial data and government business data. However, existing government document RAG technology solutions only focus on text processing and retrieval of the documents themselves, without establishing a precise mapping relationship between non-spatial data such as standard addresses, project information, and event elements in the documents and spatial data in the CIM resource center. This results in a complete disconnect between business information in government documents and urban spatial entity information, making it impossible to achieve bidirectional retrieval and collaborative analysis of "searching for land by document and searching for documents by land." In actual business operations, core tasks such as spatial planning compliance verification, full-cycle supervision of project implementation, and precise location of urban governance events still require manual cross-system comparison of government documents and CIM spatial data. This is not only inefficient but also prone to human error, making it difficult to fully leverage the spatial governance capabilities of the CIM platform. This is also a core functional deficiency of existing technologies for CIM construction in government scenarios.

[0008] Finally, existing search strategies fail to balance the requirements of search efficiency, matching accuracy, and end-to-end traceability in government scenarios, making it difficult to meet the compliance and rigor standards of government operations. Existing RAG search solutions mostly employ single-round vector retrieval or keyword matching. Single vector retrieval is prone to semantic drift, failing to accurately match the professional terminology and legal provisions of government scenarios; single keyword retrieval cannot understand the deep semantic intent of user queries, resulting in insufficient recall accuracy and generalization ability. Furthermore, existing technologies often return only fragmented content snippets, lacking a complete traceability chain from document name and chapter location to original text snippets and storage addresses. This fails to meet the core requirements of government operations for data rigor, verifiability, and traceability, and is ill-suited to the practical application needs of high-frequency government scenarios such as CIM construction management, government compliance verification, decision support, and administrative review.

[0009] In summary, existing RAG technologies struggle to simultaneously achieve semantic integrity assurance of long government documents, efficient utilization of diverse and heterogeneous data, deep integration of government business data and CIM spatial data, and precise retrieval with end-to-end traceability within the deployment environment of lightweight, large-scale models on government intranets. This has become a key technical bottleneck restricting the large-scale deployment of AI-powered intelligent interaction applications on government intranets in CIM construction scenarios. Therefore, this paper proposes a RAG method for CIM construction government documents oriented towards AI-powered intelligent interaction. Summary of the Invention

[0010] The purpose of this invention is to provide a CIM construction government document RAG method for AI-driven intelligent interaction, in order to solve the problems mentioned in the background art.

[0011] To achieve the above objectives, the present invention provides the following technical solution: a CIM construction government document RAG method for AI intelligent interaction, applied to the government data processing scenario of lightweight AI large model in the government intranet, the processing objects include CIM construction-related government documents containing text, tables, forms, images and process-type content, the method includes the following steps:

[0012] S1. Input and hierarchical decomposition of government documents: Input government documents, perform global semantic analysis on government documents, construct a three-level directory structure, perform semantic refinement on the content of each level of directory, and control the data volume of the corresponding content of a single level directory to not exceed a preset threshold.

[0013] S2. Document Multi-Type Data Recognition and Extraction: Differentiated processing is performed on different types of data in government documents. Specifically, tables in documents are identified and their content is structured and parsed using OCR technology and stored in a relational database. Images in documents are identified and their semantic information is semantically recognized using a multimodal model and stored in a relational database. Flowcharts in documents are identified and their flow recognition is performed using OCR technology and a multimodal model. Structured graph objects are constructed and stored in a graph database.

[0014] S3. Integration of government documents and spatial data: Extract standard addresses, project and event information from documents, and perform spatial resource retrieval through the service interface of CIM Resource Center;

[0015] If a matching spatial object is found, the mapping relationship is stored in a relational database to realize the association and integration of government documents and spatial data;

[0016] S4. Hierarchical and Classified Storage: The complete content of processed government documents is stored in a distributed object storage system. The second-level directory is used as the core organizational dimension. The main content, object storage address, and key fields corresponding to the third-level directory are constructed into structured entries and stored in the government knowledge base. At the same time, the semantic information of document summary, content of each level of directory, and non-text data are vectorized and stored in the corresponding vector library.

[0017] S5. Multi-round hierarchical retrieval: Adopting a multi-round hierarchical retrieval strategy of coarse first and then fine, the first round of initial retrieval is performed in the government knowledge base and vector library to obtain the Top-N items that match the user's query needs and their corresponding object storage addresses. Then, the corresponding document chapters are retrieved according to the object storage addresses to perform the second round of fine retrieval, which accurately locates the content fragments that match the user's query intent.

[0018] S6. Output of search results: For the content fragments obtained from the second round of refined search, key information extraction and multi-fragment fusion processing are performed. The results are generated by using a large language model. Based on the source and semantic information of the search content, the content output to the terminal is formatted.

[0019] This includes using charts to represent statistical data results, using map points to represent standard addresses, project and event results, and using flowcharts to reconstruct process-related results;

[0020] S7. Interaction with the CIM platform: When a user clicks the spatial data mapping entry or the tool interaction button on the search results interface, the interaction with the CIM platform is passively triggered.

[0021] As a further preferred embodiment of this technical solution: In S1, the preset threshold is dynamically determined based on the context window size of the lightweight AI large model deployed on the government intranet. The specific determination method is as follows:

[0022] Obtain the number of context window tokens for the target lightweight AI model, calculate the corresponding character count threshold based on the conversion rate of 1 token corresponding to 1.5-2 Chinese characters in Chinese text, and reserve 20% for prompt words and additional instruction information to calculate the preset threshold for single-level directory content.

[0023] As a further preferred embodiment of this technical solution: In S1, the specific implementation steps for hierarchical decomposition of government documents include:

[0024] S11, Global Document Parsing: Calls the pre-trained large model API with context processing capabilities superior to the target lightweight AI large model, and combines it with OCR tools to perform full content recognition and parsing of government documents, extracting the document's chapter structure, text content, tables, images and process information;

[0025] S12. Document summary area generation: Extract the core information of the document through a pre-trained large model and generate a document summary area. The document summary area includes a document title of no more than N characters, a document summary of no more than M characters, and no more than K core tags.

[0026] S13. Basic directory generation: Based on the document parsing results, extract the core logic, generate a second-level directory and an initial third-level directory structure, and assign a unique identifier ID to each directory to establish a mapping relationship between directory IDs and corresponding content materials;

[0027] S14. Cascading Directory Iterative Decomposition: Verify the content materials corresponding to a single directory. If the content data volume exceeds the preset threshold, the directory is decomposed a second time to generate the next level subdirectory. Establish a cascading index relationship between the parent directory ID and the subdirectory ID. Repeat the iteration until the content data volume corresponding to all leaf node directories meets the preset threshold requirements.

[0028] As a further preferred embodiment of this technical solution: In S2, the processing steps for tabular data are specifically as follows:

[0029] S211, Table Region Localization: Using PaddleOCR's table detection model, the table regions of government documents are detected, and their location information and boundary coordinates are obtained.

[0030] S212, Table Structured Parsing: Apply a multimodal large language model to the located table area to parse and output structured data containing table headers, row and column relationships, and cell content;

[0031] S213. Data normalization processing: Perform format unification, null value filtering and completion, and data type standardization processing on structured data to make it conform to relational database storage specifications;

[0032] S214. Data entry and association mapping: Create a data table in the relational database that matches the table structure, batch enter the processed structured data into the database, and configure a unique document identifier and a unique chapter identifier for each table data to establish an association mapping between the table data and the corresponding document and table of contents paragraph.

[0033] As a further preferred embodiment of this technical solution: In S2, the processing steps for image-type and process-type data are specifically as follows:

[0034] S221. Region localization: Locate image or process content regions in a document using PaddleOCR's image region detection model, and obtain location information and boundary coordinates;

[0035] S222, Format standardization: Standardize the format of the located area content and convert it into a standard image format;

[0036] S223, Multimodal Semantic Parsing: Call the multimodal big model deployed on the government intranet to parse the content. For image data, identify and extract text information, key objects, and scene types. For process data, identify and extract text information, process nodes, connection relationships, node business meanings, and execution conditions.

[0037] S224. Semantic Information Generation: Integrate the parsing results to generate descriptive text, core keywords, and semantic tags;

[0038] S225, Index Association: Associate the generated descriptive text, keywords, and semantic tags with the corresponding content in the storage address of the distributed object storage system, and store them in the corresponding fields of the government knowledge base to realize textual retrieval of image and flowchart data.

[0039] As a further preferred embodiment of this technical solution: In S3, the government documents and spatial data are associated and integrated, and the specific steps are as follows:

[0040] S31. Using a large language model, identify and extract standard address entities, project elements and event elements from the document text, and transform the elements into a structured first data set.

[0041] S32. Send the retrieval request to the CIM Resource Center, perform spatial resource retrieval through the CIM Resource Center's service interface, execute multi-dimensional queries based on spatial location or semantic similarity, and obtain candidate CIM resource objects and their corresponding resource identifiers.

[0042] S33. Perform confidence verification on candidate CIM resource objects, filter out effective related items, establish a mapping relationship table including government document identifier, extracted element type, CIM resource identifier and matching weight, and complete the connection between non-spatial data and spatial data.

[0043] S34. Based on the preset prompt word template, instruct the large language model to summarize and translate the technical parameters and spatial characteristics of CIM resources, generate natural language generalized description text for government affairs scenarios, and write the text back to the corresponding position in the mapping table.

[0044] As a further preferred embodiment of this technical solution: In S4, the specific implementation method of hierarchical and classified storage is as follows:

[0045] S41. Document Index Data Storage: Convert the document summary information and the summary content corresponding to each level of directory into vector representation through a vectorization model and store it in the RAG vector library;

[0046] The complete original content of the document is stored in the form of a file in a distributed object storage system, and a two-way mapping between the vector library entries and the original document is established through the storage address field;

[0047] S42. Document content data storage: The government document content that has been hierarchically decomposed and standardized is stored in Markdown format in a distributed object storage system. The content of the third-level directory is stored in the government knowledge base, organized by the second-level directory.

[0048] S43. Non-text data storage: For image and process data, the extracted semantic information is vectorized and stored in a relational database, while the original files are stored in a distributed object storage system.

[0049] For tabular data, structured information is stored in a relational database, while the original files are stored in a distributed object storage system.

[0050] S44. Association Mapping Management: Establish a unified association table to centrally manage the index information of various types of data. The association table supports multi-version storage and establishes an association with the distributed object storage system through the storage address field to achieve bidirectional traceability of all types of data.

[0051] As a further preferred embodiment of this technical solution: In S5, the first round of initial retrieval adopts a hybrid retrieval method of coarse-to-fine. First, the user query is vectorized, then the summary directory index area of ​​the vector library is searched to quickly narrow down the range of candidate documents, and finally, the main content index area combines vector retrieval and keyword retrieval to achieve accurate matching. The specific steps are as follows:

[0052] S511, Query Vectorization: Adopt the vectorization model used in the database entry stage to convert user query statements into vector representations;

[0053] S512, Summary Directory Search: In the summary directory index area of ​​the RAG vector library, perform vector similarity search with the query vector, and return a list of matching document identifiers, which can be used as the candidate document range for subsequent searches to narrow down the search space;

[0054] S513, Vector Similarity Retrieval: Using the document identifier list returned by S512 as constraints, perform an approximate nearest neighbor retrieval in the main content index area of ​​the RAG vector library, calculate the cosine similarity or inner product similarity between the query vector and each target quantity, and return the Top-K records with the highest similarity and their corresponding similarity scores and object storage addresses.

[0055] S514 Keyword Matching Retrieval: Using the Top-K records returned by S513 as the candidate set, retrieve the corresponding main content from the distributed object storage system according to the object storage address of each record. After segmenting the user query statement, perform keyword matching in the main content through a keyword matching algorithm (such as the BM25 algorithm) and calculate the relevance score.

[0056] S515, Result Fusion and Sorting: The vector retrieval score of S513 and the keyword retrieval score of S514 are weighted and fused together, and the top-N relevant entries are returned after comprehensive sorting. Each entry contains the corresponding main content fragment and object storage address.

[0057] In S5, the second round of refined retrieval targets the document-related multimodal data returned in the first round, performing cross-modal information extraction and retrieval. The specific steps are as follows:

[0058] S521. Document Chapter Retrieval: Based on the object storage address returned by the first round of initial retrieval, retrieve the corresponding complete rich document chapter from the distributed object storage system;

[0059] S522, Multimodal Reference Resolution: Parses multimodal data reference fields in document sections to identify associated database table identifiers, image storage addresses, and GIS spatial identifier information;

[0060] S523. Database table data retrieval: Based on the parsed database table identifier, retrieve the corresponding data from the relational database and perform field matching and data relationship verification;

[0061] S524. Image content retrieval: Retrieve the original image based on the parsed image storage address, extract the semantic features of the image through a cross-modal model, and match them with the user's query intent for relevance.

[0062] S525, GIS Spatial Data Retrieval: Retrieve corresponding vector or raster data from the spatial database based on the parsed GIS spatial identifiers, and perform spatial location and attribute information matching;

[0063] S526. Result merging and re-ranking: Merge and deduplicate the results of each modality in the second round of retrieval with the initial retrieval results in the first round, and then sort them by weighted relevance scores from both rounds of retrieval to return the final Top-N items.

[0064] As a further preferred embodiment of this technical solution: In S6, confidence labels are generated. Based on the similarity scores of the first round of initial search and the second round of refined search, the confidence values ​​of each item are calculated and output together with the source material.

[0065] S6 also includes multimodal results display, presenting natural language answers in a dialogue interface, and adaptively rendering tables, line charts, bar charts, and flowcharts based on content type. The chart data is based on the structured results fused from the second round of retrieval.

[0066] As a further preferred embodiment of this technical solution: In S7, spatial data mapping interaction occurs. After the user clicks on the spatial data mapping entry, the system parses the coordinate information of the target location or area, issues mapping instructions through the CIM platform GIS service interface, and accurately overlays the spatial data onto the CIM scene layer to complete project positioning and area boundary mapping.

[0067] In S7, the tool interaction is the government affairs tool call interaction. After the user clicks the government affairs business operation button, the system parses the engineering construction project and land planning government affairs information in the search results, matches and calls the corresponding GIS service interface of the CIM platform, issues spatial processing function instructions, performs map query, layer overlay and feature positioning operations, and sends the processing results back to the CIM front end to complete the visualization display.

[0068] The CIM platform provides an entry point for spatial data and tool interaction. For spatial data involved in the search results, a map entry point is provided on the interface. For content involving government business operations, tool interaction buttons are provided. The map entry point is used to trigger the visualization of spatial data on the CIM platform, and the operation buttons are used to trigger the interaction of S7 government tools.

[0069] Compared with the prior art, the beneficial effects of the present invention are:

[0070] 1. This invention is deeply adapted to the lightweight large-scale model operating environment of government intranets, effectively solving the problem of semantic fragmentation in long documents. Existing technologies, constrained by the computing power and data security of government intranets, can only deploy lightweight large-scale models and employ rule-based mechanical segmentation methods based on character count and paragraph count. This results in the splitting of government content with strong relationships such as causality, conditionality, and progression, damaging the legal format and business logic integrity of documents, ultimately leading to core defects such as missing cross-segment information, distorted interpretation of professional clauses, and irrelevant answers. This invention proposes a semantically driven three-level directory hierarchical decomposition technology, establishing a dynamic threshold adaptation mechanism based on the context window size of the lightweight large-scale model. The system automatically calculates the upper limit of single-level directory content and reserves 20% margin for prompt words and instruction information, ensuring accurate matching between processing units and model capabilities. It extracts the core logic of documents through global semantic parsing, constructs a cascading directory index system, and adopts an iterative decomposition method until the content of all leaf nodes meets the threshold requirements. It fully preserves the original semantic associations and business logic of government documents. This invention can stably process long CIM construction government documents with multiple chapters and length without increasing the number of model parameters. It effectively solves a series of technical problems caused by semantic fragmentation and greatly improves the availability and reliability of AI intelligent interaction applications in government intranets.

[0071] 2. This invention achieves accurate processing and value activation of all types of heterogeneous data in CIM government documents, eliminating information silos of non-text data. Addressing the lack of targeted processing mechanisms for the highly prevalent diverse and heterogeneous data in CIM construction government documents, such as tables, images, and flowcharts, existing technologies suffer from several issues. For example, linear transformation of tables loses row and column relationships and computability; non-text data can only be archived and cannot participate in semantic retrieval, creating numerous "information silos" that lead to the idleness of high-value business information. This invention designs differentiated processing flows for different data types. For table-type data, it uses a PaddleOCR-based table detection model to locate regions, combines this with a multimodal large model to complete structured parsing, and then performs standardized processing. The data is then stored in a relational database, fully leveraging the advantages of structured indexes, conditional filtering, and relational queries. The computability and comparability of the tabular data are fully preserved. For image and process data, semantic information is deeply analyzed through a multimodal large model to extract core content such as text, key objects, process nodes, and business logic, and transform them into textual retrieval indexes. This data is then incorporated into a unified semantic retrieval system. A mapping relationship for all types of data is established through a unified relational table, enabling cross-type joint retrieval and full-link traceability. This invention thoroughly activates the business value of non-textual data, enabling all core information in CIM construction government documents to participate in intelligent retrieval and analysis, and significantly expanding the depth and breadth of intelligent applications of government big data.

[0072] 3. This invention constructs a two-way fusion mechanism between non-spatial government data and CIM spatial data, filling the functional gap in core CIM business scenarios. Existing RAG technology focuses only on text processing and retrieval of the document itself, failing to establish a precise mapping relationship between non-spatial data such as standard addresses, project information, and event elements in government documents and spatial data in the CIM resource center. This results in a complete disconnect between government business information and urban spatial entity information, failing to support the core business needs of CIM construction. This invention constructs a standardized process for fusion of government and spatial data, utilizing natural language processing technology to accurately extract and structure core elements such as addresses, projects, and events from government documents, and connecting them to CIM. The resource center performs multi-dimensional matching based on spatial location and semantic similarity, filters effective related items through confidence verification, establishes a standardized mapping relationship table containing matching weights, and translates the technical parameters and spatial characteristics of CIM resources into natural language descriptions for government scenarios through a large language model, realizing the business expression of spatial data. This invention realizes the two-way connection and linkage application of government business data and urban spatial data, supports two-way retrieval and linkage analysis of text-based land search and land-based text search, and can directly adapt to the core business needs of CIM such as spatial planning compliance verification, full-cycle supervision of project implementation, and precise positioning of urban governance events, fully releasing the core value of spatial governance of the CIM platform;

[0073] 4. This invention balances retrieval efficiency, matching accuracy, and full-chain traceability at the government level, comprehensively meeting the compliance and rigor requirements of government operations. Addressing the shortcomings of existing single-round retrieval models, which fail to balance retrieval efficiency and matching accuracy, and the inherent problems of single-vector retrieval (semantic drift and insufficient matching of technical terms), single-keyword retrieval (failing to understand the user's deep semantic intent), and the lack of a complete traceability chain in retrieval results, thus failing to meet the compliance and verifiability requirements of government operations, this invention employs a multi-round, hierarchical retrieval strategy and a full-chain traceability system. The first round of initial retrieval uses a hybrid mode combining vector retrieval and BM25 keyword retrieval. It first quickly narrows down the candidate document range through a summary directory search, and then performs precise analysis in the main content area. The matching solution addresses both semantic drift and insufficient deep semantic understanding. The second round of refined retrieval targets the document chapters returned in the first round, performing cross-modal information extraction and retrieval to accurately locate content fragments that highly match the user's query intent, significantly improving the recall and accuracy of the retrieval. When outputting the retrieval results, complete citation traceability materials covering the source document name, chapter position, object storage address, original text fragment, and confidence level are simultaneously attached, establishing a fully verifiable and traceable information loop. This solution fully meets the core requirements of government business for data rigor and legal compliance, and can be directly adapted to high-frequency government scenarios such as CIM construction management, government compliance verification, intelligent approval, decision support, and administrative review.

[0074] 5. This invention possesses excellent engineering adaptability and scalability, enabling rapid deployment on existing government infrastructure. The entire technical solution strictly adheres to government intranet security deployment standards, and is based on a general-purpose distributed object storage system, standardized Markdown format, and mainstream vectorized model architecture, requiring no large-scale modifications to existing government IT infrastructure. Each functional module adopts a loosely coupled architecture, allowing for independent deployment and flexible expansion, with low operational barriers and strong scenario adaptability. The solution can quickly cover various government document processing scenarios throughout the entire CIM construction lifecycle, including policy regulations, project approval, construction management, acceptance evaluation, and operation and maintenance supervision. It can also be smoothly extended to other government big data processing fields such as government services, market supervision, and urban governance, possessing strong replicability and scalability. Attached Figure Description

[0075] Figure 1 This is a flowchart illustrating the operation of a CIM construction government document RAG method for AI-driven intelligent interaction, as described in this invention.

[0076] Figure 2 This is a flowchart illustrating the hierarchical decomposition of government documents in the CIM construction RAG method for AI-based intelligent interaction according to the present invention.

[0077] Figure 3This is a flowchart illustrating the operation of tabular data in a CIM construction government document RAG method for AI-driven intelligent interaction according to the present invention.

[0078] Figure 4 This is a flowchart illustrating the operation of image and process data in a CIM construction government document RAG method for AI-based intelligent interaction according to the present invention.

[0079] Figure 5 This is a flowchart illustrating the operation of the RAG method for CIM construction government documents in the present invention, which is oriented towards AI intelligent interaction and integrates government documents with spatial data.

[0080] Figure 6 This is a flowchart illustrating the hierarchical and categorized storage process in the CIM construction government document RAG method for AI-driven intelligent interaction, as described in this invention.

[0081] Figure 7 This is a flowchart illustrating the operation of the first round of initial retrieval using a hybrid retrieval method combining vector retrieval and keyword retrieval in the AI-oriented intelligent interaction CIM construction government document RAG method of the present invention.

[0082] Figure 8 This is a flowchart illustrating the second round of refined retrieval in the CIM construction government document RAG method for AI-based intelligent interaction according to the present invention. Detailed Implementation

[0083] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0084] Example 1

[0085] Please see Figures 1-8 This invention provides a technical solution: a CIM construction government document RAG method for AI-driven intelligent interaction, applied to government data processing scenarios using lightweight AI large models on government intranets. The processing objects include CIM construction-related government documents containing text, tables, forms, images, and process-related content. The method includes the following steps:

[0086] S1. Input and hierarchical decomposition of government documents: Input government documents, perform global semantic analysis on the government documents, and construct a three-level directory structure. Semantically refine the content of each level of directory, and control the data volume of the corresponding content of a single-level directory (usually replaced by the number of characters) and not exceed the preset threshold to form a three-level directory structure. The first-level directory is the document name and overall introduction, the second-level directory is the main business chapter of the document, and the third-level directory is the subdivided topic content under the second-level directory.

[0087] S2. Document Multi-Type Data Recognition and Extraction: Differentiated processing is performed on different types of data in government documents. Specifically, tables in documents are identified and their content is structured and parsed using OCR technology and stored in a relational database. Images in documents are identified and their semantic information is semantically recognized using a multimodal model and stored in a relational database. Flowcharts in documents are identified and their flow is recognized using OCR technology and a multimodal model. Structured graph objects are constructed and stored in a graph database.

[0088] S3. Integration of government documents and spatial data: Extract standard addresses, project and event information from documents, and perform spatial resource retrieval through the service interface of CIM Resource Center;

[0089] If a matching spatial object is found, the mapping relationship is stored in a relational database to realize the association and integration of government documents and spatial data;

[0090] S4. Hierarchical and Classified Storage: The complete content of processed government documents is stored in a distributed object storage system. The second-level directory is used as the core organizational dimension. The main content, object storage address, and key fields corresponding to the third-level directory are constructed into structured entries and stored in the government knowledge base. At the same time, the semantic information of document summary, content of each level of directory, and non-text data are vectorized and stored in the corresponding vector library.

[0091] S5. Multi-round hierarchical retrieval: A multi-round hierarchical retrieval strategy of coarse first and then fine is adopted. First, the first round of initial retrieval is performed in the government knowledge base and vector library to obtain the top-N items that match the user's query requirements and their corresponding object storage addresses. Then, the corresponding document chapters are retrieved according to the object storage addresses to perform the second round of fine retrieval, which accurately locates the content fragments that match the user's query intent. If the content is associated with images, tables or spatial data, cross-modal information extraction is performed simultaneously after relevance determination.

[0092] S6. Output of search results: For the content fragments obtained from the second round of refined search, key information extraction and multi-fragment fusion processing are performed. The results are generated by using a large language model. Based on the source and semantic information of the search content, the content output to the terminal is formatted.

[0093] This includes using charts to represent statistical data results, using map points to represent results such as standard addresses, projects, and events, and using flowcharts to reconstruct process-related results.

[0094] The accompanying citation traceability materials include confidence level annotations, and the citation traceability materials include the source document name, chapter position, object storage address, and original text excerpt;

[0095] For spatial data, we use spatial information display and analysis tools to create visualizations and render results that combine text and graphics.

[0096] S7. Interaction with the CIM platform: When a user clicks the spatial data mapping entry or the tool interaction button on the search results interface, the interaction with the CIM platform is passively triggered.

[0097] It needs to be further explained that: with social development, the new government documents have more comprehensive information coverage and more flexible content structure than the current government documents. In addition to regular text, they also integrate multiple forms of content such as charts, lists, indexes, and notes.

[0098] Taking the new type of document for engineering construction projects as an example, in addition to containing the basic project information stipulated by the standard, it also integrates cross-domain management and control information (such as ecological management and control), project construction renderings, project change flowcharts, drone on-site photos, historical archives and other multi-source content. This invention can be adapted to run on new types of government documents.

[0099] In this embodiment, specifically: In S1, the preset threshold is dynamically determined based on the context window size of the lightweight AI large model deployed on the government intranet. The specific determination method is as follows:

[0100] Obtain the number of context window tokens for the target lightweight AI model, calculate the corresponding character count threshold based on the conversion rate of 1 token corresponding to 1.5-2 Chinese characters in Chinese text, and reserve 20% for prompt words and additional instruction information to calculate the preset threshold for single-level directory content.

[0101] In this embodiment, specifically: in S1, the specific implementation steps for the hierarchical breakdown of government documents include:

[0102] S11, Global Document Parsing: Calls the pre-trained large model API with context processing capabilities superior to the target lightweight AI large model, and combines it with OCR tools to perform full content recognition and parsing of government documents, extracting the document's chapter structure, text content, tables, images and process information;

[0103] S12. Document summary area generation: Extract the core information of the document through the pre-trained large model and generate the document summary area. The document summary area includes a document title of no more than N (20) characters (precisely summarizing the core theme of the document), a document summary of no more than M (50) characters (briefly explaining the core content, background and purpose of the document), and no more than K (10) core tags (precisely covering the core keywords, business areas and data types of the document, used to quickly locate document attributes).

[0104] S13. Basic directory generation: Based on the document parsing results, extract the core logic, generate a second-level directory and an initial third-level directory structure, and assign a unique identifier ID to each directory, establish a mapping relationship between the directory ID and the corresponding content material, thereby achieving a precise association between the directory and the content material.

[0105] S14. Cascading directory iterative decomposition: Verify the content material corresponding to a single directory. If the content data volume exceeds the preset threshold, the directory is decomposed a second time to generate the next level subdirectory. Establish a cascading index relationship between the parent directory ID and the subdirectory ID. Repeat the iteration until the content data volume corresponding to all leaf node directories meets the preset threshold requirements.

[0106] What needs further explanation is that by breaking down government documents into hierarchical levels, a unified structure of multi-level directories, cascading indexes, and content blocks is formed, thereby providing appropriately granular processing units for subsequent semantic retrieval and interaction.

[0107] In this embodiment, specifically: in S2, the processing steps for tabular data are as follows:

[0108] S211, Table Region Localization: Using PaddleOCR's table detection model, the table regions of government documents are detected, and their location information and boundary coordinates are obtained.

[0109] S212, Table Structured Parsing: Apply a multimodal large language model (based on QwenVL) to the located table area to parse and output structured data containing table headers, row and column relationships, and cell content;

[0110] S213. Data normalization processing: Perform format unification, null value filtering and completion, and data type standardization processing on structured data to make it conform to relational database storage specifications;

[0111] S214. Data entry and association mapping: Create a data table in the relational database that matches the table structure, batch enter the processed structured data into the database, and configure a unique document identifier and a unique chapter identifier for each table data. Establish an association mapping between table data and corresponding documents and table paragraphs to realize cross-type joint retrieval and tracing of text content and table data.

[0112] In this embodiment, specifically: in S2, the processing steps for image-type and process-type data are as follows:

[0113] S221. Region localization: Locate image or process content regions in a document using PaddleOCR's image region detection model, and obtain location information and boundary coordinates;

[0114] S222, Format standardization: Standardize the format of the located area content and convert it into a standard image format;

[0115] S223, Multimodal Semantic Parsing: Call the multimodal large language model deployed on the government intranet to parse the content. For image data, identify and extract text information, key objects, and scene types. For process data, identify and extract text information, process nodes, connection relationships, node business meanings, and execution conditions.

[0116] S224. Semantic Information Generation: Integrate the parsing results to generate descriptive text, core keywords, and semantic tags;

[0117] S225, Index Association: Associate the generated descriptive text, keywords, and semantic tags with the corresponding content in the storage address of the distributed object storage system, and store them in the corresponding fields of the government knowledge base to realize textual retrieval of image and flowchart data.

[0118] In this embodiment, specifically: text-based government documents are standardized using Markdown format, with "#" indicating the first-level directory, "##" indicating the second-level directory, and "###" indicating the third-level directory, thus achieving standardized binding between the directory structure and content.

[0119] In this embodiment, specifically: text-based government documents are reconstructed into a structured multi-level directory system through manual annotation or with the assistance of a large language model; wherein, the first-level directory covers the document name and content summary, the second-level directory defines the document's framework theme and core improvement points, and the third-level directory refines to specific text segment themes and corresponding content entities.

[0120] In this embodiment, specifically: in S3, the government documents and spatial data are associated and fused, and the specific steps are as follows:

[0121] S31. Using a large language model, identify and extract standard address entities, project elements and event elements from the document text, and transform the elements into a structured first data set.

[0122] S32. Send the retrieval request to the CIM Resource Center, perform spatial resource retrieval through the CIM Resource Center's service interface, execute multi-dimensional queries based on spatial location or semantic similarity, and obtain candidate CIM resource objects and their corresponding resource identifiers.

[0123] S33. Perform confidence verification on candidate CIM resource objects, filter out effective related items, establish a mapping relationship table including government document identifier, extracted element type, CIM resource identifier and matching weight, and complete the connection between non-spatial data and spatial data.

[0124] This involves reading the basic attribute information, spatial geometric information, and topological relationship information of CIM resource objects to form a spatial object data set.

[0125] S34. Based on the preset prompt word template, instruct the large language model to summarize and translate the technical parameters and spatial characteristics of CIM resources, generate natural language generalized description text for government affairs scenarios, and write the text back to the corresponding position in the mapping table.

[0126] In this embodiment, specifically: in S4, the specific implementation method of hierarchical and classified storage is as follows:

[0127] S41. Document Index Data Storage: Convert the document summary information (including title, summary, and tags) and the summary content corresponding to each level of directory into vector representations through a vectorization model and store them in the RAG vector library.

[0128] The complete original content of the document is stored in the form of a file in a distributed object storage system, and a two-way mapping between the vector library entries and the original document is established through the storage address field;

[0129] S42. Document content data storage: The government document content that has been hierarchically decomposed and standardized is stored in Markdown format in a distributed object storage system (such as MinIO, Ceph, etc.). The content of the third-level directory is stored in the government knowledge base, organized by the second-level directory.

[0130] S43. Non-text data storage: For image and process data, the extracted semantic information is vectorized and stored in a relational database, while the original files are stored in a distributed object storage system.

[0131] For tabular data, structured information is stored in a relational database, while the original files are stored in a distributed object storage system.

[0132] S44. Association Mapping Management: Establish a unified association table to centrally manage the index information of various types of data. The association table supports multi-version storage and establishes an association with the distributed object storage system through the storage address field to realize bidirectional traceability of all types of data.

[0133] It is worth further elaborating that the above-mentioned classification and storage method can be used to accommodate multimodal government data within the same knowledge base framework, enabling vectorized retrieval of summary and summary content, centralized management of original materials, and leveraging the advantages of relational databases for structured data, thereby improving overall retrieval efficiency and traceability.

[0134] In this embodiment, specifically: In S5, the first round of initial retrieval adopts a mixed retrieval method of coarse-to-fine. First, the user query is vectorized, then the summary directory index area of ​​the vector library is searched to quickly narrow down the range of candidate documents, and finally, the main content index area combines vector retrieval and keyword retrieval to achieve accurate matching. The specific steps are as follows:

[0135] S511, Query Vectorization: Use the vectorization model (such as Sentence-BERT, text-embedding, etc.) used in the database entry stage to convert the user's query statement into a vector representation;

[0136] S512, Summary Directory Search: In the summary directory index area of ​​the RAG vector library, perform vector similarity search with the query vector, and return a list of matching document identifiers, which can be used as the candidate document range for subsequent searches to narrow down the search space;

[0137] S513, Vector Similarity Retrieval: Using the document identifier list returned by S512 as constraints, perform approximate nearest neighbor retrieval (using HNSW and IVF indexing algorithms) in the main content index area of ​​the RAG vector library, calculate the cosine similarity or inner product similarity between the query vector and each target quantity, and return the Top-K records with the highest similarity and their corresponding similarity scores and object storage addresses.

[0138] S514 Keyword Matching Retrieval: Using the Top-K records returned by S513 as the candidate set, retrieve the corresponding main content from the distributed object storage system according to the object storage address of each record. After segmenting the user query statement into words, perform keyword matching in the main content through the keyword matching algorithm (BM25 algorithm) and calculate the relevance score.

[0139] S515, Result Fusion and Sorting: The vector retrieval score of S513 and the keyword retrieval score of S514 are weighted and fused (the weight can be dynamically adjusted according to the business scenario). After comprehensive sorting, the Top-N relevant entries are returned. Each entry contains the corresponding main content fragment and object storage address.

[0140] In this embodiment, specifically: In S5, the second round of refined retrieval targets the document-related multimodal data returned in the first round, performing cross-modal information extraction and retrieval. The specific steps are as follows:

[0141] S521, Document Chapter Retrieval: Based on the object storage address returned by the first round of initial retrieval, retrieve the corresponding complete rich document (including docx, Markdown, and rtf, etc.) chapters from the distributed object storage system;

[0142] S522, Multimodal Reference Resolution: Parses multimodal data reference fields in document sections to identify associated database table identifiers, image storage addresses, and GIS spatial identifiers, etc.

[0143] S523, Database table data retrieval: Based on the parsed database table identifier, retrieve the corresponding data from the relational database or data lake, and perform field matching and data relationship verification;

[0144] S524. Image content retrieval: Retrieve the original image based on the parsed image storage address, extract the semantic features of the image through a cross-modal model, and match them with the user's query intent for relevance.

[0145] S525, GIS Spatial Data Retrieval: Retrieve corresponding vector or raster data from the spatial database based on the parsed GIS spatial identifiers, and perform spatial location and attribute information matching;

[0146] S526. Result Merging and Re-ranking: Merge and deduplicate the results of each modality in the second round of retrieval with the initial retrieval results in the first round, and sort them by weighted relevance scores of the two rounds of retrieval, returning the final Top-N entries. Each entry contains complete citation information such as text content, data tables, images, and spatial data, as well as the source address.

[0147] In this embodiment, specifically: In S6, confidence level labels are generated. Based on the similarity scores between the first round of initial retrieval and the second round of refined retrieval, the confidence level values ​​of each entry are calculated and output along with the source material.

[0148] S6 also includes multimodal result display, presenting natural language answers in a dialogue interface, while adaptively rendering visualization charts such as tables, line charts, bar charts and flowcharts according to the content type. The chart data is based on the structured results after the second round of retrieval fusion.

[0149] In this embodiment, specifically: in S7, spatial data mapping interaction, after the user clicks the spatial data mapping entry, the system parses the coordinate information of the target location or area, issues mapping instructions through the CIM platform GIS service interface, accurately overlays the spatial data onto the CIM scene layer, and completes visualization operations such as project positioning and area boundary mapping;

[0150] In S7, the tool interaction is the government affairs tool call interaction. After the user clicks the government affairs business operation button, the system parses the government affairs information such as engineering construction projects and land planning in the search results, matches and calls the corresponding GIS service interface of the CIM platform, issues spatial processing function instructions, performs map query, layer overlay and feature positioning operations, and sends the processing results back to the CIM front end to complete the visualization display.

[0151] The CIM platform provides an entry point for spatial data and tool interaction. For spatial data involved in the search results, a map entry point is provided on the interface. For content involving government business operations, tool interaction buttons are provided. The map entry point is used to trigger the visualization of spatial data on the CIM platform, and the operation buttons are used to trigger the interaction of S7 government tools.

[0152] Example 2

[0153] Government policy document processing

[0154] The object of processing is a government policy document containing text and tables, namely the "XX Government Service Management Measures". The AI ​​model deployed on the government intranet is version 14B with a preset threshold of 2000 characters.

[0155] Implementation steps:

[0156] 1. Document Hierarchy and Standardization: After receiving government policy documents, the documents are standardized using Markdown processing software. The document name and overall introduction are identified by "#" as the first-level directory, and the chapters such as "General Provisions", "Processing Procedures", "Supervision and Management", and "Supplementary Provisions" are identified by "##" as the second-level directory. The specific clauses and explanations under each chapter are the third-level directory.

[0157] For third-level directories with content exceeding 2,000 characters, an online AI summarization model is invoked to summarize the content, ensuring that the content of all leaf node directories does not exceed a preset threshold. At the same time, semantic similarity calculation is used to ensure that the retention rate of key information is ≥90%.

[0158] 2. Data classification and processing: The "List of Materials for Government Service Processing" table contained in the document is imported into a relational database by the table processing unit, and indexes are created for fields such as "material name, number of copies, format requirements, and remarks";

[0159] In this process, text and form content in the document are directly entered into the storage process;

[0160] 3. Hierarchical storage: Store the standardized Markdown document in the MinIO object storage system and record the storage address of each part (e.g., " / xx-mgt / chap2 / sec4.md").

[0161] With the second-level directory "General Principles, Processing Procedures" as the core, the corresponding third-level directory content, object storage address, and extracted keywords (such as "government services, processing materials, application conditions") are stored in the PostgreSQL knowledge base, and vectorized representations are generated and stored at the same time;

[0162] 4. Multi-round hierarchical retrieval: When a user initiates a query request for "What are the application materials for XX government services", a mixed vector and keyword search is first performed in the knowledge base to retrieve relevant entries for "application process and application materials" and obtain the corresponding object storage address " / xx-mgt / chap2 / sec4.md";

[0163] Then, based on the address, the corresponding Markdown document section is retrieved from the object storage system for a second, more refined search, and the specific information of the application materials is precisely located using a sliding window method;

[0164] 5. Results Output: Compile a list of required documents obtained from the search, along with the corresponding document chapter ("Chapter 2 Processing Procedures, Section 4 Required Documents"), object storage address, original text excerpts, and other referenced materials, and output structured search results to the user.

[0165] Example 3

[0166] Multi-type data comprehensive retrieval case

[0167] The object to be processed is a government project acceptance document containing textual descriptions, statistical tables, and on-site photos.

[0168] Implementation steps:

[0169] 1. Document hierarchical breakdown: The text is broken down into three levels of directories. The first level is the project overview, the second level is "construction progress, quality inspection, safety issues, and acceptance conclusion", and the third level is the specific content under each second level directory.

[0170] 2. Table Processing: Import the project acceptance data table (containing fields such as "inspection items, standard requirements, actual results, and whether it is qualified") into the database and create an index;

[0171] 3. Image Processing: Through multimodal AI analysis of on-site photos, safety hazards such as "damaged safety nets and improper scaffolding erection" are identified, and descriptive text "Construction Site - Damaged Safety Nets - 2024-05-20" is generated and keywords "safety nets, damage, hazard" are extracted.

[0172] 4. Hierarchical storage: Text content is stored in an object storage system, tabular data is stored in a database, and image descriptions and keywords are associated with image addresses and stored in a knowledge base;

[0173] 5. Multi-round search: When a user queries "quality problems found during the acceptance of a project", the system first searches the knowledge base for relevant image keywords such as "quality problems and hidden dangers" to obtain the image address " / project-photos / 20240520 / site1.jpg" and its description;

[0174] At the same time, search the database for records in the project acceptance conclusion where "qualified = no";

[0175] Finally, the two types of results are combined to output "Safety hazard exists: safety net is damaged (see on-site photos), quality inspection failures: 3 items (see attached table for details)".

[0176] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for creating RAG (Research, Editing, and Annotation) documents for CIM (Construction Information Management) projects oriented towards AI-powered intelligent interaction, characterized in that: This method, applied to a lightweight AI-powered large-scale model for government intranet data processing, processes CIM-related government documents containing text, tables, forms, images, and workflows. The method includes the following steps: S1. Input and hierarchical decomposition of government documents: Input government documents, perform global semantic analysis on government documents, construct a three-level directory structure, perform semantic refinement on the content of each level of directory, and control the data volume of the corresponding content of a single level directory to not exceed a preset threshold. S2. Document Multi-Type Data Recognition and Extraction: Differentiated processing is performed on different types of data in government documents. Specifically, tables in documents are identified and their content is structured and parsed using OCR technology and stored in a relational database. Images in documents are identified and their semantic information is semantically recognized using a multimodal model and stored in a relational database. Flowcharts in documents are identified and their flow recognition is performed using OCR technology and a multimodal model. Structured graph objects are constructed and stored in a graph database. S3. Integration of government documents and spatial data: Extract standard addresses, project and event information from documents, and perform spatial resource retrieval through the service interface of CIM Resource Center; If a matching spatial object is found, the mapping relationship is stored in a relational database to realize the association and integration of government documents and spatial data; S4. Hierarchical and Classified Storage: The complete content of processed government documents is stored in a distributed object storage system. The second-level directory is used as the core organizational dimension. The main content, object storage address, and key fields corresponding to the third-level directory are constructed into structured entries and stored in the government knowledge base. At the same time, the semantic information of document summary, content of each level of directory, and non-text data are vectorized and stored in the corresponding vector library. S5. Multi-round hierarchical retrieval: Adopting a multi-round hierarchical retrieval strategy of coarse first and then fine, the first round of initial retrieval is performed in the government knowledge base and vector library to obtain the Top-N items that match the user's query needs and their corresponding object storage addresses. Then, the corresponding document chapters are retrieved according to the object storage addresses to perform the second round of fine retrieval, which accurately locates the content fragments that match the user's query intent. S6. Output of search results: For the content fragments obtained from the second round of refined search, key information extraction and multi-fragment fusion processing are performed. The results are generated by using a large language model. Based on the source and semantic information of the search content, the content output to the terminal is formatted. This includes using charts to represent statistical data results, using map points to represent standard addresses, project and event results, and using flowcharts to reconstruct process-related results; S7. Interaction with the CIM platform: When a user clicks the spatial data mapping entry or the tool interaction button on the search results interface, the interaction with the CIM platform is passively triggered.

2. The CIM construction government document RAG method for AI-driven intelligent interaction as described in claim 1, characterized in that: In S1, the preset threshold is dynamically determined based on the context window size of the lightweight AI large model deployed on the government intranet. The specific determination method is as follows: Obtain the number of context window tokens for the target lightweight AI model, calculate the corresponding character count threshold based on the conversion rate of 1 token corresponding to 1.5-2 Chinese characters in Chinese text, and reserve 20% for prompt words and additional instruction information to calculate the preset threshold for single-level directory content.

3. The CIM construction government document RAG method for AI-driven intelligent interaction as described in claim 2, characterized in that: In S1, the specific implementation steps for the hierarchical breakdown of government documents include: S11, Global Document Parsing: Calls the pre-trained large model API with context processing capabilities superior to the target lightweight AI large model, and combines it with OCR tools to perform full content recognition and parsing of government documents, extracting the document's chapter structure, text content, tables, images and process information; S12. Document summary area generation: Extract the core information of the document through a pre-trained large model and generate a document summary area. The document summary area includes a document title of no more than N characters, a document summary of no more than M characters, and no more than K core tags. S13. Basic directory generation: Based on the document parsing results, extract the core logic, generate a second-level directory and an initial third-level directory structure, and assign a unique identifier ID to each directory to establish a mapping relationship between directory IDs and corresponding content materials; S14. Cascading Directory Iterative Decomposition: Verify the content materials corresponding to a single directory. If the content data volume exceeds the preset threshold, the directory is decomposed a second time to generate the next level subdirectory. Establish a cascading index relationship between the parent directory ID and the subdirectory ID. Repeat the iteration until the content data volume corresponding to all leaf node directories meets the preset threshold requirements.

4. The RAG method for CIM construction government documents oriented towards AI intelligent interaction as described in claim 3, characterized in that: In S2, the specific steps for processing tabular data are as follows: S211. Table Region Location: Use a table detection model to detect regions in government documents, locate table regions, and obtain location information and boundary coordinates. S212, Table Structured Parsing: Apply a multimodal large language model to the located table area to parse and output structured data containing table headers, row and column relationships, and cell content; S213. Data normalization processing: Perform format unification, null value filtering and completion, and data type standardization processing on structured data to make it conform to relational database storage specifications; S214. Data entry and association mapping: Create a data table in the relational database that matches the table structure, batch enter the processed structured data into the database, and configure a unique document identifier and a unique chapter identifier for each table data to establish an association mapping between the table data and the corresponding document and table of contents paragraph.

5. The RAG method for CIM construction government documents oriented towards AI intelligent interaction as described in claim 4, characterized in that: In S2, the specific processing steps for image and process data are as follows: S221. Region localization: Locate image or process content regions in a document using an image region detection model, and obtain location information and boundary coordinates; S222, Format standardization: Standardize the format of the located area content and convert it into a standard image format; S223, Multimodal Semantic Parsing: Call the multimodal big model deployed on the government intranet to parse the content. For image data, identify and extract text information, key objects, and scene types. For process data, identify and extract text information, process nodes, connection relationships, node business meanings, and execution conditions. S224. Semantic Information Generation: Integrate the parsing results to generate descriptive text, core keywords, and semantic tags; S225, Index Association: Associate the generated descriptive text, keywords, and semantic tags with the corresponding content in the storage address of the distributed object storage system, and store them in the corresponding fields of the government knowledge base to realize textual retrieval of image and flowchart data.

6. The CIM construction government document RAG method for AI-driven intelligent interaction as described in claim 5, characterized in that: In S3, the integration of government documents and spatial data involves the following steps: S31. Using a large language model, identify and extract standard address entities, project elements and event elements from the document text, and transform the elements into a structured first data set. S32. Send the retrieval request to the CIM Resource Center, perform spatial resource retrieval through the CIM Resource Center's service interface, execute multi-dimensional queries based on spatial location or semantic similarity, and obtain candidate CIM resource objects and their corresponding resource identifiers. S33. Perform confidence verification on candidate CIM resource objects, filter out effective related items, establish a mapping relationship table including government document identifier, extracted element type, CIM resource identifier and matching weight, and complete the connection between non-spatial data and spatial data. S34. Based on the preset prompt word template, instruct the large language model to summarize and translate the technical parameters and spatial characteristics of CIM resources, generate natural language generalized description text for government affairs scenarios, and write the text back to the corresponding position in the mapping table.

7. The CIM construction government document RAG method for AI-driven intelligent interaction as described in claim 6, characterized in that: In S4, the specific implementation method of hierarchical and classified storage is as follows: S41. Document Index Data Storage: Convert the document summary information and the summary content corresponding to each level of directory into vector representation through a vectorization model and store it in the RAG vector library; The complete original content of the document is stored in the form of a file in a distributed object storage system, and a two-way mapping between the vector library entries and the original document is established through the storage address field; S42. Document content data storage: The government document content that has been hierarchically decomposed and standardized is stored in Markdown format in a distributed object storage system. The content of the third-level directory is stored in the government knowledge base, organized by the second-level directory. S43. Non-text data storage: For image and process data, the extracted semantic information is vectorized and stored in a relational database, while the original files are stored in a distributed object storage system. For tabular data, structured information is stored in a relational database, while the original files are stored in a distributed object storage system. S44. Association Mapping Management: Establish a unified association table to centrally manage the index information of various types of data. The association table supports multi-version storage and establishes an association with the distributed object storage system through the storage address field to achieve bidirectional traceability of all types of data.

8. The RAG method for CIM construction government documents oriented towards AI intelligent interaction as described in claim 7, characterized in that: In S5, the first round of initial retrieval employs a hybrid approach of coarse-to-fine search. First, the user query is vectorized. Then, the summary directory index of the vector library is searched to quickly narrow down the range of candidate documents. Finally, the main content index combines vector retrieval with keyword retrieval to achieve precise matching. The specific steps are as follows: S511, Query Vectorization: Adopt the vectorization model used in the database entry stage to convert user query statements into vector representations; S512, Summary Directory Search: In the summary directory index area of ​​the RAG vector library, perform vector similarity search with the query vector, and return a list of matching document identifiers, which can be used as the candidate document range for subsequent searches to narrow down the search space; S513, Vector Similarity Retrieval: Using the document identifier list returned by S512 as constraints, perform an approximate nearest neighbor retrieval in the main content index area of ​​the RAG vector library, calculate the cosine similarity or inner product similarity between the query vector and each target quantity, and return the Top-K records with the highest similarity and their corresponding similarity scores and object storage addresses. S514 Keyword Matching Retrieval: Using the Top-K records returned by S513 as the candidate set, retrieve the corresponding main content from the distributed object storage system according to the object storage address of each record, segment the user query statement into words, and perform keyword matching in the main content through the keyword matching algorithm to calculate the relevance score. S515, Result Fusion and Sorting: The vector retrieval score of S513 and the keyword retrieval score of S514 are weighted and fused together, and the top-N relevant entries are returned after comprehensive sorting. Each entry contains the corresponding main content fragment and object storage address. In S5, the second round of refined retrieval targets the document-related multimodal data returned in the first round, performing cross-modal information extraction and retrieval. The specific steps are as follows: S521. Document Chapter Retrieval: Based on the object storage address returned by the first round of initial retrieval, retrieve the corresponding complete rich document chapter from the distributed object storage system; S522, Multimodal Reference Resolution: Parses multimodal data reference fields in document sections to identify associated database table identifiers, image storage addresses, and GIS spatial identifier information; S523. Database table data retrieval: Based on the parsed database table identifier, retrieve the corresponding data from the relational database and perform field matching and data relationship verification; S524. Image content retrieval: Retrieve the original image based on the parsed image storage address, extract the semantic features of the image through a cross-modal model, and match them with the user's query intent for relevance. S525, GIS Spatial Data Retrieval: Retrieve corresponding vector or raster data from the spatial database based on the parsed GIS spatial identifiers, and perform spatial location and attribute information matching; S526. Result merging and re-ranking: Merge and deduplicate the results of each modality in the second round of retrieval with the initial retrieval results in the first round, and then sort them by weighted relevance scores from both rounds of retrieval to return the final Top-N items.

9. The CIM construction government document RAG method for AI-driven intelligent interaction as described in claim 8, characterized in that: In S6, confidence labels are generated by comprehensively calculating the confidence values ​​of each item based on the similarity scores of the first round of initial search and the second round of refined search, and outputting them together with the source materials. S6 also includes multimodal results display, presenting natural language answers in a dialogue interface, and adaptively rendering tables, line charts, bar charts, and flowcharts based on content type. The chart data is based on the structured results fused from the second round of retrieval.

10. The RAG method for CIM construction government documents oriented towards AI intelligent interaction as described in claim 9, characterized in that: In S7, the spatial data mapping interaction allows users to click on the spatial data mapping entry point. The system then parses the coordinate information of the target location or area and issues mapping instructions through the CIM platform GIS service interface. This accurately overlays the spatial data onto the CIM scene layer, completing the project positioning and area boundary mapping. In S7, the tool interaction is the government affairs tool call interaction. After the user clicks the government affairs business operation button, the system parses the engineering construction project and land planning government affairs information in the search results, matches and calls the corresponding GIS service interface of the CIM platform, issues spatial processing function instructions, performs map query, layer overlay and feature positioning operations, and sends the processing results back to the CIM front end to complete the visualization display. The CIM platform provides an entry point for spatial data and tool interaction. For spatial data involved in the search results, a map entry point is provided on the interface. For content involving government business operations, tool interaction buttons are provided. The map entry point is used to trigger the visualization of spatial data on the CIM platform, and the operation buttons are used to trigger the interaction of S7 government tools.

Citation Information

Patent Citations

  • Extraction and retrieval method based on multi-type documents

    CN120429314A

  • Hierarchical document parsing and metadata generation for machine learning applications

    US12393637B1