Government affair field question and answer method and system based on large model and multi-round guidance and application
Through the question-and-answer method based on big models and multi-round guidance, dynamically manage the context and multi-stage processes in the government affairs field, the problems of semantic confusion and process rigidity in government affairs consultation are solved, and an efficient and accurate government affairs consultation experience is achieved.
Patent Information
- Application Number
- CN202511086100.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-09-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing government affairs field question and answer system based on big models has problems such as static contextual associations, lack of dynamic reconstruction, single process management, and lack of multiple rounds of interaction and active guidance in government affairs consultation, resulting in semantic confusion, rigid process and inaccurate answers.
Using a question-and-answer method based on large models and multiple rounds of guidance, we use dynamic management of context, multi-stage process management and event confirmation modules to detect consultation matter changes in real time, dynamically reconstruct historical dialogue information, and actively guide the completion information when user statements are vague, ensuring semantic coherence and accurate answers.
It realizes the real-time extraction of key information in government affairs consultation, ensures context semantic coherence, improves user experience and answer accuracy, and supports flexible updates and rapid adaptation of government affairs matters.
Smart Images

Figure CN120578748A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent conversation technology, and specifically relates to a question-answering method, system and application in the government affairs field based on a large model and multi-round guidance. Background Art
[0002] With the rapid development of the digital age, the demand for online and intelligent government services is growing, and users' expectations for real-time interactive, intelligent guidance, and personalized recommendation consulting experiences have significantly increased. However, although existing text robot systems based on large models combine deep semantic analysis and automatic generation mechanisms, they still have the following major shortcomings in the government sector: (1) Static context association, lack of dynamic reconstruction While existing solutions record the context of historical conversations, and some even add a contextual semantic association module, these solutions only perform associations at the semantic vector or keyword level within the current conversation. They lack dynamic detection of changes to items and reconstruction of historical information. This inability to automatically clean up and reconstruct historical context when users switch between consultation items leads to semantic confusion and poor consistency across multiple conversations. Once a user changes their inquiry during a conversation, this can easily lead to semantic interference and mismatches.
[0003] (2) Single process management, lack of phased adaptation Existing solutions often rely on a fixed logic tree or business routing (demand prediction → semantic search → answer generation → evaluation optimization), lacking multi-stage adaptive processing mechanisms such as rapid response, guided completion, and deep generation. Business processes proceed step by step along a preset path, unable to dynamically adjust based on the current conversation, provide multiple rounds of guidance for incomplete user statements, or flexibly handle the transition from vague to precise inquiries.
[0004] (3) Lack of multiple rounds of interaction and proactive guidance for confirmation Existing solutions either rely on semantic search and matching to identify items, or employ methods like the "Question Extension Module" to generate diverse question forms to improve matching accuracy. However, these solutions fail to proactively initiate slot-filling questions when users' statements are ambiguous. They also lack multi-round interactions based on a list of candidate items and proactively guided confirmation sub-processes, making it impossible to accurately confirm key items. When users' statements are ambiguous or key information is missing, relying solely on search and matching results often results in inaccurate or even incorrect answers. Summary of the Invention
[0005] The purpose of the present invention is to overcome the existing defects and provide a question-answering method, system and application in the government affairs field based on a large model and multi-round guidance. It has powerful semantic understanding ability, multi-round question-answering ability, intelligent guidance ability and flexible expansion ability of matter data. It can flexibly guide and intelligently answer users' consulting questions based on various types of matter data.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: The first object of the present invention is to provide a question-answering method in the government affairs field based on a large model and multi-round guidance, comprising the following steps: (1) After each round of user input, the user input content and related response results are cached to build historical conversation information, and the consultation matters are detected in real time to see if they have changed. The historical conversation information is dynamically built based on the changes in the matters, and then the question-answer pair retrieval stage is entered; (2) After retrieving relevant question-answer data, answer the user's question based on the question-answer data and cache the reply content; if no relevant question-answer data is retrieved, obtain a list of candidate items from the database through keyword and semantic dual-track retrieval, and perform intent recognition based on historical conversation information; (3) After the matter is determined through intention recognition, the system enters the answering stage after the matter is determined; when the matter cannot be determined through intention recognition, the system actively guides the user to complete the information based on the candidate matter list to obtain the determined matter, and replies to the user based on the determined matter, and caches the reply content. If the matter asked by the user is not within the scope of supported matters, the system explains to the user.
[0007] Furthermore, in step (1), semantic analysis is performed on the historical conversation information to determine whether the matter inquired by the user has changed. If the matter has changed, the context information is cleared. If the matter has not changed, the user input is cached and the historical conversation information is dynamically constructed according to the change of the matter. The user's current input is then rewritten based on the historical conversation information, and then the question-answer pair retrieval stage is entered.
[0008] Furthermore, in step (3), the response phase after entering into the clarification phase includes: Obtain the service guide information for the corresponding matter, answer the user's questions based on the service guide information, and cache the reply content.
[0009] Another object of the present invention is to provide a government affairs question-answering system based on a large model and multi-round guidance, comprising: The dynamic context management module is used to cache user input and system responses in real time and dynamically build historical conversation information. When a change in the user's consultation is detected, the module automatically clears and reconstructs new conversation information to eliminate semantic confusion. A multi-stage conversation process management module is used to advance and manage the conversation process in stages based on the user input status and the degree of item recognition. This includes an initial stage of answering matching results based on questions and answers, an intermediate stage of answering based on service guide information when clarifying items, and a high-level stage of guiding users to complete information based on a list of candidate items when ambiguity is expressed. The item confirmation and guidance module is used to trigger multiple rounds of guidance when the user's expression is vague. It obtains a list of candidate items through dual-track retrieval of keywords and semantics, and actively guides the user to complete the information until the item is confirmed after the intention recognition fails.
[0010] Furthermore, the dynamic context management module includes: A cache unit, used to cache user input content and related response results; The item judgment unit is used to judge the user's consultation items and confirm whether the items have changed; A dynamic construction unit, used to dynamically construct historical conversation information; The rewriting unit rewrites the user input based on the dynamic context content.
[0011] Furthermore, the multi-stage dialogue process management module includes: A question-answer pair retrieval unit, used to compare and retrieve the rewritten user input with pre-stored question-answer pair data; Intent recognition unit, used to identify user intent based on historical conversation information; The matter guidance unit is used to guide users to supplement information for accurate intention recognition and determine the matters that users want to consult; The matter confirmation unit is used to confirm the user's consultation matter based on the intention recognition result.
[0012] Another object of the present invention is to provide an electronic device comprising a processor and a memory storing a computer program, wherein when the processor executes the computer program, the question-answering method in the government affairs field based on a large model and multi-round guidance provided by the first object of the present invention is implemented.
[0013] Another object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the question-answering method in the government affairs field based on a large model and multi-round guidance provided by the first object of the present invention.
[0014] Another object of the present invention is to provide a server comprising at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor so that the at least one processor executes the question-and-answer method in the government affairs field based on a large model and multi-round guidance provided by the first object of the present invention.
[0015] In combination with the above technical solutions, the present invention has the following beneficial effects compared with the prior art: The present invention extracts key information in real time and intelligently manages the conversation state during multiple rounds of interaction with users. It can automatically clear and update historical context according to changes in user intentions, ensuring that each question and answer is based on the most relevant conversation context.
[0016] Through a pre-set multi-stage process, this invention automatically determines the current interaction stage and loads the corresponding strategy, achieving a smooth transition from simple responses to complex guidance, seamlessly connecting to user needs. Furthermore, all responses are based on the context of the user conversation, ensuring contextual semantic consistency and improving the user experience.
[0017] When the present invention cannot determine which item the user is asking about, it will summarize the characteristics of the candidate items obtained based on the hybrid retrieval, combine them with the user's conversation information, and guide the user to clarify their needs through short and natural prompts, thereby significantly improving the accuracy of the answer.
[0018] The present invention ensures through a flexible question-and-answer mechanism that when the matter data is updated, it can still well support the question-and-answer process of the matter and can quickly adapt to the updated government affairs and policies. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 This is a flow chart of a question-answering method in the government affairs field based on a large model and multi-round guidance provided by an embodiment of the present invention; Figure 2 This is a flow diagram of a question-answering method in the government affairs field based on a large model and multi-round guidance provided by an embodiment of the present invention; Figure 3 This is a structural principle diagram of a question-answering system in the government affairs field based on a large model and multi-round guidance provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0021] Example 1: like Figure 1 FIG. 1 is an embodiment of a question-answering method in the government affairs field based on a large model and multi-round guidance provided by the present invention, which specifically includes the following steps: S1: After each round of user input, the user input content and related response results are cached to build historical conversation information. The system also detects in real time whether the consultation matter has changed. Based on the change of the matter, the historical conversation information is dynamically built, and then the question-answer pair retrieval stage is entered; S2: After retrieving relevant question-answer pairs, answer the user's question based on the data and cache the reply content. If no relevant question-answer pairs are retrieved, a list of candidate items is obtained from the database through a dual-track search of keywords and semantics, and intent recognition is performed based on historical conversation information. S3: After the matter is determined through intent recognition, the system enters the answering stage after the matter is clarified. When the matter cannot be determined through intent recognition, the system actively guides the user to complete the information based on the candidate matter list to obtain the confirmed matter. The system replies to the user based on the confirmed matter and caches the reply content. If the matter asked by the user is not within the scope of supported matters, the system explains it to the user.
[0022] Preferably, in step S1, semantic analysis is performed on the historical conversation information to determine whether the matter inquired by the user has changed. If the matter has changed, the context information is cleared. If the matter has not changed, the user input continues to be cached, and the historical conversation information is dynamically constructed according to the change of the matter. Then, the user's current input is rewritten based on the historical conversation information, and then the question-answer pair retrieval stage is entered.
[0023] Preferably, in step S3, the answering phase after entering into the clarification phase includes: Obtain the service guide information for the corresponding matter, answer the user's questions based on the service guide information, and cache the reply content.
[0024] The technical solution of the present invention is further described below with reference to specific cases.
[0025] (1) The user asks, “What procedures are required to drive a taxi?” The system receives the user input and caches it.
[0026] (2) If no event update has occurred, the query remains the original input after rewriting, and the question-answer pair retrieval phase begins.
[0027] (3) If no relevant question-answer pair data is retrieved, the intent recognition stage is entered.
[0028] (4) Hybrid retrieval: obtain a list of relevant candidate items and perform intent recognition based on historical conversation information and the list of candidate items.
[0029] (5) After intent recognition, if the user cannot determine what they want to inquire about, the system enters a multi-round guidance phase. The system responds, "Are you looking to apply for online taxi-hailing services or taxi-hailing services?" The model caches the response and returns to the beginning to continue the conversation.
[0030] (6) The user replies “I want to apply for online car-hailing” and the user input is cached.
[0031] (7) Determine that there is no update at the moment, rewrite the user input to "I want to drive an online car-hailing service, what procedures do I need to go through?", and enter the question-answer retrieval stage.
[0032] (8) If no relevant question-answer pair data is retrieved, the intent recognition stage is entered.
[0033] (9) Hybrid retrieval: obtain a list of relevant candidate items and perform intent recognition based on historical conversation information and the list of candidate items.
[0034] (10) After the intention is identified, the question the user wants to ask is determined, and the answering stage begins after the question is clarified.
[0035] (11) Extract service guide information and answer user questions. The model’s answer content is cached.
[0036] Example 2: like Figure 3 As shown, the embodiment of the present invention provides a government affairs question-answering system based on a large model and multi-round guidance, including: The dynamic context management module is used to cache user input and system responses in real time and dynamically build historical conversation information. When a change in the user's consultation is detected, the module automatically clears and reconstructs new conversation information to eliminate semantic confusion. A multi-stage conversation process management module is used to advance and manage the conversation process in stages based on the user input status and the degree of item recognition. This includes an initial stage of answering matching results based on questions and answers, an intermediate stage of answering based on service guide information when clarifying items, and a high-level stage of guiding users to complete information based on a list of candidate items when ambiguity is expressed. The item confirmation and guidance module is used to trigger multiple rounds of guidance when the user's expression is vague. It obtains a list of candidate items through dual-track retrieval of keywords and semantics, and actively guides the user to complete the information until the item is confirmed after the intention recognition fails.
[0037] Specifically, the dynamic context management module: the main function is to record and manage user conversation content in real time, and support context inheritance and status tracking across rounds. The specific implementation logic is that after each user input, the system will cache the input content and related reply results, and dynamically construct historical conversation information to support subsequent matter change judgment, intent recognition, multi-round conversations, etc. When a change is detected in the user's consultation matter, the context is automatically cleared and reconstructed to avoid semantic confusion. The main feature is that it can completely save the necessary historical information during multiple rounds of interaction, and can also judge in real time whether the matter has changed based on the content of the conversation, and dynamically update the context content. This innovation enables the system to avoid semantic confusion, ensure the coherence and accuracy of the conversation, and provide a solid foundation for subsequent intent recognition and problem answering.
[0038] Multi-stage dialogue process management module: Based on the user input status and the degree of item recognition, the dialogue process is advanced and managed in stages to ensure smooth and natural interaction between the system and the user. The implementation logic is divided into three stages: Preliminary stage: Answering matching results directly based on questions and answers. Intermediate stage: If the user's statement is complete and the item is confirmed, answering the user's questions based on the service guide information. Advanced stage: When the user's statement is unclear, the system further guides the user to complete the information based on the list of candidate items to achieve accurate intent recognition. The main feature is that it ensures that the complex dialogue process between the user and the system can be adaptively diverted and processed. Moreover, when the user's statement is incomplete or unclear, resulting in a failure to understand the intent, the system can adaptively and proactively guide the user to complete or confirm the relevant information instead of giving an unclear or even incorrect answer. This ensures the integrity and flexibility of the dialogue between the system and the user, improves the user experience, and enables users to complete the consultation process more smoothly.
[0039] Item confirmation and guidance module: When the user's expression is vague or ambiguous, multiple rounds of guidance are used to help the user clarify the specific item. The specific implementation logic is: when it is found that the user input is unclear or the expression is incomplete and the specific item cannot be directly determined, the item confirmation sub-process is triggered. First, a list of candidate items is obtained by combining keyword and semantic dual-track retrieval, and then intent recognition is performed to determine the most likely item. If it is not very sure which item the user is asking about, the user is actively guided to complete the information until the item is confirmed. The main features are: it lowers the threshold for user expression, and the task can be completed even if the input is unclear. At the same time, it avoids user experience problems caused by incorrect answers.
[0040] It should be noted that the multi-stage dialogue process management module focuses on managing different stages such as the initial stage, the intermediate stage and the advanced stage, and the matter confirmation and guidance module is the detailed functional implementation and principle of the advanced stage.
[0041] Preferably, the dynamic context management module in the embodiment of the present invention includes: A cache unit, used to cache user input content and related response results; The item judgment unit is used to judge the user's consultation items and confirm whether the items have changed; A dynamic construction unit, used to dynamically construct historical conversation information; The rewriting unit rewrites the user input based on the dynamic context content.
[0042] Preferably, the multi-stage dialogue process management module in the embodiment of the present invention includes: A question-answer pair retrieval unit, used to compare and retrieve the rewritten user input with pre-stored question-answer pair data; Intent recognition unit, used to identify user intent based on historical conversation information; The matter guidance unit is used to guide users to supplement information for accurate intention recognition and determine the matters that users want to consult; The matter confirmation unit is used to confirm the user's consultation matter based on the intention recognition result.
[0043] Example 3: The embodiment of the present invention provides an electronic device, including a processor and a memory storing a computer program. When the processor executes the computer program, it implements the government affairs question-answering method based on a large model and multi-round guidance provided in Example 1 of the present invention.
[0044] Example 4: The embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the government affairs question-answering method based on a large model and multi-round guidance provided in Example 1 of the present invention.
[0045] Example 5: An embodiment of the present invention provides a server comprising at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to enable the at least one processor to execute the question-answering method in the government affairs field based on a large model and multi-round guidance provided in Example 1 of the present invention.
[0046] It should be understood that, although the various steps in the flow charts of the various embodiments of the present invention are shown in sequence according to the instructions of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless otherwise specified in the present invention, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the various embodiments may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0047] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When executed, the program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0048] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A question-answering method in the government affairs field based on a large model and multi-round guidance, characterized by: The method comprises: (1) After each round of user input, the user input content and related response results are cached to build historical conversation information, and the consultation matters are detected in real time to see if they have changed. The historical conversation information is dynamically built based on the changes in the matters, and then the question-answer pair retrieval stage is entered; (2) After retrieving relevant question-answer data, answer the user's question based on the question-answer data and cache the reply content; if no relevant question-answer data is retrieved, obtain a list of candidate items from the database through keyword and semantic dual-track retrieval, and perform intent recognition based on historical conversation information; (3) After the matter is determined through intention recognition, the system enters the answering stage after the matter is determined; when the matter cannot be determined through intention recognition, the system actively guides the user to complete the information based on the candidate matter list to obtain the determined matter, and replies to the user based on the determined matter, and caches the reply content. If the matter asked by the user is not within the scope of supported matters, the system explains to the user.
2. The government affairs question answering method based on a large model and multi-round guidance according to claim 1 is characterized in that: In step (1), the historical conversation information is semantically analyzed to determine whether the matter inquired by the user has changed. If the matter has changed, the context information is cleared. If the matter has not changed, the user input is cached and the historical conversation information is dynamically constructed according to the change of the matter. The user's current input is then rewritten based on the historical conversation information, and then the question-answer pair retrieval stage is entered.
3. The government affairs question answering method based on a large model and multi-round guidance according to claim 1 is characterized in that: In step (3), the response phase after entering into the clarification phase includes: Obtain the service guide information for the corresponding matter, answer the user's questions based on the service guide information, and cache the reply content.
4. A question-answering system for government affairs based on a large model and multi-round guidance, characterized by: The system comprises: The dynamic context management module is used to cache user input and system responses in real time and dynamically build historical conversation information. When a change in the user's consultation is detected, the module automatically clears and reconstructs new conversation information to eliminate semantic confusion. A multi-stage conversation process management module is used to advance and manage the conversation process in stages based on the user input status and the degree of item recognition. This includes an initial stage of answering matching results based on questions and answers, an intermediate stage of answering based on service guide information when clarifying items, and a high-level stage of guiding users to complete information based on a list of candidate items when ambiguity is expressed. The item confirmation and guidance module is used to trigger multiple rounds of guidance when the user's expression is vague. It obtains a list of candidate items through dual-track retrieval of keywords and semantics, and actively guides the user to complete the information until the item is confirmed after the intention recognition fails.
5. The government affairs question-answering system based on a large model and multi-round guidance according to claim 4 is characterized in that: The dynamic context management module includes: A cache unit, used to cache user input content and related response results; The item judgment unit is used to judge the user's consultation items and confirm whether the items have changed; A dynamic construction unit, used to dynamically construct historical conversation information; The rewriting unit rewrites the user input based on the dynamic context content.
6. The government affairs question-answering system based on a large model and multi-round guidance according to claim 4 is characterized in that: The multi-stage dialogue process management module includes: A question-answer pair retrieval unit, used to compare and retrieve the rewritten user input with pre-stored question-answer pair data; Intent recognition unit, used to identify user intent based on historical conversation information; The matter guidance unit is used to guide users to supplement information for accurate intention recognition and determine the matters that users want to consult; The matter confirmation unit is used to confirm the user's consultation matter based on the intention recognition result.
7. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, it implements the government affairs question-answering method based on a large model and multi-round guidance as described in any one of claims 1 to 3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the question-answering method in the government affairs field based on a large model and multi-round guidance as described in any one of claims 1 to 3.
9. A server, characterized in that: It includes at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the processor to enable the at least one processor to execute the government affairs field question and answer method based on a large model and multi-round guidance as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Multi-round question and answer method, device and equipment
CN114547274A
Multi-round dialogue method and device for dynamically updating government affairs and electronic equipment
CN116795960A
Knowledge response method and system based on large model, electronic equipment and storage medium
CN118606574A
Multi-round knowledge question and answer intention recognition method and system based on large language model
CN118796995A
Multi-round dialogue generation method and device based on RAG and medium
CN120407737A