Response method and device and electronic equipment

By decomposing and processing user requests to generate topology diagrams and determining the answers to the final question, the problem of insufficient efficiency and accuracy of traditional search engines and large language models in response to complex problems is solved, and efficient and accurate response is achieved.

CN120386842AInactive Publication Date: 2025-07-29DARK MATTER ARTIFICIAL INTELLIGENT (BEIJING) TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510450485.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional search engines and large language models are difficult to respond accurately and completely to user problems when processing complex user requests, especially in the in-depth analysis of complex problems and the in-depth analysis of information synthesis.

Method used

By decomposing user requests, a topology diagram is generated to ensure the singularity of the final question, and using the response knowledge base to determine the answer to each final question, ultimately generating response information.

Benefits of technology

Improves response efficiency and accuracy, ensures the accuracy of the final answer and the integrity of the response information, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386842A_ABST
    Figure CN120386842A_ABST
Patent Text Reader

Abstract

The invention discloses a response method and apparatus, and an electronic device. The response method comprises the steps of obtaining a user request; the user request is decomposed, a topological graph is obtained, the topological graph at least comprises a final problem, and the final problem is single; aiming at the topological graph, determining a final answer corresponding to each final question; and generating response information for the user request based on all the final answers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of request processing, and particularly to a response method, apparatus, and electronic device. Background Art

[0002] With the rapid development of information technology, information retrieval has become an indispensable part of people's daily work and study. Traditional search engines (for web search and local knowledge base search) have greatly changed the way of information retrieval, but they usually perform retrieval based on keywords and often have limitations in dealing with complex and ambiguous problem requests from users. Specifically, a user's complex problem cannot be accurately and completely answered through a single search. Even when a large amount of web content and local knowledge base fragments are returned, the key information may be buried in the noise, resulting in an inability to accurately respond to the user's problem.

[0003] Currently, the method of combining a large language model (LLM) with a traditional search engine is adopted to respond to users' problems. Although it can improve the response accuracy to a certain extent, it still cannot guarantee the response accuracy and efficiency in the in-depth analysis and information synthesis of complex problems. Summary of the Invention

[0004] The purpose of the embodiments of this application is to provide a response method, apparatus, and electronic device.

[0005] In a first aspect, the embodiments of this application provide a response method, including:

[0006] Obtain a user request;

[0007] Decompose and process the user request to obtain a topology graph, which at least includes an ultimate problem, and the ultimate problem has singularity;

[0008] For the topology graph, determine the ultimate answer corresponding to each ultimate problem;

[0009] Generate response information for the user request based on all the ultimate answers.

[0010] In a possible implementation, before decomposing and processing the user request to obtain a topology graph, it includes:

[0011] Obtain the context information corresponding to the user request;

[0012] Adjust the user request based on the context information.

[0013] In a possible implementation, there are N nodes between the user request and each of the final questions in the topology graph, and each node corresponds to an intermediate question, where N is greater than or equal to 0.

[0014] In a possible implementation, the decomposing process of the user request to obtain a topology graph includes:

[0015] Using the code interpreter of the first model to generate an intermediate question corresponding to the user request and the pointing information between the user request and the intermediate question;

[0016] Until the final question and the pointing information between the final question and the intermediate question and / or the user request are generated, the topology graph is obtained based on the user request, the intermediate question, and the final question.

[0017] In a possible implementation, determining the final answer corresponding to each final question includes:

[0018] Determining the response knowledge base corresponding to the final question;

[0019] Extracting key information from the final question based on the response knowledge base;

[0020] Processing the key information using the response knowledge base to obtain the final answer corresponding to the final question.

[0021] In a possible implementation, when the final question is a knowledge-based question, the processing the key information using the response knowledge base to obtain the final answer corresponding to the final question includes:

[0022] Using the response knowledge base to perform a search based on the key information to obtain multiple candidate information sources;

[0023] Using the response knowledge base to determine a target information source based on the key information and the candidate information sources, where the target information source is at least one of the candidate information sources;

[0024] Generating the final answer based on the content corresponding to the target information source.

[0025] In a possible implementation, the using the response knowledge base to perform a search based on the key information to obtain multiple candidate information sources includes:

[0026] Using the response knowledge base to perform a search through a network interface based on the key information to obtain network information sources; and

[0027] Retrieve through the local interface based on the key information using the response knowledge base to obtain a local information source.

[0028] In a possible implementation manner, the response method further includes:

[0029] Use the response information to improve the topology map.

[0030] In a second aspect, an embodiment of the present application further provides a response device, including:

[0031] An acquisition module configured to acquire a user request;

[0032] A decomposition module configured to decompose the user request to obtain a topology map, where the topology map includes at least a final question, and the final question has singularity;

[0033] A determination module configured to determine a final answer corresponding to each final question for the topology map;

[0034] A generation module configured to generate response information for the user request based on all the final answers.

[0035] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor and a memory, where the memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through a bus. When the machine-readable instructions are executed by the processor, the steps of the response method described in any one of the above are executed.

[0036] In the embodiments of the present application, the user request is decomposed to obtain a topology map including final questions, and there is at least one final question in the topology map. When there are multiple final questions, the final answers corresponding to each final question can be determined simultaneously to generate response information for the user request, thereby effectively improving the response efficiency; furthermore, the final questions in the topology map have singularity, which can ensure the accuracy of the final answers, that is, can ensure the accuracy of the response information, achieving the purpose of improving the response accuracy. Description of the Drawings

[0037] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0038] Figure 1Shows a flowchart of a response method provided by the present application;

[0039] Figure 2 Shows a flowchart of decomposing a user request to obtain a topology diagram in a response method provided by the present application;

[0040] Figure 3 Shows a topology diagram provided by the present application;

[0041] Figure 4 Shows a flowchart of determining the final answer corresponding to each final question in a response method provided by the present application;

[0042] Figure 5 Shows a flowchart of obtaining the final answer corresponding to the final question in a response method provided by the present application;

[0043] Figure 6 Shows a schematic structural diagram of a response device provided by the present application;

[0044] Figure 7 Shows a schematic structural diagram of an electronic device provided by the present application. Detailed implementation manners

[0045] Reference is made herein to the various solutions and features of the present application with reference to the accompanying drawings.

[0046] It should be understood that various modifications can be made to the embodiments applied herein. Therefore, the above description should not be regarded as a limitation, but only as an example of the embodiments. Those skilled in the art will think of other modifications within the scope and spirit of the present application.

[0047] The accompanying drawings included in the specification and forming a part of the specification show the embodiments of the present application, and together with the general description of the present application given above and the detailed description of the embodiments given below are used to explain the principles of the present application.

[0048] These and other features of the present application will become apparent from the following description of the preferred forms of the embodiments given by way of non - limiting example with reference to the accompanying drawings.

[0049] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art can surely implement many other equivalent forms of the present application, which have the features as described in the claims and thus are all within the protection scope defined thereby.

[0050] When combined with the accompanying drawings, in view of the following detailed description, the above and other aspects, features and advantages of the present application will become more apparent.

[0051] Specific embodiments of the present application will be described hereinafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of the present application and can be implemented in various ways. Well-known and / or repetitive functions and structures are not described in detail to avoid obscuring the present application with unnecessary or redundant details. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but are merely a basis and representative basis for the claims to teach those skilled in the art to use the present application in substantially any suitable detailed structure in a variety of ways.

[0052] This specification may use the phrase "in one embodiment", "in another embodiment", "in yet another embodiment", or "in other embodiments", each of which may refer to one or more of the same or different embodiments according to the present application.

[0053] To facilitate the understanding of the present application, a response method provided by the present application will be introduced in detail first. The embodiments of the present application are described with a processor as the execution subject.

[0054] Figure 1 The flowchart of the response method provided by the embodiments of the present application is shown, where the specific steps include S101 - S104.

[0055] S101, obtain a user request.

[0056] Here, the user requests in the embodiments of the present application are relatively complex and may include query sub - requests, retrieval sub - requests, planning sub - requests, etc. For example, the user request is "adjust the travel plan according to the weather conditions at the destination in the next few days", "query and book air tickets from Guangzhou to Beijing within the next week", etc.

[0057] S102, decompose and process the user request to obtain a topology graph, which at least includes a final problem, and the final problem has singularity.

[0058] After obtaining the user request, decompose and process the user request to obtain one or more final problems, and a topology graph corresponding to the user request can be obtained based on the final problems.

[0059] In a specific implementation, there are N nodes between the user request and each final problem in the topology graph, and each node corresponds to an intermediate problem, where N is greater than or equal to 0. Among them, when decomposing and processing the user request, the decomposed problems may not have singularity and need to be decomposed again until the final problems are obtained. The problem without singularity is the intermediate problem, and the final problem has singularity. Here, singularity means that the problem is clear and definite, and the corresponding answer is standard and unique.

[0060] Optionally, Figure 2A flowchart showing the decomposition of a user request to obtain a topology map is presented. Specifically, the steps include S201 and S202.

[0061] S201, using the code interpreter of the first model, generate an intermediate problem corresponding to the user request and the pointing information between the user request and the intermediate problem.

[0062] S202, until the final problem and the pointing information between the final problem and the intermediate problem and / or the user request are generated, obtain the topology map based on the user request, the intermediate problem, and the final problem.

[0063] In a specific implementation, after obtaining the user request, the user request is transmitted to a pre-trained first model, which is at least used to decompose the user request. Specifically, the first model generates a corresponding code interpreter, and the user request is decomposed through this code interpreter. Among them, the code interpreter can call other programs or tools outside the first model to complete the decomposition of the user request, so that there is no need to decompose the user request inside the first model, thereby reducing the computational workload of the first model and improving the decomposition efficiency, and also reducing the cost of building and training the first model.

[0064] Specifically, use the code interpreter to generate an intermediate problem corresponding to the user request and the pointing information between the user request and the intermediate problem, until the final problem and the pointing information between the final problem and the intermediate problem and / or the user request are generated, so as to obtain the topology map based on the user request, the intermediate problem, and the final problem. Of course, N is greater than 0 in this scenario.

[0065] Refer to Figure 3 Shown in the topology map, the node S in the topology map represents the user request. Use the code interpreter to decompose the node S to obtain nodes 1, 2, and 5. After determining that the problems corresponding to nodes 1 and 2 are the final problems and the problem corresponding to node 5 is the intermediate problem, decompose node 5 again to obtain nodes 3 and 4. After determining that the problems corresponding to nodes 3 and 4 are the final problems, end the decomposition process.

[0066] Figure 3 In the shown topology map, nodes 1, 2, 3, and 4 represent the final problems, and node 5 represents the intermediate node. That is to say, there is no node between the user request and nodes 1 and 2, and there is one node between the user request and nodes 3 and 4.

[0067] Continue to refer to Figure 3, the node S is connected to node 1, node 2, and node 5. When the code interpreter decomposes node S, the pointing information between node S and node 1, node 2, and node 5 can also be obtained. In this example, the pointing information between node S and node 1, node 2, and node 5 is that node S points to node 1, node S points to node 2, and node S points to node 5 respectively. Similarly, when the code interpreter decomposes node 5, the pointing information between node 5 and node 3 and node 4 can also be obtained. In this example, the pointing information between node 5 and node 3 and node 4 is that node 5 points to node 3 and node 5 points to node 4 respectively.

[0068] Of course, Figure 3 the topology graph in

[0069] is only an example, and the topology graph corresponding to each user request is different.

[0070] Optionally, the code interpreter is set with decomposition rules. Based on these decomposition rules, it can be determined whether the generated intermediate problem is the final problem. For example, it can be determined whether the intermediate problem needs to be decomposed again or whether the intermediate problem has singularity. And when the intermediate problem does not need to be decomposed again or the intermediate problem has singularity, the intermediate problem is determined as the final problem, and the decomposition process is stopped, thereby obtaining the topology graph corresponding to the user request.

[0071] The topology graph of the embodiment of the present application is a directed acyclic graph.

[0072] In practical applications, after the user request, intermediate problem, and final problem are processed by the code interpreter, the target model can be used to generate the corresponding topology graph. The embodiment of the present application does not make specific limitations on this, as long as the topology graph corresponding to the user request can be generated.

[0073] Considering the scenario of multi-round conversations, for example, the user has successively determined the first request, description information (the first response information corresponding to the first request), the second request, supplementary information (supplementary description for the second request, etc.), and input them into the first model. When the second request is the user request, before using the code interpreter of the first model to decompose the user request, the context information corresponding to the user request is obtained to analyze the context information, and then based on the context information, the user request is adjusted so that the user request can concisely and clearly express the user's needs, that is, the user request can be accurately obtained, and then the accurate response information can be obtained.

[0074] For example, the user's first request is "What's the weather like in Guangzhou". After obtaining the first response information corresponding to this first request, the user then determines the second request "And what about Beijing". At this time, it is necessary to combine context information such as the first request to determine that the second request is specifically "What's the weather like in Beijing", and then return accurate response information for this second request to ensure the user experience.

[0075] In specific implementation, security detection can also be performed on user requests based on context information. When the user request meets the security detection, the user request is decomposed; when the user request does not meet the security detection, the response to the user request is refused. For example, if the user request involves porn, explosion, or politics, it is determined that the user request does not meet the security detection.

[0076] S103. For the topology graph, determine the final answer corresponding to each final question.

[0077] After obtaining the topology graph corresponding to the user request, for each final question in the topology graph, determine its corresponding final answer. In practical applications, all final questions can be responded to simultaneously to improve the response efficiency. As an example, the topology graph is input into a pre-trained second model to simultaneously identify all final questions in the topology graph and respond to all identified final questions simultaneously.

[0078] Optionally, the answer knowledge base is pre-constructed, and the second model can access this answer knowledge base, so that the second model can determine the final answer corresponding to the final question based on this answer knowledge base.

[0079] S104. Based on all the final answers, generate response information for the user request.

[0080] After obtaining the final answer corresponding to each final question, generate response information for the user request based on all the final answers. Optionally, use a pre-trained information fusion model to fuse all the final answers to obtain response information for the user request. Among them, this response information can respond to the user request completely and clearly, achieving the purpose of improving the response accuracy, and thus improving the user experience.

[0081] And after generating the response information corresponding to the user request, use the response information to improve the topology graph. Continuing to refer to Figure 3 , node e represents the response information for the user request. Since the response information is obtained based on all the final answers, node e is connected to node 1, node 2, node 3, and node 4, and the pointing information between node e and node 1, node 2, node 3, and node 4 is that node 1 points to node e, node 2 points to node e, node 3 points to node e, and node 4 points to node e.

[0082] In the embodiments of the present application, the user request is decomposed to obtain a topology graph including final questions, and there is at least one final question in the topology graph. In the case where there are multiple final questions, the final answers corresponding to each final question can be determined simultaneously to generate response information for the user request, thereby effectively improving the response efficiency. Moreover, the final questions in the topology graph have singularity, which can ensure the accuracy of the final answers, that is, can ensure the accuracy of the response information, achieving the purpose of improving the response accuracy.

[0083] Exemplarily, Figure 4 A flowchart showing how to determine the final answer corresponding to each final question is presented, where the specific steps include S401 - S403.

[0084] S401, determine the response knowledge base corresponding to the final question.

[0085] S402, based on the response knowledge base, extract key information from the final question.

[0086] S403, use the response knowledge base to process the key information to obtain the final answer corresponding to the final question.

[0087] After obtaining the topology graph, further determine the response knowledge base corresponding to the final question in the topology graph. In the embodiments of the present application, different response knowledge bases are set for different types of questions to improve the accuracy of answering the final questions.

[0088] As an example, the response knowledge base set for knowledge - type questions includes a Web knowledge search engine, a local vector knowledge base (for responding to queries based on the user - built document library), and a local knowledge graph (the knowledge graph is suitable for representing complex multi - level knowledge relationships, and by building a knowledge graph, the depth and breadth of user information search can be achieved), etc.; the response knowledge base set for dialogue - type questions includes a calculator, weather query, flight booking, etc. Among them, the calculator can be implemented by calling code, and weather query and flight booking can be implemented by calling external application program interfaces (APIs).

[0089] It should be noted that the response knowledge base can also include other engines, knowledge bases, programs, etc., such as machine translation tools, image processing tools, etc., and external application programs can also be called. Thus, not only can the retrieval efficiency for the final question and the accuracy of the obtained final answer be ensured, but also the application scope of the response method of the present application can be expanded, effectively improving the versatility and flexibility of the response method of the present application.

[0090] Here, when different response knowledge bases respond to questions, the required information is different. Based on this, after obtaining the response knowledge base corresponding to the final question, based on the response knowledge base, the key information is extracted from the final question through the second model. Among them, the response knowledge base can quickly and accurately respond to the corresponding questions according to the key information. For example, the information required by the response knowledge base corresponding to a conversational question includes the departure place, destination, date, etc.

[0091] After extracting the key information, the response knowledge base is used to process the key information to obtain the final answer corresponding to the final question. Specifically, when the final question belongs to a conversational question, the key information of each final question is extracted through the second model, and it is determined whether the key information meets the information required by the response knowledge base. If it meets, based on the response knowledge base and the key information, the final answer corresponding to the final question is generated; if it does not meet, a prompt message is output, and this prompt message is used to prompt the user that other information needs to be supplemented to generate the final answer corresponding to the final question. After obtaining the information supplemented by the user, based on the supplemented information, the response knowledge base, and the key information, the final answer corresponding to the final question is generated.

[0092] Another example is that when the final question belongs to a knowledge-based question, reference can be made to Figure 5 the flowchart shown to obtain the final answer corresponding to the final question, where the specific steps include S501 - S503.

[0093] S501, using the response knowledge base, based on the key information, perform a search to obtain multiple candidate information sources.

[0094] S502, using the response knowledge base, based on the key information and the candidate information sources, determine the target information source, and the target information source is at least one of the candidate information sources.

[0095] S503, based on the content corresponding to the target information source, generate the final answer.

[0096] When the final question belongs to a knowledge-based question, the response knowledge base corresponding to this final question is configured with a Web knowledge search engine, a local vector knowledge base, and a local knowledge graph. Thus, the Web knowledge search engine, the local vector knowledge base, and the local knowledge graph can be used respectively to perform a search based on the key information to obtain multiple candidate information sources.

[0097] Specifically, when performing a search based on the key information to obtain multiple candidate information sources, the Web knowledge search engine included in the response knowledge base is used to perform a search through the network interface based on the key information to obtain network information sources; and the local vector knowledge base or the local knowledge graph included in the response knowledge base is used to perform a search through the local interface based on the key information to obtain local information sources.

[0098] For example, when using a Web knowledge search engine to retrieve based on key information, a certain number of web pages are retrieved by connecting to a network program through a network interface API. The information contained in each web page is summarized to obtain the corresponding network information source for that web page. Through this network information source, the information contained in its corresponding web page can be obtained. When using a local vector knowledge base to retrieve based on key information, a certain number of knowledge bases are retrieved through a local interface for vector indexing. Similarly, the information contained in each knowledge base is summarized to obtain the corresponding local information source for that knowledge base. Through this local information source, the information contained in its corresponding knowledge base can be obtained. When using a local knowledge graph to retrieve based on key information, a certain number of knowledge graph communities can be retrieved through a local interface. The information contained in each knowledge graph community is summarized to obtain the corresponding local information source for that knowledge graph community. Through this local information source, the information contained in its corresponding knowledge graph community can be obtained.

[0099] After obtaining multiple candidate information sources (network information sources and / or local information sources), the response knowledge base is used again to determine the target information source based on the key information and the candidate information sources. The target information source is at least one of the candidate information sources.

[0100] After that, a final answer is generated based on the content corresponding to the target information source. Optionally, according to logical rules, semantic rules, etc., the content corresponding to the target information source is arranged and connected by a second model to generate the final answer. For example, if the target information source includes a network information source, the information contained in the web page corresponding to the network information source is obtained to generate the final answer. If the target information source includes a local information source, the information contained in the knowledge base corresponding to the local information source and / or the information contained in the knowledge graph community is obtained. Any of the information contained in the web page, the information contained in the knowledge base, and the information contained in the knowledge graph community is summarized and a context relationship is formed to obtain the final answer.

[0101] In the embodiment of the present application, all final questions are simultaneously responded to through a topology graph, and response information for the user request is generated based on all the final answers. This not only improves the retrieval efficiency for the final questions but also improves the integration efficiency of all the final answers, thereby achieving the purpose of quickly and accurately responding to the user request. Moreover, through the topology graph principle, the final questions corresponding to the user request are obtained to generate final answers for the final questions. The data volume of each final answer is smaller than the data volume of the response information for the user request, thus effectively avoiding the problem of decreased response efficiency caused by information overload.

[0102] The following shows three examples

[0103] The first example

[0104] The request determined by the user through the interaction device is: to help plan a trip and adjust the travel plan according to the weather conditions at the destination in the next few days. After obtaining the above request, the processor decomposes and processes the request, breaking the problem down into two final problems: "travel destination query" and "weather conditions in the next few days". Then, it calls an external weather query tool to retrieve the weather conditions at the destination in the next few days, and searches for tourist attractions, hotels, and maps of the destination through a Web knowledge search engine. After obtaining the weather data, tourist attractions, hotels, and maps, it plans the travel plan based on the weather data, tourist attractions, hotels, and maps, so that the processor can feedback the complete travel plan to the user.

[0105] Second example

[0106] The request determined by the user through the interaction device is: to query and book a flight ticket from Guangzhou to Beijing within the next week. After obtaining the above request, the processor decomposes and processes the request, breaking the problem down into "searching for flight information from Guangzhou to Beijing" and "ticket booking". Then, it calls the flight ticket query API and searches for recent flight information, analyzes the fares and times of different flights, and finally filters out the most suitable flight and guides the user to complete the booking process.

[0107] Third example

[0108] The request determined by the user through the interaction device is: to search for and integrate the latest research results on quantum computing. After obtaining the above request, the processor decomposes and processes the request, breaking the problem down into "searching for the basic theory of quantum computing", "retrieving recent papers", and "analyzing future development trends". Then, it calls external academic resources and knowledge graphs for retrieval to obtain multiple candidate information sources, further filters the multiple candidate information sources to obtain the target information source, and finally generates a complete report based on the content corresponding to the target information source.

[0109] Based on the same inventive concept, the second aspect of the present application further provides a response device corresponding to the response method. Since the principle of solving problems by the response device in the present application is similar to the above response method of the present application, the implementation of the response device can refer to the implementation of the method, and the repeated parts will not be described again.

[0110] Figure 6 The structural schematic diagram of the response device provided by the embodiment of the present application is shown, specifically including:

[0111] An obtaining module 601, configured to obtain a user request;

[0112] A decomposing module 602, configured to decompose and process the user request to obtain a topology graph, where the topology graph at least includes final problems, and the final problems have singularity;

[0113] A determination module 603, configured to determine, for the topology graph, a final answer corresponding to each of the final questions;

[0114] A generation module 604, configured to generate response information for the user request based on all the final answers.

[0115] In another example, the response device further includes an adjustment module 605, configured to:

[0116] Obtain context information corresponding to the user request;

[0117] Adjust the user request based on the context information.

[0118] In another example, there are N nodes between the user request and each of the final questions in the topology graph, and each node corresponds to an intermediate question, where N is greater than or equal to 0.

[0119] In another example, the decomposition module 602 is specifically configured to:

[0120] Use the code interpreter of the first model to generate intermediate questions corresponding to the user request and pointing information between the user request and the intermediate questions;

[0121] Until the final questions and the pointing information between the final questions and the intermediate questions and / or the user request are generated, the topology graph is obtained based on the user request, the intermediate questions, and the final questions.

[0122] In another example, the determination module 603 is specifically configured to:

[0123] Determine a response knowledge base corresponding to the final question;

[0124] Extract key information from the final question based on the response knowledge base;

[0125] Process the key information using the response knowledge base to obtain the final answer corresponding to the final question.

[0126] In another example, when the final question belongs to a knowledge-based question, the determination module 603 is further configured to:

[0127] Use the response knowledge base to perform a search based on the key information to obtain multiple candidate information sources;

[0128] Use the response knowledge base to determine a target information source based on the key information and the candidate information sources, where the target information source is at least one of the candidate information sources;

[0129] Generate the final answer based on the content corresponding to the target information source.

[0130] In another example, the determining module 603 is further configured to:

[0131] Use the response knowledge base to retrieve through a network interface based on the key information to obtain a network information source; and

[0132] Use the response knowledge base to retrieve through a local interface based on the key information to obtain a local information source.

[0133] In another example, the response device further includes a refinement module 606, which is configured to:

[0134] Use the response information to refine the topology diagram.

[0135] In the embodiments of the present application, the user request is decomposed to obtain a topology diagram including the final question, and there is at least one final question in the topology diagram. In the case where there are multiple final questions, the final answer corresponding to each final question can be determined simultaneously to generate the response information for the user request, thereby effectively improving the response efficiency; furthermore, the final questions in the topology diagram have singularity, which can ensure the accuracy of the final answer, that is, it can ensure the accuracy of the response information, achieving the purpose of improving the response accuracy.

[0136] The embodiments of the present application provide a storage medium, which is a computer-readable medium and stores a computer program. When the computer program is executed by a processor, it implements the method provided in any embodiment of the present application, including the following steps S11 to S14:

[0137] S11, obtain a user request;

[0138] S12, decompose the user request to obtain a topology diagram, which at least includes a final question, and the final question has singularity;

[0139] S13, for the topology diagram, determine the final answer corresponding to each final question;

[0140] S14, generate the response information for the user request based on all the final answers.

[0141] The embodiments of the present application provide an electronic device, and the structural schematic diagram of the electronic device can be as Figure 7As shown, it at least includes a memory 701 and a processor 702. A computer program is stored on the memory 701. When the processor 702 executes the computer program on the memory 701, the method provided by any embodiment of the present application is implemented. Exemplarily, the computer program steps of the electronic device are as follows from S21 to S24:

[0142] S21, obtain a user request;

[0143] S22, decompose and process the user request to obtain a topology graph, which at least includes a final problem, and the final problem has singularity;

[0144] S23, for the topology graph, determine the final answer corresponding to each final problem;

[0145] S24, generate response information for the user request based on all the final answers.

[0146] In the embodiment of the present application, the user request is decomposed and processed to obtain a topology graph including final problems. And there is at least one final problem in the topology graph. In the case of multiple final problems, the final answers corresponding to each final problem can be determined simultaneously to generate response information for the user request, thereby effectively improving the response efficiency. Moreover, the final problems in the topology graph have singularity, which can ensure the accuracy of the final answers, that is, can ensure the accuracy of the response information, achieving the purpose of improving the response accuracy.

[0147] Optionally, in this embodiment, the above storage medium may include but is not limited to: USB flash drive, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disc and other media that can store program codes. Optionally, in this embodiment, the processor executes the method steps described in the above embodiment according to the program codes stored in the storage medium. Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiment and optional implementation manners, and will not be repeated here. Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately made into individual integrated circuit modules, or multiple of them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.

[0148] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application that have equivalent elements, modifications, omissions, combinations (e.g., schemes that cross various embodiments), adaptations, or alterations. The elements in the claims will be construed broadly based on the language employed in the claims and are not limited to the examples described in this specification or during the implementation of the present application, and the examples will be construed as non-exclusive. Thus, this specification and the examples are intended to be considered only as examples, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.

[0149] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of their aspects) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. Additionally, in the above detailed description, various features can be grouped together to simplify the present application. This should not be construed as an intention that the disclosed features not claimed are necessary for any claim. On the contrary, the subject matter of the present application can be less than all the features of a particular disclosed embodiment. Thus, the following claims are incorporated herein as examples or embodiments into the detailed description, where each claim stands alone as a separate embodiment, and it is contemplated that these embodiments can be combined with each other in various combinations or permutations. The scope of the present application should be determined with reference to the appended claims and the full scope of the equivalent forms empowered by these claims.

[0150] The above has described in detail multiple embodiments of the present application, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope claimed by the present application.

Claims

1. A response method, characterized in that, including: Obtain a user request; Perform decomposition processing on the user request to obtain a topology graph, which at least includes a final question, and the final question has singularity; For the topology graph, determine the final answer corresponding to each final question; Based on all the final answers, generate a response message for the user request.

2. The response method according to claim 1, characterized in that, Before performing decomposition processing on the user request to obtain a topology graph, it includes: Obtain the context information corresponding to the user request; Based on the context information, adjust the user request.

3. The response method according to claim 1 or 2, characterized in that, There are N nodes between the user request and each final question in the topology graph, and each node corresponds to an intermediate question, where N is greater than or equal to 0.

4. The response method according to claim 3, wherein The performing decomposition processing on the user request to obtain a topology graph includes: Use the code interpreter of the first model to generate the intermediate questions corresponding to the user request and the pointing information between the user request and the intermediate questions; Until the final questions and the pointing information between the final questions and the intermediate questions and / or the user request are generated, obtain the topology graph based on the user request, the intermediate questions, and the final questions.

5. The response method according to claim 1, wherein Determining the final answer corresponding to each final question includes: Determine the response knowledge base corresponding to the final question; Based on the response knowledge base, extract key information from the final question; Use the response knowledge base to process the key information to obtain the final answer corresponding to the final question.

6. The response method according to claim 5, wherein In the case where the final question is a knowledge-based question, the using the response knowledge base to process the key information to obtain the final answer corresponding to the final question includes: Use the response knowledge base to perform a search based on the key information to obtain multiple candidate information sources; Use the response knowledge base to determine a target information source based on the key information and the candidate information sources, and the target information source is at least one of the candidate information sources; Generate the final answer based on the content corresponding to the target information source.

7. The response method according to claim 6, characterized in that The using the response knowledge base to perform a search based on the key information to obtain multiple candidate information sources includes: Use the response knowledge base to perform a search through a network interface based on the key information to obtain network information sources; and Use the response knowledge base to perform a search through a local interface based on the key information to obtain local information sources.

8. The response method according to claim 1, wherein It also includes: Use the response information to improve the topology graph.

9. A response device, characterized in that, including: An acquisition module configured to obtain a user request; A decomposition module configured to perform decomposition processing on the user request to obtain a topology graph, which at least includes a final question, and the final question has singularity; A determination module configured to determine the final answer corresponding to each final question for the topology graph; A generation module configured to generate a response message for the user request based on all the final answers.

10. An electronic device, characterized in that, including: A processor and a memory, the memory storing machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via a bus. When the machine-readable instructions are executed by the processor, the steps of the response method according to any one of claims 1 to 8 are performed.