Intelligent question and answer method and system for public rental housing and computer equipment

By employing a structured action framework and a large language model combined with a knowledge graph in the intelligent question-and-answer system for public rental housing, the problems of inaccurate information retrieval, delayed knowledge updates, and vulnerable data security have been solved, achieving accurate, efficient, and secure intelligent question-and-answer services.

CN121387968APending Publication Date: 2026-01-23SHANGHAI TUOXI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511421824.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing intelligent question-answering systems suffer from problems such as inaccurate information retrieval, delayed knowledge updates, difficulty in processing multimodal data, lack of business logic and compliance, and vulnerability of data security when dealing with the public rental housing sector.

Method used

It adopts a structured action framework to adaptively select retrieval paths, retrieves information in parallel from vector databases, search engines and knowledge graph databases, generates answers by combining large language models, verifies policy compliance through a rule engine, adds traceable source annotations, and integrates dynamic de-identification and blockchain auditing mechanisms.

Benefits of technology

It enables precise, efficient, and secure intelligent responses in the public rental housing sector, improving information recall and relevance, ensuring the accuracy and compliance of answers, and enhancing user trust and data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121387968A_ABST
    Figure CN121387968A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of intelligent customer service, and provides an intelligent question-answering method and system for public rental housing and computer equipment, and the method comprises the steps: receiving a query request input by a user, recognizing a query intention and key parameters through analyzing the query request, and generating an action framework containing the query intention, the key parameters and a preset retrieval strategy; at least one retrieval path is selected and executed according to the action framework, information is retrieved in parallel from heterogeneous data sources at least comprising a vector database, a search engine and a knowledge graph database, and all recalled source information is integrated into an evidence chain capable of being verified; and constraining a generation process of the large language model based on an evidence chain to generate a preliminary answer, calling a rule engine to perform policy compliance verification on the preliminary answer, and after the verification is passed, outputting a final answer with a traceable source label. According to the method and the system, the problem that defects exist when business scenes which are complex, dynamic and high in compliance requirement in the public rental housing field are processed in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of intelligent customer service, in particular to a public rental housing intelligent question and answer method and system and a computer device. BACKGROUND

[0002] As an important livelihood guarantee policy, public rental housing (public rental housing) involves a large number of complex policy documents, personal proof materials and cross-department business logic in the aspects of application, audit and allocation. When the traditional intelligent question and answer system is applied to this field, it faces the following severe challenges:

[0003] Information retrieval bottleneck: the existing system depends on keyword retrieval (such as Elasticsearch), which has high precision but cannot understand semantically similar colloquial questions; or relies on single semantic retrieval, which can understand generalized questions but has weak matching ability for accurate information such as policy numbers and clauses. This "either-or" mode leads to incomplete and inaccurate search results.

[0004] Knowledge update delay: public rental housing policies are highly regional and time-sensitive (for example, the annual update rate of some local policies is more than 35%). Traditional knowledge bases rely on manual updates, which have a long cycle (more than 12 hours on average) and are prone to provide outdated and incorrect policy guidance.

[0005] Multimodal data processing gap: the application process involves a large amount of unstructured data, such as PDF format policy announcements, user uploaded contract / ID / income proof scans, dialectal voice consultations, etc. Existing solutions are difficult to uniformly process these heterogeneous multimodal data, leading to information silos and service gaps.

[0006] Business logic and compliance gap: public rental housing eligibility review involves data collaboration and dynamic calculation (such as household per capita income calculation) of multiple systems such as real estate, social security and civil affairs. Existing question and answer systems usually do not have complex business logic reasoning capabilities, and cannot guarantee that each sentence of the generated answer strictly follows the latest policy clauses, which poses a compliance risk.

[0007] Data security and privacy protection vulnerability: the public rental housing field involves a large amount of highly sensitive personal information such as ID numbers, bank statements, family relationships and medical history. Existing systems generally have problems such as data plaintext storage, missing operation logs, and un-auditable answer generation process, which pose serious risks of data leakage and abuse.

[0008] Therefore, there is an urgent need for a new intelligent question and answer technology solution that can integrate multimodal data processing, realize real-time knowledge update, ensure the compliance and credibility of answers, and have full-link security auditing capabilities. SUMMARY

[0009] Based on this, the purpose of the present application is to provide a public rental housing intelligent question and answer method, system and computer equipment, so as to fundamentally solve the problems existing in the prior art when dealing with complex, dynamic and high compliance requirement business scenarios in the field of public rental housing.

[0010] According to the public rental housing intelligent question and answer method provided by the embodiment of the present application, the method comprises:

[0011] receiving a natural language query request input by a user, identifying at least one query intention and corresponding key parameters by analyzing the natural language query request, and generating a structured action framework comprising the query intention, the key parameters and a preset retrieval strategy;

[0012] According to the structured action framework, at least one retrieval path is adaptively selected and executed to retrieve information from heterogeneous data sources including vector databases, search engines and knowledge graph databases in parallel, and integrate the recalled source information into an evidence chain that can be verified;

[0013] Based on the evidence chain, the generation process of the large language model is constrained to generate a preliminary answer, and a preset rule engine is called to verify the policy compliance of the preliminary answer, and after the verification is passed, a final answer with traceable source annotation is output.

[0014] In addition, the public rental housing intelligent question and answer method according to the above embodiment of the present application can also have the following additional technical features:

[0015] Further, the step of analyzing the natural language query request to identify at least one query intention and corresponding key parameters, and generating a structured action framework comprising the query intention, the key parameters and a preset retrieval strategy comprises:

[0016] inputting the natural language query request into a pre-trained intention classification model to identify the query intention corresponding to the natural language query request from a set of predefined intention categories;

[0017] processing the natural language query request using a named entity recognition model to extract one or more entities and their corresponding entity types as the key parameters therefrom;

[0018] using the identified query intention as a query key to retrieve and match the corresponding preset retrieval strategy in a preset strategy library;

[0019] The identified query intention, the extracted one or more key parameters, and the matched preset retrieval strategy are uniformly encapsulated into a machine-readable data object, thereby generating the structured action framework.

[0020] Further, the step of adaptively selecting and executing at least one retrieval path from the structured action framework to retrieve information in parallel from heterogeneous data sources including at least vector databases, search engines and knowledge graph databases comprises:

[0021] parsing the structured action framework and dynamically and differentially constructing a specific query request for each activated heterogeneous data source;

[0022] distributing each specific query request to the corresponding heterogeneous data source in parallel to perform retrieval;

[0023] collecting retrieval results from each heterogeneous data source respectively and performing normalization processing to form a unified result set containing content, source and original score.

[0024] Further, the step of parsing the structured action framework and dynamically and differentially constructing a specific query request for each activated heterogeneous data source comprises:

[0025] parsing the structured action framework to obtain the contained query intent, key parameters and preset retrieval strategy;

[0026] for the vector database, converting the natural language query request or the extracted core content into a high-dimensional vector representation as a vector query;

[0027] for the search engine, combining the key parameters into a structured query object, which contains instructions for weight promotion of target fields specified by the preset retrieval strategy;

[0028] for the knowledge graph database, linking entities in the key parameters to graph nodes, and generating an executable graph query statement according to the relationship path defined in the query intent and the preset retrieval strategy.

[0029] Further, the step of generating an executable graph query statement comprises:

[0030] identifying the words representing core entities in the key parameters and finding and locking the corresponding entity nodes in the knowledge graph database;

[0031] extracting one or more predefined target relationship paths from the preset retrieval strategy according to the query intent, which defines the types and directions of edges between entity nodes that need to be traversed;

[0032] combining the locked entity nodes with the target relationship path to generate an executable graph query statement, the graph query statement being a complete query string conforming to a graph database query language syntax.

[0033] Further, the step of integrating the recalled source information into an evidence chain for verification includes:

[0034] According to the preset retrieval strategy in the structured action framework, a set of weight coefficients is dynamically assigned to the information recalled from each heterogeneous data source;

[0035] Based on the dynamically assigned weight coefficients, all recalled information is weighted and summed to calculate a unified relevance score;

[0036] According to the unified relevance score, all recalled information is re-ranked, and a preset number of information with high ranking is selected to form the evidence chain for verification.

[0037] Further, the step of constraining the generation process of the large language model based on the evidence chain to generate a preliminary answer includes:

[0038] Assembling the information in the evidence chain, the user's natural language query request, and a set of preset instruction templates into a structured prompt, the instruction templates including constraint instructions indicating that the large language model strictly answers according to the information provided in the evidence chain, fallback instructions indicating that when the evidence chain cannot support the answer, it should be explicitly declared that the information is insufficient, and traceability instructions requiring specific information sources to be cited when generating answers;

[0039] Sending the structured prompt to the large language model to generate a preliminary answer following the instruction templates.

[0040] Further, the step of assembling the information in the evidence chain, the user's natural language query request, and a set of preset instruction templates into a structured prompt includes:

[0041] Creating a dedicated context area and filling in each piece of information in the evidence chain and its corresponding source identification after formatting;

[0042] Inserting the preset instruction templates in the initial part of the prompt to set the role and behavior criteria of the large language model;

[0043] After the context area, the user's natural language query request is appended to clearly define the task target of this generation.

[0044] Further, the step of calling a preset rule engine to perform policy compliance verification on the preliminary answer comprises:

[0045] automatically extracting policy boundary conditions from the knowledge graph database to form a structured rule set;

[0046] pre-compiling the structured rule set into an executable rule instruction model deployed on a neural network processing unit;

[0047] loading the rule instruction model in real time when the large language model generates a preliminary answer, and verifying the answer content to determine whether the answer content violates the policy boundary conditions.

[0048] Further, the step of outputting a final answer with traceable source annotations comprises:

[0049] extracting metadata from the evidence chain that originates from each heterogeneous data source;

[0050] dynamically filling the metadata into a standardized traceability information format through a preset template engine;

[0051] attaching the generated traceability information to the answer that passes the policy compliance verification to form a final answer and output.

[0052] Further, before the step of dynamically filling the metadata into a standardized traceability information format through a preset template engine, further comprising:

[0053] identifying personal sensitive information contained in the preliminary answer and metadata through regular matching and conditional random field models;

[0054] performing dynamic desensitization processing on the identified personal sensitive information using format-preserving encryption technology.

[0055] Further, after the step of outputting a final answer with traceable source annotations, further comprising:

[0056] calculating the hash value of the audit log containing the timestamp, user identification, query request, evidence chain, and final answer through a hardware-accelerated hash algorithm;

[0057] recording the hash value on a distributed ledger to achieve tamper-proof evidence of operation.

[0058] Further, before the step of parsing the natural language query request to identify at least one query intent and corresponding key parameters, further comprising:

[0059] performing multi-modal analysis on the input unstructured document to extract corresponding text, table data, and directory structure;

[0060] The extracted text is processed by applying a dynamic block algorithm based on a combination of a sliding window and a semantic breakpoint detection model to segment a series of structured text blocks with coherent semantics;

[0061] The structured text blocks, as well as the parsed table data and directory structure metadata, are indexed and stored in the vector database and search engine;

[0062] Entities and their relationships in the public rental housing field are identified from the structured text blocks by an entity recognition and relationship extraction model, and the newly identified entities and relationships are updated to the knowledge graph database in an incremental manner.

[0063] Further, the step of applying a dynamic block algorithm based on a combination of a sliding window and a semantic breakpoint detection model to process the extracted text comprises:

[0064] A fixed-size sliding window is moved on the extracted text at a preset step size;

[0065] At each boundary position of the sliding window, a semantic breakpoint detection model is used to predict the probability of the current boundary position as a text segmentation point;

[0066] When the probability is higher than a preset threshold, text segmentation is performed at the current boundary position;

[0067] When the boundary position contains predefined legal clause keywords, the boundary of the sliding window is automatically dynamically expanded to the position where the legal clause ends, and then text segmentation is performed.

[0068] Further, the step of indexing and storing the structured text blocks, as well as the parsed table data and directory structure metadata, in the vector database and search engine comprises:

[0069] The structured text blocks are converted into a high-dimensional vector by a vector embedding model and stored in the vector database;

[0070] The keywords of the structured text blocks are extracted, and the keywords, as well as the parsed table data and directory structure metadata, are stored in the search engine.

[0071] Another embodiment of the present application also provides a public rental housing intelligent question-answering system, which comprises:

[0072] An action framework generation module is configured to receive a natural language query request input by a user, identify at least one query intention and corresponding key parameters by parsing the natural language query request, and generate a structured action framework including the query intention, the key parameters, and a preset retrieval strategy;

[0073] An evidence chain integration module is configured to adaptively select and execute at least one retrieval path according to the structured action framework, retrieve information from heterogeneous data sources including at least a vector database, a search engine, and a knowledge graph database in parallel, and integrate each source information recalled into an evidence chain available for verification.

[0074] An answer generation module is configured to constrain a generation process of a large language model based on the evidence chain to generate a preliminary answer, and call a preset rule engine to perform policy compliance verification on the preliminary answer, and output a final answer with traceable source annotation after the verification is passed.

[0075] Another embodiment of the present application also provides a computer device, which comprises a memory, a processor, and a program stored in the memory and executable on the processor, and the processor executes the program to implement the public rental housing intelligent question and answer method as described above.

[0076] The public rental housing intelligent question and answer method provided by the embodiment of the application realizes accurate, efficient and safe intelligent response to complex business scenarios in the public rental housing field by constructing a closed-loop processing flow from intention understanding, multi-dimensional mixed retrieval to credible generation control; ensures the semantic integrity of policy provisions in the preprocessing stage by applying a dynamic blocking algorithm combining a sliding window and a semantic breakpoint detection model, realizes intelligent and lossless analysis of unstructured documents, and provides a high-quality and logically coherent data basis for subsequent accurate retrieval and content generation, thereby significantly improving the accuracy of the entire question and answer system from the source; and by constructing a heterogeneous data source system including a vector database, a search engine and a knowledge graph database, and adaptively selecting and executing parallel retrieval according to the structured action framework, the organic combination of semantic understanding, keyword accurate matching and complex business relationship reasoning ability is realized, thereby fundamentally solving the contradiction between the user's vague intention and the accuracy of the policy provisions in the single retrieval mode, greatly improving the information recall rate and relevance in the complex query scenario; and by dynamically assigning weights according to the query intention after retrieval and fusing and sorting the recalled information, the intelligent and adaptive adjustment of the retrieval strategy is realized, ensuring that the system can focus on the most critical information dimension according to different business scenarios, thereby solving the limitations of static or single weight strategy in dealing with changing user needs, significantly enhancing the relevance of the question and answer and user satisfaction; and by generating answers based on the retrieved evidence chain and using structured prompts containing constraint instructions to guide the large language model, the factual constraints on the generated content are realized, fundamentally solving the inherent "illusion" problem of the large language model, ensuring the fidelity and accuracy of the answers, and effectively eliminating the risk of misleading policy information caused by the model's fabrication; and by calling a pre-compiled rule engine driven by the knowledge graph to verify the policy compliance before outputting the answer, an independent and objective "hard" verification link for the generated content is realized, ensuring that the final answer strictly complies with the boundary conditions of the public rental housing policy, thereby solving the compliance loopholes caused by relying only on the judgment of the large language model, and providing strong technical support for the rigor and authority of government service; and by attaching a self-generated traceable source label containing multi-source metadata to the final answer, the transparency and verifiability of the question and answer result are realized, solving the "black box" operation and unknown answer source problem of traditional question and answer systems, greatly improving the user's trust in intelligent customer service; and by integrating dynamic desensitization and blockchain-based audit evidence mechanism in the entire interaction process, the full-link protection of personal privacy data and the non-tamperable traceability of the operation process are realized, thereby solving the security and compliance risks in handling sensitive information in the public rental housing business, ensuring the safe and reliable operation of the system under the requirements of laws and regulations. The problems existing in the prior art when dealing with complex, dynamic and highly compliant business scenarios in the field of public rental housing are solved. Attached Figure Description

[0077] Figure 1 This is a flowchart illustrating the intelligent question-and-answer method for public rental housing in the first embodiment of the present invention;

[0078] Figure 2 This is a schematic diagram of the intelligent question-and-answer system for public rental housing according to the second embodiment of the present invention;

[0079] Figure 3 This is a schematic diagram of the structure of the computer device in the third embodiment of the present invention;

[0080] The following detailed description of the embodiments will further illustrate the present invention in conjunction with the above-described accompanying drawings. Detailed Implementation

[0081] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0082] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0083] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0084] Example 1

[0085] Please see Figure 1 The image shows a smart question-and-answer method for public rental housing in the first embodiment of the present invention. For ease of explanation, only the parts related to the embodiment of the present invention are shown. The smart question-and-answer method for public rental housing provided by the embodiment of the present invention includes:

[0086] Step S10, receiving a natural language query request input by a user, identifying at least one query intent and corresponding key parameters by parsing the natural language query request, and generating a structured action framework containing the query intent, the key parameters, and a preset retrieval strategy;

[0087] In one embodiment of the present application, the step of identifying at least one query intent and corresponding key parameters by parsing the natural language query request, and generating a structured action framework containing the query intent, the key parameters, and a preset retrieval strategy comprises:

[0088] inputting the natural language query request into a pre-trained intent classification model to identify the query intent corresponding to the natural language query request from a set of predefined intent categories;

[0089] processing the natural language query request using a named entity recognition model to extract one or more entities and their corresponding entity types as key parameters;

[0090] using the identified query intent as a query key to retrieve and match a corresponding preset retrieval strategy from a preset strategy library;

[0091] encapsulating the identified query intent, the extracted one or more key parameters, and the matched preset retrieval strategy into a machine-readable data object to generate a structured action framework.

[0092] Specifically, the method in the embodiments of the present application is applied to an intelligent question answering system, which efficiently, accurately, and safely converts a natural language query of a user into a professional answer conforming to public rental housing policies and regulations through a multi-stage, closed-loop intelligent processing flow. For example, in a typical implementation scenario, a user inputs a question "Hello, I am a retired soldier, my family's monthly income is 8000 yuan, and I want to apply for a two-bedroom in Lingang District. What are the policy incentives? Is there any housing available now?" through an official website of public rental housing or an embedded intelligent customer service window of a mobile phone APP. At this time, after the processing unit in the intelligent question answering system receives the natural language query text input by the user, an analysis process involving the cooperation of multiple sub-modules is started to generate an accurate and structured action framework for subsequent use.

[0093] First, the processing unit takes the user's complete natural language query request as input and sends it to an intent classification module. The intent classification module is internally deployed with a pre-trained deep learning-based intent classification model on a large amount of public rental housing domain question-answer corpus. The model analyzes the overall syntactic structure and core semantics of the query request to identify the query intent that best matches the current user request from a predefined set of intent categories. The predefined intent categories include, for example, "policy consultation intent" for handling general questions such as "What are the application conditions?", "data query intent" for handling housing inquiries that require real-time data such as "Is there a two-bedroom in the Lingang area?", and "relationship reasoning intent" for handling business inquiries involving complex relationships between entities such as "Will my spouse's application qualifications affect me?"

[0094] At the same time as identifying the query intent, the processing unit sends the same natural language query request to a named entity recognition module in parallel. The module uses an advanced sequence labeling model that has been deeply fine-tuned on a professional corpus in the public rental housing domain, enabling it to accurately extract one or more entities and their corresponding entity types from the text as key parameters for subsequent operations. For example, for the query "Can I apply for public rental housing in Xuhui District with a monthly income of 8,000 yuan?", the module can accurately identify "monthly income" as an "amount entity" with a value of "8,000 yuan" and "Xuhui District" as a "geographical location entity". This domain adaptation capability ensures high-precision identification of professional terms such as "co-tenancy qualifications" and "gradient subsidies".

[0095] Next, the processing unit integrates the output results of the first two steps. It uses the query intent identified in the first step (e.g., "policy consultation intent") as a query key to search a system-preconfigured strategy library stored in the form of a data dictionary or key-value pairs. The strategy library pre-configures a set of corresponding retrieval strategies for each query intent. The retrieval process is an exact match, and once the entry corresponding to the query intent is found, the processing unit reads and obtains the complete retrieval strategy defined under the entry. The pre-configured retrieval strategy specifies the details of subsequent retrieval operations, for example, for "policy consultation intent", the strategy may indicate that the search engine should be activated first and the retrieval should focus on the document title field.

[0096] Finally, the processing unit performs a packaging operation. It encapsulates the query intent identified in the first step, the one or more key parameters extracted in the second step, and the preset retrieval strategy matched in the third step as a whole into a machine-readable data object. This data object usually adopts a standard data exchange format such as JSON, which contains clear fields to store the intent, parameter list, and strategy details respectively. This finally generated data object, i.e. the structured action framework in the embodiment of the present application, will serve as the only and explicit action guide for all subsequent retrieval, integration, and generation steps.

[0097] Further, in an embodiment of the present application, the above-mentioned step of parsing the natural language query request to identify at least one query intent and corresponding key parameters further comprises:

[0098] Performing multi-modal analysis on the input unstructured document to extract corresponding text, table data, and directory structure;

[0099] Applying a dynamic block algorithm based on a combination of sliding window and semantic breakpoint detection model to process the extracted text, and segmenting a series of semantically coherent structured text blocks;

[0100] Indexing and storing the structured text blocks, as well as the parsed table data and directory structure metadata, into a vector database and search engine;

[0101] Identifying entities and their relationships in the public rental housing field from the structured text blocks through an entity recognition and relationship extraction model, and updating the newly identified entities and relationships to the knowledge graph database in an incremental manner.

[0102] Specifically, before processing the user query request in real time, the intelligent question answering system also performs a comprehensive, offline knowledge base preprocessing process, which is used to convert raw, mixed unstructured documents into high-quality, multi-modal and structured knowledge assets to support subsequent intelligent question answering services. The detailed implementation details of this process are as follows:

[0103] First, the processing unit receives an input unstructured document, such as a PDF file of public rental housing policy or a user-uploaded contract scan, and initiates a multi-modal parsing module. If the input document is determined to be a scan, the module first calls a series of image enhancement algorithms to perform denoising, sharpening, and skew correction, etc. to improve the image quality. Subsequently, an optimized optical character recognition engine is called to extract the pure text content from the enhanced image. Meanwhile, a specialized layout analysis tool is running in parallel, which can accurately identify and parse the embedded table data in the document, such as the rent subsidy calculation table, and the multi-level directory structure of the document, achieving the synchronous capture of text content and document structure information.

[0104] Next, the processing unit transfers the parsed pure text content to a dynamic chunking module in the embodiment of the invention. The module is equipped with a dynamic chunking algorithm based on a combination of sliding window and semantic breakpoint detection model. The algorithm moves in a fixed-size sliding window with a preset step size and uses a deep learning model to predict the probability of the window boundary as a text segmentation point in real time. When the probability is higher than the preset threshold, text segmentation is performed at this point. In particular, if a pre-defined keyword appears near the window boundary, marking the beginning or end of a legal clause, the algorithm will trigger a dynamic adjustment strategy to automatically expand the window boundary to the position where the legal clause ends before performing segmentation. In this way, the algorithm ensures that the final output is a series of structured text blocks that are semantically coherent and logically complete.

[0105] Subsequently, the processing unit performs indexing and storage operations. It processes each structured text block generated in the previous step along with the associated table data and directory structure metadata initially parsed as a whole. Part of it calls an advanced vector embedding model to convert each text block into a high-dimensional numerical vector and stores this vector in a specialized vector database. Another part extracts the core keywords of each text block and stores them along with their metadata in the index library of a high-performance search engine.

[0106] Finally, a knowledge graph incremental updating module will be activated at the same time of data warehousing. Inside this module, an entity recognition and relation extraction model fine-tuned on public rental housing domain corpus is deployed. This model will deeply analyze each structured text block, identify the core entities in the domain, such as "applicant qualification", "rent standard", "priority allocation group", and the semantic relationships between them, such as "priority allocation group" enjoys "rent reduction". Once new entities or relationships are identified, the module will add and update these knowledge represented in the form of triples to a global public rental housing domain knowledge graph database based on graph database.

[0107] In an embodiment of the present application, the step of applying a dynamic chunking algorithm based on a combination of sliding window and semantic breakpoint detection model to process the extracted text comprises:

[0108] Moving a fixed-size sliding window on the extracted text with a preset step size;

[0109] At each boundary position of the sliding window, using a semantic breakpoint detection model to predict the probability of the current boundary position as a text segmentation point;

[0110] When the probability is higher than a preset threshold, text segmentation is performed at the current boundary position;

[0111] When the boundary position contains predefined legal clause keywords, the boundary of the sliding window is automatically dynamically expanded to the position where the legal clause ends completely before performing text segmentation.

[0112] Specifically, when the processing unit receives the pure text extracted from the unstructured document, it calls a dynamic chunking algorithm to process it to ensure that the segmented text blocks have high semantic coherence. First, the processing unit initializes a sliding window on the pure text to be processed. The window has a fixed size, for example, five hundred and twelve text units, which is carefully designed to fit the optimal input length of the subsequent large language model. At the same time, a small moving step size is set, for example, one hundred and twenty-eight text units, to ensure that there is enough overlap between adjacent windows during window sliding, thereby avoiding information loss at the segmentation boundary. The processing unit then moves this fixed-size sliding window backward from the start of the text according to the preset step size.

[0113] Then, after each movement of the sliding window, the processing unit focuses on the ending boundary position of the window. It inputs this boundary position and a piece of context text around it as a judgment sample into a pre-trained semantic breakpoint detection model. The model is a deep neural network whose architecture integrates transformer network layers that can capture deep context information and long short-term memory network layers that can handle sequence dependencies. The model, which has been trained on a large amount of labeled text, can accurately analyze the context semantics of the current boundary position and output a continuous value between zero and one, which is the probability that the model predicts the current boundary position as an ideal text segmentation point.

[0114] Subsequently, the processing unit receives the probability value output by the model and compares it with a pre-set judgment threshold, for example, 0.85. If the probability value predicted by the model is higher than the threshold, the processing unit determines that the ending boundary position of the current window is a semantically appropriate segmentation point, and then performs text segmentation at this position to generate an independent, semantically coherent structured text block. If the probability value is not higher than the threshold, no segmentation is performed and the sliding window continues to move backward by the step size.

[0115] In addition, in order to deal with the special structure of legal or policy texts, the dynamic segmentation algorithm also integrates a special rule processing mechanism. While making the probability judgment, the processing unit also searches whether there is a pre-defined keyword dictionary containing specific legal clause guide language near the window boundary position, such as containing the words "but the following cases are not accepted" or "the applicant must meet the following conditions". Once such keywords are detected, the mechanism is triggered, which automatically and forcibly expands the boundary of the current sliding window backward, across all subsequent related clauses or list items, until the explicit punctuation mark that marks the end of the complete legal structure is found. After the expansion is completed, the processing unit performs text segmentation at this new boundary position that ensures the integrity of the legal provisions, without relying on the probability prediction of the model. In this way, it is ensured that the final output is a series of semantically coherent and logically complete structured text blocks.

[0116] Further, in an embodiment of the present application, the step of indexing the structured text blocks and the parsed table data and directory structure metadata together and storing them in the vector database and the search engine comprises:

[0117] converting the structured text blocks into a high-dimensional vector through a vector embedding model and storing them in the vector database;

[0118] extracting the keywords of the structured text blocks and storing the keywords and the parsed table data and directory structure metadata in the search engine.

[0119] Specifically, when the processing unit generates a series of semantically coherent structured text blocks through the dynamic chunking algorithm, a double-track parallel indexing process is immediately started to efficiently store these text blocks and their associated metadata into two different types of databases to support subsequent diversified retrieval requirements. The specific implementation details of this process are as follows:

[0120] The processing unit sequentially transmits each independent structured text block to a vectorization processing module. This module is equipped with an advanced, large-scale pre-trained text vector embedding model. This model receives the text block as input and, through its deep neural network structure, compresses and maps the rich semantic information contained in the text into a fixed-dimensional high-dimensional mathematical vector, such as an array of 768 floating-point numbers. The position of this generated high-dimensional vector in the mathematical space accurately represents the core semantics of the original text block. The processing unit then stores this high-dimensional vector, along with an identity code for uniquely identifying the text block, into a vector database specially designed for efficient processing of vector data.

[0121] At the same time, the processing unit sends the same structured text block into a keyword and metadata processing module in parallel. This module first applies natural language processing algorithms, such as term frequency-inverse document frequency algorithm or keyword extraction techniques based on part-of-speech tagging, to automatically identify and extract a set of keywords that can represent the core content of the text block from the text block. Then, the module retrieves the table data and directory structure metadata associated with the current text block obtained in the initial parsing stage, such as the original document name, chapter title, clause number, etc. Finally, the processing unit stores the extracted keywords, associated table data, and all directory structure metadata as a unified document record containing multiple fields into the index library of a high-performance search engine. In this way, the search engine can not only perform full-text retrieval based on keywords, but also perform precise and weighted queries on specific metadata fields such as titles and clause numbers.

[0122] Step S20, according to the structured action framework, adaptively selecting and executing at least one retrieval path to retrieve information from at least one heterogeneous data source including a vector database, a search engine, and a knowledge graph database in parallel, and integrating the recalled source information into an evidence chain that can be verified;

[0123] In one embodiment of the present application, when the processing unit successfully generates a structured action framework containing user query intent, key parameters, and preset retrieval strategy, a highly coordinated parallel retrieval and information integration process is immediately started to efficiently collect relevant information from multiple heterogeneous data sources and construct a logically clear and verifiable evidence chain.

[0124] In one embodiment of the present application, the step of adaptively selecting and executing at least one search path from the heterogeneous data sources including vector databases, search engines and knowledge graph databases in parallel to retrieve information according to the structured action framework comprises:

[0125] parsing the structured action framework and dynamically and differentially constructing a specific query request for each activated heterogeneous data source;

[0126] distributing the specific query requests to the corresponding heterogeneous data sources in parallel to perform retrieval;

[0127] collecting the retrieval results from each heterogeneous data source respectively and performing normalization processing to form a unified result set containing content, source and original score.

[0128] Specifically, the processing unit deeply parses the structured action framework to obtain the query intent, key parameters and preset retrieval strategy encapsulated therein. Based on these information, the processing unit dynamically and differentially constructs a specific query request for each activated heterogeneous data source according to the current strategy. Specifically, if the strategy indicates that the vector database needs to be queried, the processing unit converts the user's original natural language query request or its core content into a high-dimensional vector representation through a vector embedding model to form a vector query; if the strategy indicates that the search engine needs to be queried, the processing unit combines the key parameters in the action framework into a structured query object, which also contains specific instructions for weight promotion of the target field (such as document title) specified by the strategy; if the strategy indicates that the knowledge graph database needs to be queried, the processing unit links the entities in the key parameters to the nodes in the graph and automatically generates a graph query statement conforming to the graph database query language syntax and directly executable according to the relationship path defined in the strategy.

[0129] Then, the processing unit starts a concurrent execution controller. The controller uses an asynchronous input-output framework or a multi-threaded task pool to distribute the vector query, structured query object and graph query statement tailored for different data sources in the previous step to their respective corresponding heterogeneous data sources at the same time point to perform retrieval operation. That is, the queries to the vector database, search engine and knowledge graph database are initiated simultaneously rather than sequentially, thereby greatly shortening the overall retrieval time.

[0130] Finally, after dispatching the query requests, the concurrent execution controller listens to the responses from each of the heterogeneous data sources separately and asynchronously. As soon as a data source finishes the retrieval and returns the result, the controller receives and processes the result immediately. It performs a normalization process on the collected retrieval results from different data sources in their original formats. This process converts the results from different sources (e.g., vector similarity scores, search engine relevance scores, path information returned by graph query) into a standard data structure that clearly contains the original content, source identification, and unweighted original scores. Through this step, all the recalled information is integrated into a unified result set in a uniform format that is easy to process subsequently.

[0131] Further, in an embodiment of the present application, the step of parsing the structured action framework and dynamically constructing a specific query request for each activated heterogeneous data source includes:

[0132] Parsing the structured action framework to obtain the contained query intent, key parameters, and preset retrieval strategy;

[0133] For a vector database, converting the natural language query request or the extracted core content into a high-dimensional vector representation as a vector query;

[0134] For a search engine, combining the key parameters into a structured query object containing instructions for weight lifting on the target fields specified by the preset retrieval strategy;

[0135] For a knowledge graph database, linking the entities in the key parameters to the graph nodes and generating an executable graph query statement according to the relationship path defined in the query intent and the preset retrieval strategy.

[0136] Specifically, the processing unit parses the structured action framework in depth to obtain the query intent, one or more key parameters, and the preset retrieval strategy encapsulated therein. These information collectively constitute the guidance for all subsequent query construction operations.

[0137] Then, the processing unit performs differential query construction operations for different data sources according to the instructions of the preset retrieval strategy. Specifically, for a vector database, the processing unit inputs the user's original natural language query request or the core content extracted from the request through natural language processing technology into an advanced text vector embedding model. The model converts it into a high-dimensional vector representation that can accurately capture semantic information. This generated high-dimensional vector itself is used as a vector query for the vector database to find the most semantically similar text blocks in the vector space.

[0138] Meanwhile, for the search engine, the processing unit combines the key parameters extracted from the structured action framework, such as the identified entity words or core vocabulary, to construct a structured query object. This object not only contains the keywords to be queried, but more importantly, it contains one or more instructions for weight promotion of specific target fields according to the detailed definition in the preset retrieval strategy. For example, the strategy may indicate that the matching weight of the document "title" field should be set to twice that of the text content when querying, so as to ensure that the query result is more inclined to documents containing keywords in the title.

[0139] In addition, for the knowledge graph database, the processing unit performs a more detailed construction process. It first searches for the key parameters in the structured action framework, especially those words identified as entities, in the knowledge graph to link and lock to their corresponding entity nodes. Then, the processing unit automatically generates a directly executable graph query statement by combining the current query intent and the relationship path defined in the preset retrieval strategy, where the path describes the types and directions of edges that need to be traversed between entity nodes. This statement strictly follows the query language syntax of the graph database (such as Cypher) and can accurately perform multi-hop queries in the graph to reveal deep associations between entities.

[0140] Specifically, in one embodiment of the present application, the step of generating an executable graph query statement includes:

[0141] Identify the words in the key parameters that represent core entities and find and lock the corresponding entity nodes in the knowledge graph database;

[0142] According to the query intent, extract one or more predefined target relationship paths from the preset retrieval strategy, where the target relationship path defines the types and directions of edges that need to be traversed between entity nodes;

[0143] Combine the locked entity nodes with the target relationship path to generate an executable graph query statement, which is a complete query string that conforms to the graph database query language syntax.

[0144] Specifically, when a query needs to be performed on the knowledge graph database, the processing unit executes a refined automated process to dynamically generate an accurate, efficient and directly executable graph query statement. The specific implementation details are as follows: first, the processing unit identifies the key parameters of the structured action framework, those words marked as core entities in the named entity recognition stage. For example, in the query "whether the spouse of Zhang San has applied for public rental housing", "Zhang San" and "spouse" will be identified as core entities. Then, the processing unit uses these entity words to perform an accurate search operation in the knowledge graph database, and locks specific entity nodes that are semantically completely corresponding to these words through indexing or fuzzy matching.

[0145] Next, the processing unit searches in the preset retrieval strategy according to the query intent contained in the current structured action framework to extract one or more target relationship paths that are closely related to the intent and are predefined. These target relationship paths are not simple keywords, but a structured template that clearly defines the types and directions of edges that need to be traversed between entity nodes in the graph. For example, for the intent of "querying the application status of family members", the corresponding target relationship path can be defined as starting from an "applicant" node and reaching another "family member" node along the "family relationship" type edge.

[0146] Finally, the processing unit performs a combination and generation operation. It logically combines the entity nodes locked in the first step (such as the node representing "Zhang San") with the target relationship paths extracted in the second step (such as the path template describing the relationship between family members). Through this combination, the processing unit can automatically and programmatically construct an executable graph query statement. The final generated graph query statement is a complete query string that fully complies with the query language syntax required by the target graph database (such as the Cypher query language), which can be directly sent to the knowledge graph database for execution without any manual intervention or secondary conversion.

[0147] Further, in an embodiment of the present application, the step of integrating the recalled source information into a piece of evidence chain for verification includes:

[0148] According to the preset retrieval strategy in the structured action framework, a set of weight coefficients is dynamically assigned to the information recalled from the heterogeneous data sources;

[0149] Based on the dynamically assigned weight coefficients, all recalled information is weighted and summed to calculate a unified relevance score;

[0150] According to the unified relevance score, all recalled information is reordered, and a preset number of information with high ranking is selected to form an evidence chain for verification.

[0151] Specifically, when the processing unit collects the uniform result set from each heterogeneous data source, a rigorous integration and sorting process is immediately started to fuse these scattered information into a logically clear and highly authoritative evidence chain that can be verified. The specific implementation details of this process are as follows:

[0152] First, the processing unit refers to the structured action framework of the current task, especially the preset retrieval strategy contained therein. According to the detailed definition of the strategy for the current query intent, it dynamically assigns a set of corresponding weight coefficients to the information recalled from the vector database, search engine, and knowledge graph database. For example, for a "relation reasoning" intent, the preset strategy may assign a higher weight coefficient (such as 0.7) to the information recalled from the knowledge graph database, and lower weight coefficients (such as 0.15 each) to the information recalled from the vector database and search engine, to reflect the importance difference of different information sources in processing this specific intent.

[0153] Next, the processing unit traverses each piece of recalled information in the uniform result set. Based on the weight coefficients dynamically assigned in the previous step, it performs a weighted summation calculation on all recalled information. Specifically, for each piece of information, the processing unit multiplies its own original score (such as vector similarity or search engine relevance score) by the weight coefficient of its source, and then aggregates or normalizes the weighted scores of all information to calculate a global uniform relevance score for each piece of information that can comprehensively reflect its semantic relevance and source authority.

[0154] Finally, the processing unit performs a final and comprehensive descending reordering of all recalled information in the uniform result set according to the calculated uniform relevance score. After sorting, the processing unit will strictly follow this new order to select a preset number of information entries (for example, the top five information) with the highest scores. This carefully selected and authority-ordered, limited number of information set, which is formally constructed as the verifiable evidence chain described in the embodiments of the invention, will serve as the only and authoritative context basis for the next step of constraining the large language model to generate answers.

[0155] Step S30, based on the evidence chain to constrain the generation process of the large language model to generate a preliminary answer, and call the preset rule engine to verify the policy compliance of the preliminary answer, and output a final answer with traceable source annotation after verification;

[0156] In one embodiment of the present application, the step of generating a preliminary answer based on the evidence chain to constrain the generation process of the large language model comprises:

[0157] assemble the pieces of information in the evidence chain, the user's natural language query request, and a set of preset instruction templates into a structured prompt, wherein the instruction templates include constraint instructions indicating that the large language model must strictly answer according to the information provided in the evidence chain, fallback instructions indicating that the model should explicitly declare insufficient information when the evidence chain cannot support the answer, and traceability instructions requiring specific information sources to be cited when generating the answer;

[0158] send the structured prompt to the large language model to generate a preliminary answer that follows the instruction templates.

[0159] Specifically, when the processing unit successfully constructs a verifiable evidence chain, a highly structured generation process is immediately started to guide and constrain the large language model to generate an accurate, reliable, and factually accurate preliminary answer. The specific implementation details of this process are as follows:

[0160] First, the processing unit assembles the pieces of information in the evidence chain generated in the previous step, the user's initial natural language query request, and a set of preset instruction templates built into the system into a structured, text-formatted prompt. This set of preset instruction templates is the core of the entire constraint mechanism, written in clear and explicit natural language, and includes at least three types of key instructions: the first type is constraint instructions, which strictly instruct the large language model to answer according to the information provided in the evidence chain, prohibiting the use of any internal knowledge or making unfounded speculations; the second type is fallback instructions, which instruct the model to explicitly declare insufficient information when the information in the evidence chain is insufficient to support the answer to the user's question, rather than attempting to generate ambiguous or incorrect answers; the third type is traceability instructions, which require specific information sources to be clearly cited when generating the answer.

[0161] Next, after completing the assembly of the structured prompt, the processing unit sends this structured prompt, which contains rich context and strict behavior criteria, to a pre-configured interface of a large language model. After receiving the prompt, the large language model parses the instructions, context information, and user questions one by one and strictly thinks and reasons within its framework. Finally, a preliminary answer is generated that strictly follows the requirements of the instruction templates, with the content of the answer limited within the scope of the evidence chain and logically corresponding to the user's query request.

[0162] Further, in one embodiment of the present application, the step of assembling the pieces of information in the evidence chain, the user's natural language query request, and a set of preset instruction templates into a structured prompt includes:

[0163] A dedicated context area is created and each piece of information in the evidence chain and its corresponding source identifier is formatted and filled into the context area;

[0164] A preset instruction template is placed in the initial part of the prompt to set the role and behavior criteria of the large language model;

[0165] After the context area, the user's natural language query request is attached to clarify the task goal generated this time.

[0166] Specifically, the processing unit creates a dedicated text area called "context" in memory. It traverses each piece of information in the evidence chain and organizes these information and their corresponding source identifiers (e.g. specific clause number of a policy document) in a preset, clear format, and then fills them into this context area one by one. This formatting process ensures that the large language model can distinguish between different pieces of information and their sources.

[0167] Then, the processing unit places the preset instruction template containing the constraint, fallback and traceability instructions as a whole in the initial part of the entire structured prompt. The arrangement of this position ensures that the large language model first receives and understands the role positioning and behavior criteria it must follow for this task before processing any specific content.

[0168] Finally, after filling in the context area, the processing unit attaches the user's initial natural language query request to the context area without changing it. By placing the user's question after all background information, the processing unit clarifies the final task goal generated this time for the large language model, which is to answer this specific question after fully understanding all given rules and information.

[0169] Further, in an embodiment of the present application, the step of calling the preset rule engine to perform policy compliance verification on the preliminary answer includes:

[0170] Automatically extracting policy boundary conditions from the knowledge graph database to form a structured rule set;

[0171] Precompiling the structured rule set into an executable rule instruction model deployed on the neural network processing unit;

[0172] When the large language model generates a preliminary answer, the rule instruction model is loaded in real time, and the answer content is verified to determine whether the answer content violates the policy boundary conditions.

[0173] Specifically, after the large language model generates the preliminary answer, to ensure the absolute compliance of the output content, the processing unit immediately starts a strict policy compliance verification process based on hardware acceleration. This process is independent of the probabilistic generation of the large language model and provides a deterministic verification mechanism. The specific implementation details are as follows:

[0174] First, in an offline preprocessing phase, the processing unit systematically queries the knowledge graph database. It executes specific graph query commands to traverse all nodes and relationships related to policy provisions in the graph, thereby automatically extracting all explicit and quantifiable policy boundary conditions. These boundary conditions are, for example, "the applicant's monthly income must be less than or equal to 5,000 yuan" or "the per capita housing area of the applicant's family must not exceed 15 square meters." These extracted conditions are then organized and formed into a structured, machine-readable rule set, where each rule clearly defines an unbreachable policy red line.

[0175] Next, the processing unit inputs this structured rule set into a dedicated compilation tool chain. This tool chain can pre-compile these logical rules into a highly optimized binary format that can run directly on a neural network processing unit (NPU), i.e., an executable rule instruction model. This compilation process converts high-level logical judgments into low-level hardware instructions that can take advantage of the massive parallel computing capabilities of the neural network processing unit, thereby providing a high-performance foundation for subsequent real-time verification. This compiled model is stored for real-time invocation.

[0176] Finally, in the real-time question and answer process, when the large language model generates the preliminary answer, the processing unit sends the text content of the preliminary answer along with relevant numerical values extracted from the user query or context (such as the user's self-reported income) to the inference server that deploys the neural network processing unit. The server loads the pre-compiled rule instruction model in real time and performs high-speed, parallel matching and calculation between the key information in the preliminary answer and the rules contained in the model. In this way, the processing unit can instantly verify the content of the preliminary answer to accurately determine whether the answer content conflicts with or violates any policy boundary condition. If any violation is detected, the preliminary answer will be immediately intercepted or marked as non-compliant.

[0177] Further, in an embodiment of the present application, the step of outputting a final answer with a traceable source annotation includes:

[0178] Extracting metadata from the evidence chain that originates from each heterogeneous data source;

[0179] Dynamic filling of metadata into a standardized traceable information format through a preset template engine;

[0180] The generated traceability information is attached to the answer that passes the policy compliance check, forming a final answer and outputting.

[0181] Specifically, when the preliminary answer successfully passes the policy compliance check, to ensure that the information output to the user is both accurate and authoritative, the processing unit performs a standardized information packaging and traceability labeling process. This process is used to provide clear and verifiable source evidence for each answer. The specific implementation details are as follows:

[0182] First, the processing unit traces back to the verifiable evidence chain constructed in this question and answer interaction. It carefully traverses each piece of information in the evidence chain and extracts the metadata associated with the content itself, respectively from the vector database, search engine and knowledge graph database. These metadata contain the original source information of the information, for example, for information from a search engine, the metadata may include the name of the original document, the chapter title and the specific clause number; for information from the knowledge graph, the metadata may describe a specific business relationship fact.

[0183] Next, the processing unit passes all the metadata extracted in the previous step as a data set to a preset template engine. The template engine defines one or more standardized traceability information formats inside, such as a format of "

According to 《[document name]》 Chapter [section] Article

[0184] Finally, after generating the formatted traceability information, the processing unit performs the final assembly and output operation. It attaches the generated traceability information as an independent text part to the answer text that has just passed the policy compliance check. In this way, a complete final answer composed of two parts (answer content and source annotation) is formed. The processing unit then outputs this final answer containing clear and traceable sources to the user through the user interface, thereby completing the entire intelligent question and answer closed-loop process.

[0185] Further, in an embodiment of the present application, the step of dynamically filling the metadata into the standardized traceability information format through the preset template engine includes the following steps before the step:

[0186] Personal sensitive information contained in the preliminary answer and the metadata is identified by regular matching and conditional random field model;

[0187] The identified personal sensitive information is dynamically desensitized by using format-preserving encryption technology.

[0188] Specifically, to strictly protect user privacy and comply with data security regulations, the processing unit enforces a multi-level privacy information protection process before calling the template engine to generate the final traceability information. This process is used to identify and desensitize all potentially involved personal sensitive data before the information is output. The specific implementation details are as follows:

[0189] First, the processing unit scans both parts of the data: one part is the preliminary answer text that has passed the compliance check, and the other part is the metadata set that will be used to generate the traceability information. It starts a hybrid identification model that combines regular matching and conditional random field technology. The processing unit uses a pre-built regular expression library containing common sensitive information format rules such as ID numbers, mobile phone numbers, and bank card numbers to perform fast and efficient pattern matching on the text to preliminarily filter out highly suspected sensitive information strings. Then, for potential sensitive information that regular matching cannot cover or requires deeper semantic understanding to determine (such as personal names, detailed addresses, etc.), the processing unit calls a conditional random field (CRF) model. This model has been fully trained on a large-scale corpus annotated with various sensitive entity types and can accurately identify various personal sensitive information and their specific boundaries contained in the preliminary answer and metadata by combining the context. Through this combination of regular matching and conditional random field model, high recall and high accuracy of personal sensitive information identification can be achieved.

[0190] After completing the accurate identification of all sensitive information, the processing unit immediately starts the dynamic desensitization processing module. For each identified sensitive information string, the module uses an advanced format-preserving encryption (FPE) technique to process it. This technique can encrypt the original data while maintaining its original data format, length, and character type unchanged. For example, a complete ID number will be converted into a string of the same format but with encrypted content after processing, or processed into a common desensitization format that only preserves the first and last part of the number and replaces the middle part with asterisks (such as "three one zero... five six seven eight"). In this way, without destroying the overall structure and readability of the data, all identified personal sensitive information is effectively desensitized and irreversible, ensuring that the final output to the user does not contain any original private data.

[0191] Further, in an embodiment of the present application, the step of outputting a final answer with a traceable source annotation further includes:

[0192] An audit log containing timestamp, user identification, query request, evidence chain and final answer is calculated for its hash value by a hardware-accelerated hash algorithm;

[0193] The hash value is recorded on a distributed ledger to achieve tamper-proof evidence of operation.

[0194] Specifically, to meet the security compliance and traceability requirements in the field of government services, after successfully outputting the final answer to the user, the processing unit immediately starts an automated, blockchain technology-based security audit and tamper-proof evidence process. This process is used to create a digital fingerprint for each intelligent question and answer interaction behavior that is undeniable and can be independently verified. The specific implementation details are as follows:

[0195] First, the processing unit aggregates all the key data in the whole process of this interaction to generate a detailed audit log. This log is structured as a structured data record, which at least contains the following core fields: a timestamp accurate to milliseconds, recording the exact time of interaction; a user identification that can uniquely identify the current user; the full text of the original query request input by the user; the complete evidence chain generated in the integration link as the basis for response; and the final answer containing the answer content and traceability annotation output to the user.

[0196] Next, the processing unit transfers this structured audit log as a whole data block to a special cryptographic calculation module. The module will call a national cryptography management department approved hash algorithm (such as SM3 algorithm) that supports hardware acceleration to calculate the content of the audit log once. This calculation process converts the content of the log, no matter how long, into a fixed-length, unique digest string, i.e. hash value. Due to the support of hardware acceleration, this calculation process is extremely fast, and due to the avalanche effect of the hash algorithm, any small change in the log content will cause the final generated hash value to change dramatically.

[0197] Finally, after successfully calculating the hash value representing the unique identity of this interaction, the processing unit submits it as core data of a transaction to a pre-deployed distributed ledger network (such as a consortium blockchain built on Hyperledger Fabric). After consensus verification by multiple nodes in the network, this transaction is permanently and chronologically packaged into a new block and linked to the previous block. In this way, the processing unit records this unique hash value on the distributed ledger. Due to the decentralized, data redundant, and chain-like structure of the distributed ledger, once the hash value is recorded on the chain, no one can tamper with or delete it without detection, thus achieving the highest level of tamper-proof evidence preservation for this intelligent question-and-answer operation, which can be independently audited and verified.

[0198] In summary, the public rental housing intelligent question and answer method in the above embodiments of the present application realizes accurate, efficient and safe intelligent response to complex business scenarios in the public rental housing field by constructing a closed-loop processing flow from intent understanding, multi-dimensional mixed retrieval to reliable generation control; through the application of a dynamic blocking algorithm combining a sliding window and a semantic breakpoint detection model, the semantic integrity of policy provisions in the preprocessing stage is ensured, the intelligent and lossless analysis of unstructured documents is realized, and a high-quality and logically coherent data basis is provided for subsequent accurate retrieval and content generation, thereby significantly improving the accuracy of the entire question and answer system from the source; by constructing a heterogeneous data source system including a vector database, a search engine and a knowledge graph database, and adaptively selecting and executing parallel retrieval according to the structured action framework, the organic combination of semantic understanding, keyword accurate matching and complex business relationship reasoning ability is realized, thereby fundamentally solving the contradiction between the user's vague intention and the accuracy of the policy provisions that cannot be considered by a single retrieval mode, greatly improving the information recall rate and relevance in complex query scenarios; by dynamically assigning weights according to the query intention after retrieval and fusing and sorting the recalled information, the intelligent and adaptive adjustment of the retrieval strategy is realized, ensuring that the system can focus on the most critical information dimension according to different business scenarios, thereby solving the limitations of static or single weight strategy that cannot meet the diverse user needs, significantly enhancing the relevance of the question and answer and user satisfaction; by generating answers based on the retrieved evidence chain and using structured prompts containing constraint instructions to guide the large language model, the factual constraints on the generated content are realized, fundamentally solving the inherent "illusion" problem of the large language model, ensuring the fidelity and accuracy of the answers, and effectively eliminating the risk of misleading policy information caused by the model's fabrication; by calling a pre-compiled rule engine driven by the knowledge graph for policy compliance verification before the answer output, an independent and objective "hard" verification checkpoint for the generated content is realized, ensuring that the final answer strictly follows the boundary conditions of the public rental housing policy, thereby solving the compliance loopholes that may be caused by relying solely on the judgment of the large language model, and providing strong technical support for the rigor and authority of government service; by attaching a self-generated traceable source label containing multi-source metadata to the final answer, the transparency and verifiability of the question and answer result are realized, solving the "black box" operation and unknown answer source problem of traditional question and answer systems, greatly improving the user's trust in intelligent customer service; by integrating dynamic desensitization and blockchain-based audit evidence mechanism in the entire interaction process, the full-link protection of personal privacy data and the non-tamperable traceability of the operation process are realized, thereby solving the security and compliance risks in handling sensitive information in the public rental housing business, ensuring the safe and reliable operation of the system under the requirements of laws and regulations. The problems existing in the prior art when dealing with complex, dynamic and highly compliant business scenarios in the field of public rental housing are solved.

[0199] Embodiment Two

[0200] Referring to Figure 2 is a structural schematic diagram of a public rental housing intelligent question and answer system provided by a second embodiment of the present application. For ease of illustration, only parts related to the embodiments of the present application are shown. The system includes:

[0201] An action framework generation module 11 is configured to receive a natural language query request input by a user, identify at least one query intent and corresponding key parameters by parsing the natural language query request, and generate a structured action framework including the query intent, key parameters, and a preset retrieval strategy.

[0202] An evidence chain integration module 12 is configured to adaptively select and execute at least one retrieval path according to the structured action framework, retrieve information in parallel from heterogeneous data sources including at least a vector database, a search engine, and a knowledge graph database, and integrate the recalled source information into an evidence chain that can be verified.

[0203] An answer generation module 13 is configured to constrain the generation process of a large language model based on the evidence chain to generate a preliminary answer, and call a preset rule engine to perform policy compliance verification on the preliminary answer. After the verification is passed, a final answer with traceable source annotation is output.

[0204] Further, in an embodiment of the present application, the action framework generation module 11 includes:

[0205] A query intent identification unit is configured to input the natural language query request into a pre-trained intent classification model to identify the query intent corresponding to the natural language query request from a set of predefined intent categories.

[0206] A key parameter extraction unit is configured to process the natural language query request using a named entity recognition model to extract one or more entities and their corresponding entity types as the key parameters.

[0207] A preset retrieval strategy matching unit is configured to use the identified query intent as a query key to retrieve and match a corresponding preset retrieval strategy in a preset strategy library.

[0208] A structured action framework generation unit is configured to encapsulate the identified query intent, the extracted one or more key parameters, and the matched preset retrieval strategy into a machine-readable data object, thereby generating the structured action framework.

[0209] Further, in an embodiment of the present application, the evidence chain integration module 12 comprises:

[0210] a query request construction unit configured to parse the structured action framework and dynamically and differentially construct a specific query request for each activated heterogeneous data source;

[0211] a retrieval unit configured to distribute the specific query requests to the corresponding heterogeneous data sources in parallel to perform retrieval;

[0212] a retrieval result generation unit configured to collect the retrieval results from the heterogeneous data sources respectively and perform normalization processing to form a unified result set containing content, source and original score.

[0213] Further, in an embodiment of the present application, the query request construction unit comprises:

[0214] a parsing subunit configured to parse the structured action framework to obtain the contained query intent, key parameters and preset retrieval strategy;

[0215] a vector query determination subunit configured to convert the natural language query request or the extracted core content into a high-dimensional vector representation as a vector query for the vector database;

[0216] a structured query object determination subunit configured to combine the key parameters into a structured query object containing instructions for weight promotion of target fields specified by the preset retrieval strategy for the search engine;

[0217] a graph query statement determination subunit configured to link entities in the key parameters to graph nodes for the knowledge graph database and generate an executable graph query statement according to the relationship path defined by the query intent and the preset retrieval strategy.

[0218] Further, in an embodiment of the present application, the graph query statement determination subunit is configured to:

[0219] identify words representing core entities in the key parameters and find and lock corresponding entity nodes in the knowledge graph database;

[0220] extract one or more predefined target relationship paths from the preset retrieval strategy according to the query intent, the target relationship paths defining the types and directions of edges between entity nodes that need to be traversed;

[0221] combining the locked entity nodes with the target relationship path to generate an executable graph query statement, which is a complete query string conforming to the syntax of a graph database query language.

[0222] Further, in an embodiment of the present application, the evidence chain integration module 12 comprises:

[0223] a weight distribution unit configured to dynamically distribute a set of weight coefficients to the information recalled from each heterogeneous data source according to a preset retrieval strategy in the structured action framework;

[0224] a weighting unit configured to perform weighted summation on all recalled information based on the dynamically distributed weight coefficients to calculate a unified relevance score;

[0225] an evidence chain construction unit configured to reorder all recalled information according to the unified relevance score and select a preset number of information with high ranking to form the verifiable evidence chain.

[0226] Further, in an embodiment of the present application, the answer generation module 13 comprises:

[0227] a prompt generation unit configured to assemble each piece of information in the evidence chain, the user's natural language query request, and a set of preset instruction templates into a structured prompt, wherein the instruction templates include constraint instructions indicating that the large language model strictly answers according to the information provided in the evidence chain, fallback instructions indicating that it should be explicitly stated that the information is insufficient when the evidence chain cannot support the answer, and traceability instructions requiring specific information sources to be cited when generating an answer;

[0228] a preliminary answer generation unit configured to send the structured prompt to the large language model to generate a preliminary answer following the instruction templates.

[0229] Further, in an embodiment of the present application, the prompt generation unit is configured to:

[0230] create a dedicated context area and fill in each piece of information in the evidence chain and its corresponding source identification after formatting;

[0231] insert the preset instruction templates in the starting part of the prompt to set the role and behavior criteria of the large language model;

[0232] append the user's natural language query request after the context area to clearly define the task objective of this generation;

[0233] Further, in an embodiment of the present application, the answer generation module 13 comprises:

[0234] a rule set construction unit configured to automatically extract policy boundary conditions from the knowledge graph database to form a structured rule set;

[0235] a rule set pre-compilation unit configured to pre-compile the structured rule set into an executable rule instruction model deployed on a neural network processing unit;

[0236] a rule verification unit configured to load the rule instruction model in real time when the large language model generates a preliminary answer, and verify the answer content to determine whether the answer content violates the policy boundary conditions.

[0237] Further, in an embodiment of the present application, the answer generation module 13 comprises:

[0238] a metadata extraction unit configured to extract metadata respectively from each heterogeneous data source in the evidence chain;

[0239] a metadata filling unit configured to dynamically fill the metadata into a standardized traceability information format through a pre-set template engine;

[0240] a final answer generation unit configured to append the generated traceability information to the answer that passes the policy compliance verification to form a final answer and output.

[0241] Further, in an embodiment of the present application, the metadata filling unit further comprises:

[0242] a sensitive information identification sub-unit configured to identify personal sensitive information contained in the preliminary answer and the metadata through regular matching and a conditional random field model;

[0243] an information desensitization sub-unit configured to dynamically desensitize the identified personal sensitive information using a format-preserving encryption technology.

[0244] Further, in an embodiment of the present application, the answer generation module 13 further comprises:

[0245] a hash value calculation unit configured to calculate a hash value of an audit log containing a timestamp, a user identifier, a query request, an evidence chain, and a final answer through a hardware-accelerated hash algorithm;

[0246] a distributed recording unit configured to record the hash value on a distributed ledger to achieve tamper-proof evidence of operation.

[0247] Further, in an embodiment of the present application, the action framework generation module 11 further comprises:

[0248] The document analysis unit is configured to perform multi-modal analysis on the input unstructured document to extract corresponding text, table data and directory structure;

[0249] The text segmentation unit is configured to apply a dynamic segmentation algorithm based on a combination of a sliding window and a semantic breakpoint detection model to process the extracted text to segment a series of semantically coherent structured text blocks;

[0250] The data storage unit is configured to index and store the structured text blocks, the parsed table data and directory structure metadata in the vector database and the search engine;

[0251] The data updating unit is configured to identify entities and their relationships in the public rental housing field from the structured text blocks by using an entity recognition and relationship extraction model, and update the newly identified entities and relationships to the knowledge graph database in an incremental manner.

[0252] Further, in an embodiment of the present application, the text segmentation unit comprises:

[0253] The moving subunit is configured to move a fixed-size sliding window on the extracted text by a preset step size;

[0254] The prediction subunit is configured to use a semantic breakpoint detection model to predict the probability of the current boundary position as a text segmentation point at each boundary position of the sliding window;

[0255] The first text segmentation subunit is configured to perform text segmentation at the current boundary position when the probability is higher than a preset threshold;

[0256] The second text segmentation subunit is configured to automatically expand the boundary of the sliding window to the position where the legal clause ends completely and then perform text segmentation when the boundary position contains predefined legal clause keywords.

[0257] Further, in an embodiment of the present application, the data storage unit comprises:

[0258] The vector database storage subunit is configured to convert the structured text blocks into high-dimensional vectors by using a vector embedding model and store them in the vector database;

[0259] The search engine storage subunit is configured to extract keywords from the structured text blocks and store the keywords, the parsed table data and directory structure metadata in the search engine.

[0260] The public rental housing intelligent question-answering system provided by the embodiments of the present application has the same implementation principle, technical effects and the method embodiments described above. For brevity, the part of the device embodiments not mentioned can be referred to the corresponding content in the method embodiments described above.

[0261] Embodiment three

[0262] Another aspect of the present application also provides a computer device, please refer to Figure 3 , which is a computer device in the third embodiment of the present application, comprising a memory 20, a processor 10 and a program 30 stored in the memory 20 and executable on the processor, and the processor 10 implements the public rental housing intelligent question-answering method of the above-mentioned embodiments when executing the program 30.

[0263] In some embodiments, the processor 10 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run the program code stored in the memory 20 or process data, such as executing access restriction programs.

[0264] In some embodiments, the memory 20 can be an internal storage unit of the computer device, such as the hard disk of the computer device. In other embodiments, the memory 20 can also be an external storage device of the computer device, such as a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the memory 200 can include both the internal storage unit and the external storage device of the computer device. The memory 200 can be used to store application software and various data installed on the computer device, and also can be used to temporarily store data that has been output or will be output.

[0265] It should be noted that Figure 3 The structure shown does not constitute a limitation on the computer device, and in other embodiments, the computer device can include fewer or more components than shown, or combine certain components, or different component arrangements.

[0266] The embodiments of the present application also provide a readable storage medium having a program stored thereon, and the program is executed by a processor to implement the public rental housing intelligent question-answering method of the above-mentioned embodiments.

[0267] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units or modules according to needs, that is, the internal structure of the storage device is divided into different functional units or modules to complete all or part of the above described functions. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction, and do not limit the protection scope of the present application.

[0268] Those skilled in the art can understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a list of executable instructions for implementing logical functions, which can be specifically implemented in any storage medium for use by or in conjunction with an instruction execution system, device or equipment, such as a computer-based system, a system including a processor or other system that can fetch and execute instructions from an instruction execution system, device or equipment. For the present specification, "storage medium" can be any device that can contain, store, communicate, propagate or transport programs for use by or in conjunction with an instruction execution system, device or equipment.

[0269] More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires (electrical devices), a portable computer diskette (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the storage medium can even be paper or other suitable medium on which the program can be printed, because the program can be electronically obtained, for example, by optical scanning of the paper or other medium, followed by editing, interpretation or necessary processing, if any, in other suitable manner, and then stored in the memory.

[0270] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the embodiments described above, various steps or methods can be implemented, for example, in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and in another embodiment, any of the following techniques can be used to implement the hardware used to implement the described functions: discrete logic circuitry having logic gates for implementing logic functions upon data signals, application specific integrated circuits having logic gates for implementing the logic functions on data signals, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.

[0271] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in one or more embodiments or examples.

[0272] The above-described embodiments only express several implementation manners of the present application, which are described in a more specific and detailed manner, but should not be understood as a limitation on the scope of the present application. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, which are all within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A smart question-and-answer method for public rental housing, characterized in that, The method includes: The system receives a natural language query request input by a user, parses the natural language query request to identify at least one query intent and corresponding key parameters, and generates a structured action framework that includes the query intent, key parameters and preset retrieval strategies. According to the structured action framework, at least one retrieval path is adaptively selected and executed to retrieve information in parallel from heterogeneous data sources, including at least vector databases, search engines and knowledge graph databases, and the retrieved information from each source is integrated into a verifiable chain of evidence. The generation process of the large language model is constrained by the chain of evidence to generate a preliminary answer, and a preset rule engine is called to verify the policy compliance of the preliminary answer. After the verification is passed, a final answer with traceable source labeling is output.

2. The intelligent question-and-answer method for public rental housing according to claim 1, characterized in that, The step of parsing the natural language query request to identify at least one query intent and corresponding key parameters, and generating a structured action framework containing the query intent, key parameters, and preset retrieval strategies includes: The natural language query request is input into a pre-trained intent classification model to identify the query intent corresponding to the natural language query request from a set of predefined intent categories; The natural language query request is processed using a named entity recognition model to extract one or more entities and their corresponding entity types as key parameters. Using the identified query intent as the query key, the system retrieves and matches the corresponding preset search strategy from a preset strategy library. The identified query intent, one or more extracted key parameters, and the matched preset search strategy are uniformly encapsulated into a machine-readable data object, thereby generating the structured action framework.

3. The intelligent question-and-answer method for public rental housing according to claim 2, characterized in that, The step of adaptively selecting and executing at least one retrieval path according to the structured action framework, and retrieving information in parallel from heterogeneous data sources including at least vector databases, search engines, and knowledge graph databases, includes: The structured action framework is parsed, and a specific query request is dynamically and differentially constructed for each activated heterogeneous data source. Each specific query request is distributed in parallel to its corresponding heterogeneous data source to perform the retrieval; Search results from various heterogeneous data sources are collected separately and normalized to form a unified result set that includes content, source, and original score.

4. The intelligent question-and-answer method for public rental housing according to claim 3, characterized in that, The steps of parsing the structured action framework and dynamically and differentially constructing a specific query request for each activated heterogeneous data source include: The structured action framework is parsed to obtain the included query intent, key parameters, and preset search strategies; For the vector database, the natural language query request or the extracted core content is converted into a high-dimensional vector representation as a vector query; For the search engine, the key parameters are combined into a structured query object, which contains instructions to increase the weight of the target field specified by the preset search strategy. For the knowledge graph database, the entities in the key parameters are linked to graph nodes, and an executable graph query statement is generated according to the query intent and the relationship path defined in the preset retrieval strategy.

5. The intelligent question-and-answer method for public rental housing according to claim 4, characterized in that, The steps for generating an executable graph query statement include: Identify the words representing core entities in the key parameters, and search for and locate the corresponding entity nodes in the knowledge graph database; Based on the query intent, one or more predefined target relationship paths are extracted from the preset retrieval strategy. The target relationship paths define the type and direction of the edges that need to be traversed between entity nodes. The locked entity node is combined with the target relationship path to generate an executable graph query statement, which is a complete query string that conforms to the syntax of a graph database query language.

6. The intelligent question-and-answer method for public rental housing according to claim 1, characterized in that, The step of integrating the recalled source information into a verifiable chain of evidence includes: According to the preset retrieval strategy in the structured action framework, a set of weight coefficients are dynamically assigned to the information retrieved from each heterogeneous data source. A unified relevance score is calculated by weighting all recalled information based on dynamically assigned weight coefficients. All recalled information is reordered based on a unified relevance score, and a preset number of information items at the top of the order are selected to form the verifiable chain of evidence.

7. The intelligent question-and-answer method for public rental housing according to claim 1, characterized in that, The steps in the generation process based on the evidence chain constraint large language model to generate a preliminary answer include: The information in the evidence chain, the user's natural language query request, and a set of preset instruction templates are assembled into a structured prompt. The instruction templates include binding instructions that instruct the large language model to answer strictly according to the information provided in the evidence chain, fallback instructions that should be clearly stated when the evidence chain cannot support the answer, and source tracing instructions that require citing specific information sources when generating the answer. The structured prompts are sent to the large language model to generate a preliminary answer that follows the instruction template.

8. The intelligent question-and-answer method for public rental housing according to claim 7, characterized in that, The step of assembling each piece of information in the evidence chain, the user's natural language query request, and a set of preset instruction templates into a structured prompt includes: Create a dedicated context area, and fill the context area with each piece of information in the chain of evidence and its corresponding source identifier after formatting; The preset instruction template is placed at the beginning of the prompt to set the role and behavior rules of the large language model; The user's natural language query request is appended after the context area to clarify the task objective generated this time.

9. The intelligent question-and-answer method for public rental housing according to claim 1, characterized in that, The step of calling a preset rule engine to verify the policy compliance of the preliminary answer includes: Policy boundary conditions are automatically extracted from the knowledge graph database to form a structured rule set; The structured rule set is pre-compiled into an executable rule instruction model that is deployed on the neural network processing unit; When the large language model generates an initial answer, the rule instruction model is loaded in real time, and the answer content is verified to determine whether the answer content violates the policy boundary conditions.

10. The intelligent question-and-answer method for public rental housing according to claim 1, characterized in that, The step of outputting a final answer with traceable source annotations includes: Extract metadata from the chain of evidence, each originating from a different heterogeneous data source; The metadata is dynamically populated into a standardized traceability information format using a preset template engine; The generated traceability information is appended to the answer that has passed the policy compliance verification to form the final answer and output it.

11. The intelligent question-and-answer method for public rental housing according to claim 10, characterized in that, Before the step of dynamically populating the metadata into the standardized traceability information format using a preset template engine, the method further includes: Using regular matching and conditional random field models, sensitive personal information contained in the preliminary answer and metadata is identified; The identified sensitive personal information is dynamically de-identified using format-preserving encryption technology.

12. The intelligent question-and-answer method for public rental housing according to claim 1, characterized in that, The step of outputting a final answer with traceable source annotations also includes: The audit logs, which contain timestamps, user identifiers, query requests, chains of evidence, and final answers, are hashed using a hardware-accelerated hash algorithm. The hash value is recorded on a distributed ledger to achieve tamper-proof evidence preservation of the operation.

13. The intelligent question-and-answer method for public rental housing according to claim 1, characterized in that, Before the step of identifying at least one query intent and corresponding key parameters by parsing the natural language query request, the method further includes: Perform multimodal parsing on the input unstructured document to extract the corresponding text, tabular data, and directory structure; A dynamic segmentation algorithm based on a sliding window and a semantic breakpoint detection model is applied to process the extracted text and segment it into a series of semantically coherent structured text blocks. The structured text blocks, along with the parsed table data and directory structure metadata, are indexed and stored in the vector database and search engine. The entity recognition and relation extraction model identifies entities and their relationships in the field of public rental housing from the structured text block, and updates the newly identified entities and relationships to the knowledge graph database in an incremental manner.

14. The intelligent question-and-answer method for public rental housing according to claim 13, characterized in that, The steps for processing the extracted text using a dynamic block-segmentation algorithm that combines a sliding window and a semantic breakpoint detection model include: Move a fixed-size sliding window across the extracted text with a preset step size; At each boundary position of the sliding window, the probability of the current boundary position being a text segmentation point is predicted using a semantic breakpoint detection model. When the probability is higher than a preset threshold, text segmentation is performed at the current boundary position; When the boundary position contains predefined legal clause keywords, the boundary of the sliding window is automatically and dynamically extended to the position where the legal clause ends completely before text segmentation is performed.

15. The intelligent question-and-answer method for public rental housing according to claim 13, characterized in that, The step of indexing and storing the structured text blocks, parsed table data, and directory structure metadata together into the vector database and search engine includes: The structured text block is converted into a high-dimensional vector using a vector embedding model and stored in a vector database; Extract keywords from the structured text block, and store the keywords, along with the parsed table data and directory structure metadata, into the search engine.

16. A smart question-and-answer system for public rental housing, characterized in that, The system includes: The action framework generation module is used to receive natural language query requests input by users, parse the natural language query requests to identify at least one query intent and corresponding key parameters, and generate a structured action framework containing the query intent, key parameters and preset retrieval strategies. The evidence chain integration module is used to adaptively select and execute at least one retrieval path according to the structured action framework, retrieve information in parallel from heterogeneous data sources including at least vector databases, search engines and knowledge graph databases, and integrate the retrieved source information into a verifiable evidence chain. The answer generation module is used to generate a preliminary answer based on the generation process of the large language model constrained by the evidence chain, and to call a preset rule engine to perform policy compliance verification on the preliminary answer. After the verification is passed, a final answer with traceable source annotation is output.

17. A computer device, characterized in that, It includes a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the intelligent question-and-answer method for public rental housing as described in any one of claims 1-15.

Citation Information

Cited By

  • Method and system for identifying crime name by fusing rule engine and knowledge graph

    CN121615637A

  • Method and system for identifying charges by fusing a rules engine and a knowledge graph

    CN121615637B

  • Language model retrieval data processing method and device, server and storage medium

    CN122046376A

  • An intelligent retrieval system for high-concurrency credit lease business data

    CN122153085B