Question answering method, system and related device
By splitting the question information into multiple query subtasks and using multiple agents to obtain initial and supplementary information, the problem of inaccurate responses from large language models is solved, and more accurate response generation is achieved.
Patent Information
- Application Number
- CN202510838961.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2025-01-26
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-23
AI Technical Summary
In the existing technology, relying on large language models to answer questions can easily lead to inaccurate responses.
The question information is split into multiple query subtasks, and multiple intelligent agents are used to obtain initial response information and supplementary information, which are combined to generate reference response information, and finally generate target response information that is more consistent with the question information.
The accuracy and relevance of responses to questions are improved, and more accurate response information is generated through a combination of decomposition and supplementary information.
Smart Images

Figure CN120353905B_ABST
Abstract
Description
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on January 26, 2025, with application number 202510124570X and application name “Question and Answer Method, System and Related Devices”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of natural language processing technology, and in particular to a question-answering method, system, and related devices. Background Art
[0003] The continuous advancement of artificial intelligence and the rapid growth of natural language processing (NLP) technology have brought about significant changes in the way computers and humans interact. The emergence of large language models, in particular, has enabled their widespread application across diverse fields. However, with the rapid pace of information updates, relying solely on large language models to respond to questions can easily lead to inaccurate responses.
[0004] In view of this, how to improve the accuracy of responses has become an urgent issue to be addressed. Summary of the Invention
[0005] The main technical problem solved by this application is to provide a question-answering method, system and related devices that can improve the accuracy of question-answering.
[0006] In order to solve the above technical problems, a technical solution adopted in this application is: to provide a question answering method, including: obtaining question information of the target object, determining at least one query subtask corresponding to the question information; obtaining a target intelligent agent matching the query subtask, using the target intelligent agent to obtain the initial answer information and supplementary information corresponding to the query subtask, and based on the initial answer information and the supplementary information, obtaining the reference answer information corresponding to the query subtask; wherein the supplementary information is obtained based on the initial answer information; based on the reference answer information corresponding to all the query subtasks, obtaining the target answer information corresponding to the question information.
[0007] In order to solve the above technical problems, another technical solution adopted in this application is: to provide a question-answering system, including: an acquisition module, used to obtain the question information of the target object, and determine at least one query subtask corresponding to the question information; a first processing module, used to obtain the target intelligent agent matching the query subtask, and use the target intelligent agent to obtain the initial reply information and supplementary information corresponding to the query subtask, and obtain the reference reply information corresponding to the query subtask based on the initial reply information and the supplementary information; wherein, the supplementary information is obtained based on the initial reply information; a second processing module, used to obtain the target reply information corresponding to the question information based on the reference reply information corresponding to all the query subtasks.
[0008] To solve the above technical problems, another technical solution adopted in this application is: to provide an electronic device, comprising: a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the method mentioned in the above technical solution.
[0009] In order to solve the above technical problems, another technical solution adopted in this application is: providing a computer-readable storage medium on which program instructions are stored, and when the program instructions are executed by a processor, the method mentioned in the above technical solution is implemented.
[0010] The beneficial effects of the present application are: different from the existing technology, the question answering method proposed in the present application, after obtaining the question information of the target object, splits the question information into at least one query subtask to reduce the difficulty of answering. In addition, the target intelligent agent that matches each query subtask is determined from the multiple intelligent agents constructed, and the target intelligent agent is used to obtain the initial answer information corresponding to the corresponding query subtask, and the supplementary information used to improve and supplement the initial answer information is obtained from the reference database. By combining the initial answer information and the supplementary information, a more accurate reference answer information is obtained. Finally, the reference answer information corresponding to all query subtasks is combined to obtain the target answer information for feedback to the target object, so as to improve the fit between the target answer information and the question information of the target object. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. Among them:
[0012] Figure 1 This is a flowchart of an implementation method of the question-answering method of this application;
[0013] Figure 2 yes Figure 1 Step S101 corresponds to a flow chart of another embodiment;
[0014] Figure 3 is a flowchart of an implementation method corresponding to a reference database construction method;
[0015] Figure 4 yes Figure 1 Step S102 corresponds to a flow chart of another embodiment;
[0016] Figure 5 This is a structural diagram of an implementation scheme of the question-answering system of this application;
[0017] Figure 6 This is a schematic structural diagram of an embodiment of the electronic device of the present application;
[0018] Figure 7 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them, and different embodiments can be adaptively combined. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0020] The question-answering method proposed in this application is implemented by an application on a smart terminal or a smart terminal that at least has a question-answering function integrated therein. The smart terminal may be a smart office notebook, a mobile phone, a tablet computer, a personal computer, or a wearable smart device.
[0021] See also Figure 1 , Figure 1 This is a flowchart of an embodiment of the question-answering method of this application, which includes:
[0022] S101: Acquire question information of a target object, and determine at least one query subtask corresponding to the question information.
[0023] In one embodiment, a question information input by a target object is obtained and analyzed to decompose the question information into at least one query subtask.
[0024] In one implementation scenario, the question information is obtained based on the expression audio input by the target object. For example, the expression audio input by the target object on the smart terminal is obtained and converted into text as the question information.
[0025] In another embodiment, a question text input by the target subject through an input method on a smart terminal is obtained, the question text is used as question information, and the question information is decomposed into at least one query subtask.
[0026] S102: Obtain a target intelligent agent that matches the query subtask, use the target intelligent agent to obtain the initial response information and supplementary information corresponding to the query subtask, and obtain the reference response information corresponding to the query subtask based on the initial response information and the supplementary information; wherein the supplementary information is obtained based on the initial response information.
[0027] In one embodiment, multiple pre-built agents are obtained, each possessing superior data analysis capabilities, with different agents varying in their ability to process data for different task types or domains. For a current query subtask, a target agent matching the current query subtask is obtained. The current query subtask is input into the corresponding target agent to obtain corresponding initial response information. Furthermore, based on the initial response information, the target agent is used to retrieve corresponding supplementary information from an external reference database. The supplementary information is used to supplement the initial response information.
[0028] Furthermore, the target agent is used to combine the initial response information and the supplementary information to obtain the reference response information corresponding to the current query subtask.
[0029] S103: Based on the reference answer information corresponding to all query subtasks, obtain target answer information corresponding to the question information.
[0030] In one embodiment, in response to obtaining the reference answer information corresponding to each query subtask, the reference answer information corresponding to all query subtasks is summarized to obtain the target answer information corresponding to the question information, and the target answer information is displayed on the display interface of the smart terminal.
[0031] The question-answering method proposed in this application, after obtaining the question information of the target object, splits the question information into at least one query subtask to reduce the difficulty of answering. In addition, the target intelligent agent that matches each query subtask is determined from the multiple intelligent agents constructed, and the target intelligent agent is used to obtain the initial answer information corresponding to the corresponding query subtask, and the supplementary information used to improve and supplement the initial answer information is obtained from the reference database. By combining the initial answer information and the supplementary information, a more accurate reference answer information is obtained. Finally, the reference answer information corresponding to all query subtasks is combined to obtain the target answer information for feedback to the target object, so as to improve the fit between the target answer information and the question information of the target object.
[0032] See also Figure 2 , Figure 2 yes Figure 1 Step S101 corresponds to a flow chart of another embodiment. Specifically, the implementation process of step S101 includes:
[0033] S201: Acquire user information matching the target object.
[0034] In one embodiment, after obtaining the question information of the target object, user information related to the target object is searched from a user database, wherein the user database stores information related to different objects.
[0035] In one implementation scenario, when the target object inputs question information on the smart terminal to query medical-related knowledge, at least one of the target object's historical conversation information, the target object's identity information, and the target object's portrait information on the smart terminal is obtained, and the obtained information is spliced into text as user information.
[0036] In a specific application scenario, the target object's question is "I suffer from chronic gastroenteritis (stomach distension and occasional diarrhea). Do I have to eat only light food during my illness? The doctor prescribed me some medicine, including Livzon Dele, Martinin, Cisapride, and Cimetidine. Can they be used with antibiotics? Which antibiotic should I use?" Then, by searching the user database matched with the smart terminal, the target object's historical conversation information on the smart terminal, the target object's identity information, and the target object's portrait information are obtained as user information. The above-mentioned historical conversation information includes the historical question information entered by the target object on the smart terminal within the target time period, and the target answer information matched with the historical question information; the target object's identity information includes at least one of the target object's gender, age, occupation, historical medical information, and physical condition information; the target object's portrait information includes at least one of the target object's eating habits information and work and rest information.
[0037] S202: Acquire first reference knowledge related to the question information from a target database matched by the intelligent analysis model, and acquire second reference knowledge related to the question information from a reference database using the intelligent analysis model.
[0038] In one embodiment, an intelligent analysis model is obtained, which is matched with a corresponding target database. Based on a question from a target subject, first reference knowledge related to the question is searched from the target database. Furthermore, at least one reference database is obtained, and the intelligent analysis model is used to search each reference database based on the question to obtain relevant second reference knowledge. The reference database may be an existing open source database or may be constructed.
[0039] Specifically, based on the question information, a corresponding first task text is generated. By inputting the first task text into the intelligent analysis model, the intelligent analysis model is used to search for first reference knowledge from a matching target database. For example, a first task template is pre-constructed to "search for first reference knowledge related to the question information of the target object from a matching target database of the intelligent analysis model," and the specific content of the question information is entered into the corresponding position of the first task template to obtain the first task text. Similarly, based on the question information, a corresponding second task text is generated. By inputting the second task text into the intelligent analysis model, the intelligent analysis model is used to search for second reference knowledge from a corresponding reference database.
[0040] In one implementation scenario, the intelligent analysis model is a large language model with superior data analysis capabilities. The first task text or the second task text is input into the intelligent analysis model, so that the intelligent analysis model performs a detailed interpretation of the first task text or the second task text and then searches for the first reference knowledge or the second reference knowledge.
[0041] In a specific application scenario, the above-mentioned large language model may include but is not limited to deep neural networks (DNNs), convolutional neural networks (CNNs), recurrent neural networks (RNNs), long short-term memory networks (LSTMs), and generative pre-trained Transformer models, etc. No specific restrictions are imposed on the specific structure and specific deployment of the large language model. In addition, it should be noted that the specific structure and specific deployment of the intelligent analysis model mentioned in other embodiments of this application can refer to this embodiment.
[0042] In another embodiment, an intelligent analysis model is used to extract key information from the question information to obtain key extracted information corresponding to the question information. Based on the key extracted information, first reference knowledge related to the key extracted information is searched from the target database. Furthermore, at least one reference database is obtained, and the intelligent analysis model is used to search each reference database based on the key extracted information to obtain relevant second reference knowledge.
[0043] Alternatively, the obtained key extracted information and user information are summarized and linguistically reorganized using an intelligent analysis model to obtain summarized information. Based on the summarized information, first reference knowledge related to the summarized information is searched from the target database. Furthermore, at least one reference database is obtained, and the intelligent analysis model is used to search each reference database based on the summarized information to obtain relevant second reference knowledge.
[0044] It should be noted that the implementation process of the above-mentioned step S201 and step S202 may also be other. For example, step S201 and step S202 may be executed simultaneously, or step S202 may be executed first and then step S201.
[0045] S203: Based on the user information, the first reference knowledge and the second reference knowledge, a query subtask is obtained using an intelligent analysis model.
[0046] In one embodiment, the acquired user information, the first reference knowledge, and the second reference knowledge are combined to generate at least one query subtask matching the question information using an intelligent analysis model.
[0047] Specifically, a corresponding third task text is generated based on the question information, the acquired user information, the first reference knowledge, and the second reference knowledge. The third task text is then fed into an intelligent analysis model to utilize the intelligent analysis model to split the question information into at least one query subtask. For example, a third task template is pre-constructed to "split the question information into at least one query subtask based on the user information, the first reference knowledge, and the second reference knowledge." The specific contents of the question information, user information, the first reference knowledge, and the second reference knowledge are then entered into the corresponding locations of the third task template to generate the third task text.
[0048] In another embodiment, in order to improve the efficiency of decomposing question information, the implementation process of step S101 may also include: based on the first reference knowledge and the second reference knowledge, using the intelligent analysis model to obtain the query subtask. The specific process can refer to the above corresponding implementation method and will not be elaborated here.
[0049] The above solution decomposes the question information into at least one query subtask by combining different types of data, thereby improving the accuracy of question information decomposition and helping to improve the fit between the subsequently generated target response information and the question information of the target object.
[0050] See also Figure 3 , Figure 3 The following is a flow chart of a reference database construction method according to one embodiment. The constructed reference database includes multiple knowledge points, and the specific construction steps include:
[0051] S301: Acquire multiple initial data.
[0052] In one embodiment, a plurality of initial data related to the application scenario is acquired, and the plurality of initial data corresponds to at least one data format.
[0053] In one implementation scenario, when the application scenario of the question-answering method proposed in this application is a medical question, the above-mentioned initial data includes medical-related data searched through a search engine; or, the initial data includes medical-related text format data, such as at least one of papers, case records, and diagnostic records.
[0054] S302: Utilizing an intelligent analysis model to extract reference entities corresponding to the initial data, and obtaining association relationships between different reference entities.
[0055] In one embodiment, the acquired initial data is input into the intelligent analysis model, prompting the intelligent analysis model to extract entities from the initial data to obtain multiple reference entities output by the intelligent analysis model, and prompting the intelligent analysis model to determine the association relationship between different reference entities.
[0056] In another embodiment, after obtaining the reference entities extracted by the intelligent analysis model, the intelligent analysis model is prompted to analyze each reference entity to remove duplicate reference entities. For example, if the extracted entities include "blood cell," "hematopoietic cell," "blood corpuscle," and "blood cell," and the intelligent analysis model determines that these entities belong to the same entity, the multiple entities are unified into a single reference entity and named using standardized terminology.
[0057] S303: Build a reference database based on the reference entities and association relationships.
[0058] In one embodiment, a reference database is constructed based on the obtained reference entities and the associations between the reference entities. By constructing the reference database in a knowledge graph format, a reference basis is provided for subsequent processing.
[0059] See also Figure 4 , Figure 4 yes Figure 1 Step S102 corresponds to a flow chart of another embodiment. Specifically, the implementation process of step S102 includes:
[0060] S401: Construct a task list corresponding to all query subtasks, and determine the target agent that matches the current query subtask based on the order of the query subtasks in the task list.
[0061] In one embodiment, a corresponding task list is constructed for the acquired query subtasks, and all query subtasks are arranged in order in the task list. According to the arrangement order of the query subtasks, the target agent matching the current query subtask is determined in order.
[0062] Specifically, according to at least one of the information of the current query subtask, such as the task type and the task domain, a target intelligent agent matching the current query subtask is determined from the constructed multiple intelligent agents.
[0063] In one implementation scenario, the above-mentioned intelligent agent is obtained after fine-tuning the intelligent analysis model. Specifically, in order to enable the intelligent agent to have better processing capabilities for query subtasks of different task types or task fields, training samples corresponding to different task types or task fields are obtained, and the intelligent analysis model is fine-tuned and trained using the training samples to obtain the corresponding intelligent agent. And, the target database matched with the intelligent analysis model is updated using the corresponding training samples to obtain the target database matched with the corresponding intelligent agent. For example, in order to construct an intelligent agent for processing query subtasks under the "gastrointestinal surgery field", medical knowledge related to gastroenterology is obtained, and the intelligent analysis model is trained using the medical knowledge to obtain the "gastrointestinal surgery field" intelligent agent; and, the target database matched with the intelligent analysis model is updated using the above-mentioned medical knowledge to obtain the target database matched with the "gastrointestinal surgery field" intelligent agent.
[0064] In a specific application scenario, the query subtask is "I suffer from chronic gastroenteritis (stomach bloating and occasional diarrhea). Do I have to eat only bland foods during my illness?" This query subtask is determined to belong to the "gastrointestinal surgery field." Given that agents matching multiple different departments are built, the agent corresponding to the "gastrointestinal surgery field" is selected as the target agent for the query subtask.
[0065] In another embodiment, the multiple agents include a default agent that has relatively balanced processing capabilities for data across multiple task types and task domains. In response to a low degree of match between the task type and task domain of the current query subtask and the multiple agents, the default agent is selected as the target agent for matching the current query subtask.
[0066] In another embodiment, while the target agent is processing the current query subtask, processing status information of the target agent is obtained in real time. The processing status information is used to indicate whether the target agent is currently in a processing state or an idle state. In response to the target agent being in the idle state, the current query subtask matching the target agent is obtained from the task list, and the current query subtask is processed by the target agent.
[0067] S402: Utilize the target agent to obtain the initial response information corresponding to the current query subtask.
[0068] In one embodiment, third reference knowledge related to the current query subtask is obtained from the target database matched by the target agent. Based on the third reference knowledge, the target agent is used to obtain initial answer information matched to the current query subtask.
[0069] In one implementation scenario, a target agent is matched with a corresponding target database. For a current query subtask, the corresponding target agent searches the matched target database for third reference knowledge related to the current query subtask. Based on the retrieved third reference knowledge, the target agent generates initial response information that matches the current query subtask.
[0070] In another embodiment, when the target agent generates an initial response matching the current query subtask based on the third reference knowledge, a placeholder is added to the generated initial response. The placeholder is used to indicate that the content at the corresponding position in the generated initial response is missing; or, alternatively, the placeholder is used to indicate that the content at the corresponding position in the generated initial response was predicted or inferred by the target agent and requires further confirmation based on relevant knowledge.
[0071] S403: Based on the initial reply information, the target agent is used to obtain supplementary information from the reference database.
[0072] In one embodiment, the target database data updates associated with the target agent match have certain limitations. To improve the accuracy of the generated reference response information, after generating the initial response information, the target agent searches for supplementary information from any reference database based on the content of the initial response information. This supplementary information is used to supplement and / or improve the initial response information. The reference database may be an existing open source database or may be constructed. The specific acquisition process can refer to the corresponding embodiment described above.
[0073] S404: Based on the initial response information and the supplementary information, the target agent is used to generate reference response information that matches the current query subtask.
[0074] In one embodiment, the target agent is used to modify the initial response information based on the supplementary information to obtain modified initial response information, and reference response information corresponding to the current query subtask is obtained based on the modified initial response information.
[0075] In one implementation scenario, after obtaining supplementary information corresponding to the current query subtask, the target agent is prompted to revise the initial response information based on the supplementary information, and the target agent outputs the revised initial response information. A determination is then made as to whether the revised initial response information meets a preset output condition. The preset output condition is related to at least one of the completeness and accuracy of the revised initial response information.
[0076] In response to the revised initial response information satisfying the preset output condition, the revised initial response information is used as the reference response information. Alternatively, in response to the revised initial response information not satisfying the preset output condition, the process returns to the step of obtaining supplementary information from a reference database using the target agent based on the initial response information, until the number of revisions to the initial response information reaches a threshold, at which point the final revised initial response information is used as the reference response information.
[0077] Specifically, when the initial response information obtained according to the third reference knowledge contains a placeholder. The target agent uses the supplementary information obtained from any reference database to correct the initial response information to obtain the corrected initial response information. Determine whether the corrected initial response information still contains the placeholder. If not, the corrected initial response information is determined to meet the preset output conditions, and the current corrected initial response information is used as the reference response information for the current query subtask. If it is contained, the target agent is used to search for supplementary information from any other reference database, and the supplementary information obtained from the latest search is used to continue to correct the current corrected initial response information. When the number of times the initial response information is corrected reaches the threshold number, the final corrected initial response information is used as the reference response information.
[0078] The above scheme utilizes the target intelligent agent to preferentially generate initial response information based on the matching target database, and then searches for higher-value supplementary information from the reference database based on the initial response information, and uses the supplementary information to correct the initial response information, so as to achieve the generation of reference response information through multiple stages, avoid the interference of redundant information, and improve the efficiency and flexibility of reference response information generation.
[0079] In another embodiment, there are multiple reference databases, and step S402 retrieves supplementary information corresponding to the current query subtask from each reference database. Based on this, step S404 includes: utilizing the target agent to retrieve supplementary response information matching the current query subtask based on the supplementary information retrieved from each reference database. Based on the initial response information and all supplementary response information, reference response information corresponding to the current query subtask is retrieved.
[0080] Specifically, for each reference database, the target agent generates supplementary response information matching the current query subtask based on the supplementary information, thereby obtaining supplementary response information corresponding to each reference database. The target agent is prompted to summarize the initial response information and all supplementary response information to generate reference response information corresponding to the current query subtask. This implementation eliminates the need to determine whether the initial response information meets the preset output conditions, thus reducing the difficulty of obtaining reference response information corresponding to the current query subtask.
[0081] In another embodiment, the target agent modifies the initial response information based on the supplementary information obtained from each reference database to obtain a modified initial response information. The target agent then summarizes the multiple modified initial response information to obtain reference response information corresponding to the current query subtask.
[0082] Specifically, for each reference database, the target agent modifies the generated initial response information based on the acquired supplementary information, obtaining the modified initial response information corresponding to each reference database. The target agent is then prompted to summarize all modified initial response information to generate reference response information corresponding to the current query subtask.
[0083] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of an embodiment of the question answering system of the present application. Specifically, the question answering system includes an acquisition module 10, a first processing module 20 and a second processing module 30 coupled to each other.
[0084] Specifically, the acquisition module 10 is used to acquire question information of a target object and determine at least one query subtask corresponding to the question information.
[0085] The first processing module 20 is used to obtain a target intelligent agent that matches the query subtask, use the target intelligent agent to obtain the initial response information and supplementary information corresponding to the query subtask, and obtain the reference response information corresponding to the query subtask based on the initial response information and supplementary information; wherein the supplementary information is obtained based on the initial response information.
[0086] The second processing module 30 is used to obtain target answer information corresponding to the question information based on the reference answer information corresponding to all query subtasks.
[0087] In one embodiment, the acquisition module 10 acquires question information of the target object and determines at least one query subtask corresponding to the question information, including: acquiring user information matching the target object; and acquiring first reference knowledge related to the question information from a target database matched by an intelligent analysis model, and acquiring second reference knowledge related to the question information from a reference database using an intelligent analysis model; based on the user information, the first reference knowledge, and the second reference knowledge, acquiring the query subtask using the intelligent analysis model.
[0088] In one embodiment, please continue to refer to Figure 5 The question-answering system proposed in this application also includes a database construction module 40 coupled to the acquisition module 10. The above-mentioned reference database includes multiple knowledge points, and at least some of the knowledge points are matched with association relationships. The steps of the database construction module 40 to construct the reference database include: obtaining multiple initial data; using an intelligent analysis model to extract reference entities corresponding to the initial data, and obtaining association relationships between different reference entities; and constructing a reference database based on the reference entities and association relationships.
[0089] In one embodiment, the first processing module 20 obtains a target intelligent agent that matches the query subtask, uses the target intelligent agent to obtain initial response information and supplementary information corresponding to the query subtask, and obtains reference response information corresponding to the query subtask based on the initial response information and supplementary information, including: constructing a task list corresponding to all query subtasks, and determining the target intelligent agent that matches the current query subtask based on the arrangement order of the query subtasks in the task list; using the target intelligent agent to obtain the initial response information corresponding to the current query subtask; based on the initial response information, using the target intelligent agent to obtain supplementary information from a reference database; based on the initial response information and supplementary information, using the target intelligent agent to generate reference response information that matches the current query subtask.
[0090] In one embodiment, the first processing module 20 uses the target intelligent agent to obtain the initial response information corresponding to the current query subtask, including: obtaining third reference knowledge related to the current query subtask from the target database matched by the target intelligent agent; based on the third reference knowledge, using the target intelligent agent to obtain the initial response information matching the current query subtask.
[0091] The first processing module 20 uses the target intelligent agent to generate reference response information that matches the current query subtask based on the initial response information and the supplementary information, including: based on the supplementary information, using the target intelligent agent to correct the initial response information to obtain the corrected initial response information; based on the corrected initial response information, obtaining the reference response information corresponding to the current query subtask.
[0092] In one embodiment, the first processing module 20 obtains reference response information corresponding to the current query subtask based on the revised initial response information, including: in response to the revised initial response information meeting the preset output condition, using the revised initial response information as the reference response information; in response to the revised initial response information not meeting the preset output condition, returning to the step of obtaining supplementary information from the reference database based on the initial response information using the target intelligent agent, until the number of times the initial response information is revised reaches a threshold number.
[0093] In one embodiment, the first processing module 20 uses the target intelligent agent to generate reference response information that matches the current query subtask based on the initial response information and the supplementary information, including: for the supplementary information obtained from each reference database, using the target intelligent agent to obtain the supplementary response information that matches the current query subtask based on the supplementary information; based on the initial response information and all the supplementary response information, obtaining the reference response information corresponding to the current query subtask.
[0094] See also Figure 6 , Figure 6 : This is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device includes: a memory 50 and a processor 60, which are coupled to each other. The memory 50 stores program instructions, and the processor 60 is used to execute the program instructions to implement the method described in any of the above embodiments. Specifically, the electronic device includes, but is not limited to, desktop computers, laptop computers, tablet computers, servers, etc., which are not limited here. In addition, the processor 60 can also be referred to as a CPU (Center Processing Unit). The processor 60 may be an integrated circuit chip with signal processing capabilities. The processor 60 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor. In addition, the processor 60 may be implemented by an integrated circuit chip.
[0095] See also Figure 7 , Figure 7 This is a structural diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 70 stores program instructions 80 that can be run by a processor. When the program instructions 80 are executed by the processor, the method mentioned in any of the above embodiments is implemented.
[0096] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation methods described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0097] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0098] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the various implementation methods of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0100] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A question-answering method, characterized in that: include: Obtaining question information of a target object, and determining at least one query subtask corresponding to the question information; Obtaining a target agent that matches the query subtask, using the target agent to obtain initial response information and supplementary information corresponding to the query subtask, and obtaining reference response information corresponding to the query subtask based on the initial response information and the supplementary information; wherein the supplementary information is obtained based on the initial response information; Based on the reference answer information corresponding to all the query subtasks, obtaining target answer information corresponding to the question information; Among them, the obtaining of the question information of the target object and determining at least one query subtask corresponding to the question information include: obtaining user information matching the target object; and obtaining first reference knowledge related to the question information from a target database matched by an intelligent analysis model, and obtaining second reference knowledge related to the question information from a reference database using the intelligent analysis model; based on the user information, the first reference knowledge and the second reference knowledge, obtaining the query subtask using the intelligent analysis model.
2. The method according to claim 1, characterized in that The reference database includes a plurality of knowledge points, at least some of which are matched with each other and have associated relationships. The step of constructing the reference database includes: Get multiple initial data; Extracting reference entities corresponding to the initial data using the intelligent analysis model, and obtaining the association relationships between different reference entities; The reference database is constructed based on the reference entities and the association relationships.
3. The method according to claim 1, characterized in that The acquiring first reference knowledge related to the question information from a target database matched with the intelligent analysis model, and acquiring second reference knowledge related to the question information from a reference database using the intelligent analysis model, includes: Extracting key information from the question information using an intelligent analysis model to obtain key extracted information corresponding to the question information; Using an intelligent analysis model to summarize and linguistically reorganize the key extracted information and the user information to obtain summarized information; Based on the summary information, obtaining the first reference knowledge related to the summary information from the target database; and At least one reference database is obtained, and the second reference knowledge is obtained by searching from each of the reference databases according to the summary information using an intelligent analysis model.
4. The method according to claim 1, wherein The step of obtaining a target agent that matches the query subtask, using the target agent to obtain initial response information and supplementary information corresponding to the query subtask, and obtaining reference response information corresponding to the query subtask based on the initial response information and the supplementary information includes: Constructing a task list corresponding to all the query subtasks, and determining the target agent that matches the current query subtask based on the order of the query subtasks in the task list; Using the target agent to obtain the initial response information corresponding to the current query subtask; Based on the initial response information, using the target agent to obtain the supplementary information from a reference database; Based on the initial answer information and the supplementary information, the target agent is used to generate the reference answer information that matches the current query subtask.
5. The method according to claim 4, characterized in that The using the target agent to obtain the initial response information corresponding to the current query subtask includes: Acquire third reference knowledge related to the current query subtask from a target database matched by the target agent; Based on the third reference knowledge, using the target agent to obtain the initial response information matching the current query subtask; The step of generating the reference answer information matching the current query subtask by using the target agent based on the initial answer information and the supplementary information includes: Based on the supplementary information, using the target agent to modify the initial response information to obtain modified initial response information; Based on the corrected initial response information, the reference response information corresponding to the current query subtask is obtained.
6. The method according to claim 5, characterized in that The acquiring, based on the modified initial response information, the reference response information corresponding to the current query subtask includes: In response to the revised initial reply information meeting a preset output condition, using the revised initial reply information as the reference reply information; In response to the fact that the revised initial reply information does not meet the preset output conditions, return to the step of obtaining the supplementary information from the reference database based on the initial reply information using the target agent until the number of times the initial reply information is revised reaches a threshold number.
7. The method according to claim 5, characterized in that The acquiring, based on the modified initial response information, the reference response information corresponding to the current query subtask includes: The target agent is used to summarize the revised initial response information to generate the reference response information corresponding to the current query subtask.
8. The method according to claim 4, characterized in that The step of generating the reference answer information matching the current query subtask by using the target agent based on the initial answer information and the supplementary information includes: For the supplementary information obtained from each of the reference databases, using the target agent to obtain supplementary response information matching the current query subtask based on the supplementary information; Based on the initial reply information and all the supplementary reply information, the reference reply information corresponding to the current query subtask is obtained.
9. A question-answering system, characterized in that: include: An acquisition module, configured to acquire question information of a target object and determine at least one query subtask corresponding to the question information; A first processing module is configured to obtain a target agent that matches the query subtask, use the target agent to obtain initial response information and supplementary information corresponding to the query subtask, and obtain reference response information corresponding to the query subtask based on the initial response information and the supplementary information; wherein the supplementary information is obtained based on the initial response information; A second processing module is configured to obtain target answer information corresponding to the question information based on the reference answer information corresponding to all the query subtasks; Among them, the obtaining of the question information of the target object and determining at least one query subtask corresponding to the question information include: obtaining user information matching the target object; and obtaining first reference knowledge related to the question information from a target database matched by an intelligent analysis model, and obtaining second reference knowledge related to the question information from a reference database using the intelligent analysis model; based on the user information, the first reference knowledge and the second reference knowledge, obtaining the query subtask using the intelligent analysis model.
10. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is configured to execute the program instructions to implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Question answering method and device based on large model, training method and device, intelligent agent, equipment and medium
CN119106123A
Intelligent inquiry method, device and equipment, medium and program product
CN119181516A