Question answering method, system and related device
By splitting the question information into query subtasks and using multiple agents to obtain the supplementary information, the problem of inaccurate reply of the large language model is solved, and the high accuracy and fit of the question answers are achieved.
Patent Information
- Application Number
- CN202510124570.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-06-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, when reliing solely on the large language model to answer the question information, it is easy to cause inaccurate responses and it is difficult to improve the accuracy of the reply.
By obtaining the question information of the target object, split it into at least one query subtask, and determining the target agent matching each query subtask from the constructed multiple agents, using the target agent to obtain initial reply information and supplementary information, and generating reference reply information in combination with the initial reply information and supplementary information, and finally obtaining the target reply information that is highly consistent with the question information.
By splitting the question information and using multiple agents to obtain supplementary information, the accuracy of question-and-answer replies is significantly improved, and the compatibility between the target reply information and the target object's question-and-answer replies is enhanced.
Smart Images

Figure CN120104732A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] With the continuous development of artificial intelligence, the rapid development of natural language processing (NLP) technology has brought great changes to the way computers and humans interact. In particular, the emergence of large language models has enabled it to be widely used in different fields. However, with the acceleration of information updates, it is easy to cause problems such as inaccurate responses when only relying on large language models to respond to question information.
[0003] In view of this, how to improve the accuracy of responses has become an urgent issue to be addressed. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a question-answering method, system and related devices, which can improve the accuracy of question-answering.
[0005] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a question answering method, including: obtaining question information of a 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 initial answer information and supplementary information corresponding to the query subtask, and obtaining reference answer information corresponding to the query subtask based on the initial answer information and the supplementary information; 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.
[0006] To solve the above technical problems, another technical solution adopted in the present 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 based on the initial reply information and the supplementary information, obtain the reference reply information corresponding to the query subtask; 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.
[0007] To solve the above technical problems, another technical solution adopted in the present 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.
[0008] In order to solve the above technical problems, another technical solution adopted in the present 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.
[0009] The beneficial effects of the present application are as follows: Different from the prior art, 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. Also, a target intelligent agent matching 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 to obtain supplementary information from the reference database for improving and supplementing the initial answer information. 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
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0011] Figure 1 It is a flowchart of an implementation method of the question-answering method of the present application;
[0012] Figure 2 yes Figure 1 Step S101 corresponds to a flow chart of another implementation method;
[0013] Figure 3 is a flowchart of a reference database construction method corresponding to an implementation method;
[0014] Figure 4 yes Figure 1 Step S102 corresponds to a flow chart of another implementation method;
[0015] Figure 5 It is a structural diagram of an implementation method of the question-answering system of the present application;
[0016] Figure 6 It is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0017] Figure 7 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments, and different embodiments can be adaptively combined. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] The question-answering method proposed in this application is implemented by an application on a smart terminal or a smart terminal that at least integrates a question-answering function. The smart terminal may be a smart office notebook, a mobile phone, a tablet computer, a personal computer, or a wearable smart device.
[0020] See also Figure 1 , Figure 1 It is a flowchart of an implementation method of the question-answering method of the present application, and the method comprises:
[0021] S101: Acquire question information of a target object, and determine at least one query subtask corresponding to the question information.
[0022] In one embodiment, question information input by a target object is obtained, and the question information is analyzed to decompose the question information into at least one query subtask.
[0023] In one implementation scenario, the question information is obtained based on the statement audio input by the target object. For example, the statement audio input by the target object on the smart terminal is obtained, and the statement audio is converted into text as the question information.
[0024] In another embodiment, a question text input by the target object through an input method on the smart terminal is obtained, the question text is used as question information, and the question information is decomposed into at least one query subtask.
[0025] S102: Obtain a target intelligent agent that matches the query subtask, use the target intelligent 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.
[0026] In one embodiment, a plurality of pre-built intelligent agents are obtained, each intelligent agent has a relatively good data analysis capability, and different intelligent agents have different capabilities in processing data of different task types or different task fields. For the current query subtask, a target intelligent agent matching the current query subtask is obtained. The current query subtask is input into the corresponding target intelligent agent to obtain the corresponding initial reply information. And, according to the initial reply information, the target intelligent agent is used to obtain the corresponding supplementary information from the external reference database, and the supplementary information is used to supplement the initial reply information.
[0027] 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.
[0028] S103: Based on the reference answer information corresponding to all query subtasks, obtain target answer information corresponding to the question information.
[0029] In one embodiment, in response to obtaining reference answer information corresponding to each query subtask, the reference answer information corresponding to all query subtasks is summarized to obtain target answer information corresponding to the question information, and the target answer information is displayed on the display interface of the smart terminal.
[0030] 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. Also, a target intelligent agent matching 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 to obtain supplementary information from the reference database for improving and supplementing the initial answer information. 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 used to feed back to the target object, so as to improve the fit between the target answer information and the question information of the target object.
[0031] See also Figure 2 , Figure 2 yes Figure 1 Step S101 in the flowchart corresponds to another embodiment. Specifically, the implementation process of step S101 includes:
[0032] S201: Acquire user information matching the target object.
[0033] In one embodiment, after obtaining the question information of the target object, the user information related to the target object is searched from the user database, wherein the user database stores information related to different objects.
[0034] 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.
[0035] In a specific application scenario, the target object's question information is "I suffer from chronic gastroenteritis (stomach and abdominal distension, occasional diarrhea). Do I have to eat only light food during my illness? The doctor prescribed me medicine, including Livzon, Martinin, Cisapride and Cimetidine. Can it be used with antibiotics? Which antibiotics should be used?" Then, by searching the user database matched by the smart terminal, the historical conversation information of the target object on the smart terminal, the identity information of the target object and the portrait information of the target object are obtained as user information. The above-mentioned historical conversation information includes the historical question information input 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 identity information of the target object includes at least one of the target object's gender, age, occupation, historical disease information and physical condition information; the portrait information of the target object includes at least one of the target object's eating habits information and work and rest information.
[0036] 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.
[0037] In one embodiment, an intelligent analysis model is obtained, and the intelligent analysis model is matched with a corresponding target database. According to the question information of the target object, first reference knowledge related to the question information is searched from the above target database. And, at least one reference database is obtained, and the intelligent analysis model is used to search for relevant second reference knowledge from each reference database according to the question information. The reference database is an existing open source database, or the reference database can also be obtained by construction.
[0038] Specifically, based on the question information, a corresponding first task text is generated, and the first task text is input into the intelligent analysis model to search for the first reference knowledge from the matching target database using the intelligent analysis model. For example, a first task template "searching for the first reference knowledge related to the question information of the target object from the target database matched by the intelligent analysis model" is pre-constructed, and the specific content of the question information is filled into the corresponding position in the first task template to obtain the first task text. Similarly, based on the question information, a corresponding second task text is generated, and the second task text is input into the intelligent analysis model to search for the second reference knowledge from the corresponding reference database using the intelligent analysis model.
[0039] 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 interprets the first task text or the second task text in detail and searches for the first reference knowledge or the second reference knowledge.
[0040] 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 (LSTM), and generative pre-trained Transformer models, etc., and no specific restrictions are made 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 implementations of this application can refer to this implementation.
[0041] In another embodiment, the 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 from each reference database based on the key extracted information to obtain related second reference knowledge.
[0042] Alternatively, the key extracted information and user information obtained are summarized and reorganized in language 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. And, at least one reference database is obtained, and related second reference knowledge is searched from each reference database based on the summarized information using an intelligent analysis model.
[0043] 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.
[0044] S203: Based on the user information, the first reference knowledge and the second reference knowledge, a query subtask is acquired using an intelligent analysis model.
[0045] 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.
[0046] Specifically, the corresponding third task text is generated according to the question information, the acquired user information, the first reference knowledge and the second reference knowledge, and the third task text is input into the intelligent analysis model to split the question information into at least one query subtask using the intelligent analysis model. For example, a third task template "combining user information, first reference knowledge and second reference knowledge to split the question information into at least one query subtask" is pre-constructed, and the specific contents of the question information, user information, first reference knowledge and second reference knowledge are filled into the corresponding positions in the third task template to obtain the third task text.
[0047] 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.
[0048] The above scheme 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.
[0049] See also Figure 3 , Figure 3 1 is a flow chart of a reference database construction method corresponding to an implementation method. The constructed reference database includes multiple knowledge points, and its specific construction steps include:
[0050] S301: Acquire multiple initial data.
[0051] In one implementation, 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.
[0052] In one implementation scenario, when the application scenario of the question-answering method proposed in the present 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 data in text format, for example, at least one of a paper, a case record, and a diagnosis record.
[0053] S302: Using the intelligent analysis model to extract reference entities corresponding to the initial data, and to obtain association relationships between different reference entities.
[0054] 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.
[0055] 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, the extracted multiple entities include "blood cells", "hematopoietic cells", "blood cells" and "blood cells", and the intelligent analysis model is used to determine that the multiple entities mentioned above belong to the same entity, then the multiple entities are unified as the same reference entity and named using standardized terms.
[0056] S303: Building a reference database based on reference entities and association relationships.
[0057] In one embodiment, a reference database is constructed based on the obtained reference entities and the associations between the reference entities. By constructing a reference database in a knowledge graph format, a reference basis is provided for subsequent processing.
[0058] See also Figure 4 , Figure 4 yes Figure 1 Step S102 in the flowchart corresponds to another embodiment. Specifically, the implementation process of step S102 includes:
[0059] S401: Construct a task list corresponding to all query subtasks, and determine the target agent that matches the current query subtask based on the arrangement order of the query subtasks in the task list.
[0060] In one embodiment, for the acquired query subtasks, a corresponding task list is constructed, and all query subtasks are arranged in sequence in the task list. According to the arrangement order of the query subtasks, the target agent matching the current query subtask is determined in sequence.
[0061] Specifically, according to at least one of the information such as the task type and task domain of the current query subtask, a target intelligent agent matching the current query subtask is determined from the constructed multiple intelligent agents.
[0062] 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 by the intelligent analysis model is updated using the corresponding training samples to obtain the target database matched by 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 by the intelligent analysis model is updated using the above-mentioned medical knowledge to obtain a target database matching the "gastrointestinal surgery field" intelligent agent.
[0063] In a specific application scenario, the current query subtask is "I suffer from chronic gastroenteritis (stomach bloating and diarrhea), can I only eat light food during the illness?", and it is determined that the current query subtask belongs to the "gastrointestinal surgery field". In response to the construction of agents matching multiple different departments, the agent corresponding to the "gastrointestinal surgery field" is used as the target agent matching the current query subtask.
[0064] In another embodiment, the multiple agents include a default agent, which has a relatively balanced processing capability for data of multiple task types and task fields. In response to a low degree of matching between the task type and task field of the current query subtask and the multiple agents, the default agent is used as the target agent for matching the current query subtask.
[0065] In another embodiment, during the process of the target agent processing the current query subtask, the processing state information of the target agent is obtained in real time, and the processing state information is used to indicate that the target agent is currently in a processing state or an idle state. In response to the target agent being in an idle state, the current query subtask matching the target agent is obtained from the task list, so as to use the target agent to process the current query subtask.
[0066] S402: Using the target agent to obtain initial response information corresponding to the current query subtask.
[0067] 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 by the current query subtask.
[0068] In one implementation scenario, the target agent is matched with a corresponding target database. For the current query subtask, the corresponding target agent is used to search for third reference knowledge related to the current query subtask from the matched target database. Based on the searched third reference knowledge, the target agent is used to generate initial response information matching the current query subtask.
[0069] In another embodiment, when the target agent generates initial response information matching the current query subtask based on the third reference knowledge, a placeholder is added to the generated initial response information. The placeholder is used to indicate that the content at the corresponding position in the generated initial response information is missing; or the placeholder is used to indicate that the content at the corresponding position in the generated initial response information is predicted or inferred by the target agent, which needs to be further confirmed in combination with relevant knowledge.
[0070] S403: Based on the initial reply information, use the target agent to obtain supplementary information from the reference database.
[0071] In one embodiment, there are certain limitations in the data update of the target database matched by the target agent. In order to improve the accuracy of generating reference reply information, after generating the initial reply information, the target agent is used to search for supplementary information from any reference database according to the content of the initial reply information. The supplementary information is used to supplement and / or improve the initial reply information. The reference database is an existing open source database, or the reference database can also be obtained by construction. The specific acquisition process can refer to the corresponding embodiment above.
[0072] 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.
[0073] In one embodiment, the initial answer information is modified by the target agent based on the supplementary information to obtain the modified initial answer information. Based on the modified initial answer information, the reference answer information corresponding to the current query subtask is obtained.
[0074] In one implementation scenario, after obtaining the supplementary information corresponding to the current query subtask, the target agent is prompted to revise the initial response information in combination with the supplementary information, and the revised initial response information output by the target agent is obtained. It is determined whether the revised initial response information meets the preset output condition. The preset output condition is related to at least one of the completeness and accuracy of the revised initial response information.
[0075] In response to the revised initial reply information satisfying the preset output condition, the revised initial reply information is used as the reference reply information. Alternatively, in response to the revised initial reply information not satisfying the preset output condition, the process returns to the step of obtaining supplementary information from the reference database using the target agent based on the initial reply information, until the number of revisions to the initial reply information reaches a number threshold, and the final revised initial reply information is used as the reference reply information.
[0076] Specifically, when the initial reply information obtained according to the third reference knowledge contains a placeholder. The initial reply information is corrected using the supplementary information obtained by the target agent from any reference database to obtain the corrected initial reply information. Determine whether the corrected initial reply information still contains the placeholder. If not, the corrected initial reply information is determined to meet the preset output conditions, and the current corrected initial reply information is used as the reference reply 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 current corrected initial reply information is continued to be corrected using the supplementary information obtained from the latest search. When the number of corrections to the initial reply information reaches the number threshold, the final corrected initial reply information is used as the reference reply information.
[0077] The above scheme utilizes the target intelligent agent to preferentially generate initial reply information based on the matching target database, and then searches for higher-value supplementary information from the reference database based on the initial reply information, and uses the supplementary information to correct the initial reply information, so as to achieve the generation of reference reply information through multiple stages, avoid the interference of redundant information, and improve the efficiency and flexibility of reference reply information generation.
[0078] In another embodiment, there are multiple reference databases, and the supplementary information corresponding to the current query subtask is obtained from each reference database in step S402. Based on this, the implementation process of step S404 includes: for the supplementary information obtained from each reference database, using the target agent to obtain the supplementary reply 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.
[0079] Specifically, for each reference database, the target agent is used to generate supplementary response information matching the current query subtask based on the supplementary information, that is, the supplementary response information corresponding to each reference database is obtained. The target agent is prompted to summarize the initial response information and all the supplementary response information to generate reference response information corresponding to the current query subtask. This implementation does not require judging whether the initial response information meets the preset output condition, which reduces the difficulty of obtaining the reference response information corresponding to the current query subtask.
[0080] In another embodiment, for the supplementary information obtained from each reference database, the target agent is used to modify the initial response information according to the supplementary information to obtain the modified initial response information. The target agent is used to summarize the multiple modified initial response information to obtain the reference response information corresponding to the current query subtask.
[0081] Specifically, for each reference database, the target agent is used to modify the generated initial response information according to the acquired supplementary information to obtain the modified initial response information corresponding to each reference database. The target agent is prompted to summarize all the modified initial response information to generate reference response information corresponding to the current query subtask.
[0082] See also Figure 5 , Figure 5 1 is a schematic diagram of a structure of an embodiment of the question answering system of the present application. Specifically, the question answering system comprises an acquisition module 10, a first processing module 20 and a second processing module 30 coupled to each other.
[0083] Specifically, the acquisition module 10 is used to acquire question information of the target object and determine at least one query subtask corresponding to the question information.
[0084] 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 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 supplementary information; wherein the supplementary information is obtained based on the initial response information.
[0085] 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.
[0086] 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.
[0087] In one embodiment, please continue to refer to Figure 5The question answering system proposed in the present 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.
[0088] In one embodiment, the first processing module 20 obtains a target intelligent agent matching 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 a target intelligent agent matching the current query subtask based on the arrangement order of the query subtasks in the task list; using the target intelligent agent to obtain 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 matching the current query subtask.
[0089] In one embodiment, the first processing module 20 uses the target intelligent agent to obtain initial response information corresponding to the current query subtask, including: obtaining third reference knowledge related to the current query subtask from a target database matched by the target intelligent agent; based on the third reference knowledge, using the target intelligent agent to obtain initial response information matching the current query subtask.
[0090] The first processing module 20 generates reference response information matching the current query subtask using the target intelligent agent 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 corrected initial response information; based on the corrected initial response information, obtaining reference response information corresponding to the current query subtask.
[0091] In one embodiment, the first processing module 20 obtains reference reply information corresponding to the current query subtask based on the revised initial reply information, including: in response to the revised initial reply information satisfying a preset output condition, using the revised initial reply information as reference reply information; in response to the revised initial reply information not satisfying the preset output condition, returning to the step of obtaining supplementary information from a reference database based on the initial reply information using the target agent, until the number of revisions to the initial reply information reaches a threshold number.
[0092] In one embodiment, the first processing module 20 uses the target intelligent agent to generate reference response information matching 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 matching 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.
[0093] See also Figure 6 , Figure 6 : It is a structural diagram of an embodiment of an electronic device of the present application. The electronic device includes: a memory 50 and a processor 60 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 mentioned in any of the above embodiments. Specifically, the electronic device includes but is not limited to: a desktop computer, a laptop computer, a tablet computer, a server, etc., which are not limited here. In addition, the processor 60 can also be called a CPU (Center Processing Unit). The processor 60 may be an integrated circuit chip with signal processing capabilities. The processor 60 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 60 can be implemented by an integrated circuit chip.
[0094] See also Figure 7 , Figure 7 It 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 executed by a processor. When the program instructions 80 are executed by the processor, the method mentioned in any of the above embodiments is implemented.
[0095] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is 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, such as 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.
[0096] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0097] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0098] 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 is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method 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.
[0099] 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 present application specification and drawings, or directly or indirectly used 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: Acquire question information of a target object, and determine at least one query subtask corresponding to the question information; Acquire a target agent matching the query subtask, use the target agent to acquire initial answer information and supplementary information corresponding to the query subtask, and obtain reference answer information corresponding to the query subtask based on the initial answer information and the supplementary information; wherein the supplementary information is obtained based on the initial answer information; Based on the reference answer information corresponding to all the query subtasks, target answer information corresponding to the question information is obtained.
2. The method according to claim 1, characterized in that The obtaining of the question information of the target object and determining at least one query subtask corresponding to the question information includes: Acquire user information matching the target object; and, Acquire first reference knowledge related to the question information from a target database matched by an intelligent analysis model, and acquire second reference knowledge related to the question information from a reference database using the intelligent analysis model; The query subtask is acquired using the intelligent analysis model based on the user information, the first reference knowledge and the second reference knowledge.
3. The method according to claim 2, characterized in that The reference database includes a plurality of knowledge points, at least some of which are matched with each other by association 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 acquiring the association relationships between different reference entities; The reference database is constructed based on the reference entities and the association relationships.
4. The method according to claim 1, characterized in that: The step of acquiring a target agent matching the query subtask, using the target agent to acquire initial answer information and supplementary information corresponding to the query subtask, and obtaining reference answer information corresponding to the query subtask based on the initial answer 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 arrangement 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 reply 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 matching 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 answer information matched by 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, the initial response information is modified by using the target agent to obtain the 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 satisfying a preset output condition, using the revised initial reply information as the reference reply information; In response to the revised initial reply information not satisfying the preset output condition, 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 revisions to the initial reply information reaches a threshold number.
7. 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 answer 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.
8. A question answering system, characterized in that: include: An acquisition module, used 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 used to obtain a target agent matching the query subtask, use the target agent to obtain initial answer information and supplementary information corresponding to the query subtask, and obtain reference answer information corresponding to the query subtask based on the initial answer information and the supplementary information; wherein the supplementary information is obtained based on the initial answer information; The second processing module is used to obtain target answer information corresponding to the question information based on the reference answer information corresponding to all the query subtasks.
9. 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 used to execute the program instructions to implement the method according to any one of claims 1 to 7.
10. 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 7 is implemented.