Question and answer method and device, computer equipment and storage medium

By utilizing cache and proxy applications in the question-answering system, the high cost of using existing artificial intelligence question-answering models is solved, and efficient answer content generation and task response in specific scenarios are achieved.

CN120611010APending Publication Date: 2025-09-09BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410251413.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Existing AI question-answering models consume a lot of time and resources when generating responses and are unable to respond to task requests initiated by users in specific scenarios.

Method used

When receiving the target question content, when determining that the response scenario is a non-preset scenario, the target response content corresponding to the target question content is searched from the cache, and when the response scenario is a preset scenario, the preset large language model is used to call the associated proxy application to perform the task to generate the target response content.

Benefits of technology

It reduces the frequency of using the preset large language model, lowers the cost of use, and can respond to task requests initiated by users in specific scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611010A_ABST
    Figure CN120611010A_ABST
Patent Text Reader

Abstract

The invention relates to a question and answer method and device, computer equipment and a storage medium. The method comprises the following steps: when a reply scene of target question content is a non-preset scene, querying target reply content corresponding to the target question content from a cache and feeding back the target reply content to a target account so as to reduce the use frequency of a preset large language model, thereby reducing the use cost of the preset large language model and improving the user experience. The problem that an existing artificial intelligence question and answer model is high in use cost is solved. And when the reply scene is the preset scene, calling the associated proxy application to execute the task corresponding to the target question content by using the preset large language model, and feeding back the target reply content determined based on the execution result of the task to the target account so as to respond to the task request initiated by the user in the specific scene. The problem that an existing artificial intelligence question and answer model cannot respond to a task request initiated by a user in a specific scene is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a question-answering method, apparatus, computer device, and storage medium. Background Art

[0002] With the development of artificial intelligence (AI) technology, AI question-answering models are being applied to an increasing number of scenarios. These models are used to obtain the required responses, but generating responses consumes significant time and resources, making them expensive. Furthermore, existing AI question-answering models are limited to providing verbal Q&A services and are unable to respond to user-initiated task requests in specific scenarios, such as ordering food or placing orders. Summary of the Invention

[0003] The present application provides a question-answering method, apparatus, computer device, and storage medium to address the problems that existing artificial intelligence question-answering models are expensive to use and cannot respond to task requests initiated by users in specific scenarios.

[0004] In a first aspect, the present application provides a question-answering method, comprising:

[0005] Upon receiving the target question content from the target account, determining a response scenario for the target question content;

[0006] When the response scenario is a non-preset scenario, the target response content corresponding to the target question content is retrieved from the cache and fed back to the target account, wherein the cache stores historical question content initiated by multiple different accounts and historical response content generated by a preset large language model for each of the historical question content;

[0007] When the response scenario is a preset scenario, the preset large language model is used to call the agent application associated with the response scenario to execute the task corresponding to the target question content, and the target response content determined based on the execution result of the task is fed back to the target account.

[0008] In a second aspect, the present application provides a question-answering device, comprising:

[0009] A determination module, configured to determine a response scenario for a target question content upon receiving the target question content from the target account;

[0010] a reply module, configured to, when the reply scenario is a non-preset scenario, retrieve a target reply corresponding to the target question from a cache and feed it back to the target account, wherein the cache stores historical questions initiated by multiple different accounts and historical replies generated by a preset large language model for each of the historical questions;

[0011] A calling module is used to use a preset large language model to call the agent application associated with the response scenario to execute the task corresponding to the target question content when the response scenario is a preset scenario, and to feed back the target response content determined based on the execution result of the task to the target account.

[0012] In a third aspect, the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned question-and-answer method when executing the computer program.

[0013] In a fourth aspect, the present application also provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the above-mentioned question-and-answer method.

[0014] The above-mentioned technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, when receiving the target question content of the target account, determines the reply scenario of the target question content; when the reply scenario is a non-preset scenario, the target reply content corresponding to the target question content is found from the cache and fed back to the target account, wherein the cache stores historical question contents initiated by multiple different accounts, and historical reply contents generated by a preset large language model for each of the historical question contents; when the reply scenario is a preset scenario, the preset large language model is used to call the proxy application associated with the reply scenario to execute the task corresponding to the target question content, and the target reply content determined based on the execution result of the task is fed back to the target account.

[0015] Based on the above method, when the response scenario for the target question content is a non-preset scenario, the target response content corresponding to the target question content is queried from the cache and fed back to the target account, thereby reducing the frequency of use of the preset large language model, thereby reducing the cost of using the preset large language model, and solving the problem of high cost of using existing artificial intelligence question-answering models. And when the response scenario is a preset scenario, the preset large language model is used to call the associated proxy application to perform the task corresponding to the target question content, and the target response content determined based on the execution result of the task is fed back to the target account, thereby responding to the task request initiated by the user in a specific scenario, and solving the problem that the existing artificial intelligence question-answering model cannot respond to the task request initiated by the user in a specific scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0018] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0019] Figure 1 A diagram illustrating an application environment of a question-and-answer method provided in an embodiment of the present application;

[0020] Figure 2 A flowchart of a question-and-answer method provided in an embodiment of the present application;

[0021] Figure 3 A flowchart of a question-and-answer method provided in an embodiment of the present application;

[0022] Figure 4 A flowchart of a question-and-answer method provided in an embodiment of the present application;

[0023] Figure 5 A flowchart of a question-and-answer method provided in an embodiment of the present application;

[0024] Figure 6 A flowchart of a question-and-answer method provided in an embodiment of the present application;

[0025] Figure 7 A flowchart of a question-and-answer method provided in an embodiment of the present application;

[0026] Figure 8 A flowchart of a question-and-answer method provided in an embodiment of the present application;

[0027] Figure 9 A structural block diagram of a question-and-answer device provided in an embodiment of the present application;

[0028] Figure 10 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0030] The disclosure below provides many different embodiments or examples for implementing different configurations of the present invention. To simplify the disclosure of the present invention, the components and configurations of specific examples are described below. Of course, these are merely examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or configurations discussed.

[0031] Figure 1 FIG. 1 is an application environment diagram of a question-answering method in an embodiment. Figure 1 The question-answering method is applied to a question-answering system. The question-answering system includes a terminal 110 and a server 120. Terminal 110 and server 120 are connected via a network. Terminal 110 can be a desktop terminal or a mobile terminal. The mobile terminal can be at least one of a mobile phone, a tablet computer, and a laptop computer. Server 120 can be implemented as a standalone server or a server cluster consisting of multiple servers.

[0032] In one embodiment, Figure 2 A flowchart of a question-answering method in one embodiment is shown in FIG. Figure 2 , provides a question-answering method. This embodiment mainly applies this method to the above Figure 1 Taking the server 120 in the example, the question-answering method specifically includes the following steps:

[0033] Step S2: upon receiving the target question content of the target account, determining the answer scenario of the target question content.

[0034] Specifically, a target account refers to any account that sends a question to server 120 via terminal 110. Server 120 is equipped with a pre-set large language model capable of generating responses based on the question. The target question can indicate a language question and answer (Q&A) or a task execution request (TAK). The language question and answer request is used to request feedback on a response related to the question, while the task execution request is used to request feedback on the task execution result related to the question.

[0035] In step S4, when the response scenario is a non-preset scenario, the target response content corresponding to the target question content will be found in the cache and fed back to the target account, wherein the cache stores historical question contents initiated by multiple different accounts, as well as historical response contents generated by a preset large language model for each of the historical question contents.

[0036] Specifically, when the reply scenario is a non-preset scenario, it means that the target question content indicates the language question and answer content, and the target question content can be processed by itself without calling an external proxy application. The server 120 searches for the target reply content corresponding to the target question content in its cache, and the cache stores historical question contents initiated by multiple different accounts, as well as historical reply contents generated by the preset large language model for the corresponding historical question contents. To search for the target reply content corresponding to the target question content in the cache, the cache is first searched for historical question contents that match the target question contents to determine whether the preset large language model has processed the same or similar question contents in the past. If historical question contents that match the target question contents are found, it means that the preset large language model has processed question contents that are the same or similar to the target question contents. The target reply contents retrieved in the cache can be directly fed back to the target account. There is no need to reuse the preset large language model to generate corresponding reply contents for the processed target question contents, which can reduce the frequency of use of the preset large language model.

[0037] The preset large language model may specifically adopt any type of large language model (LLM), such as ChatGLM-6B, MOSS, Linly-Chinese-LLaMA, ChatYuan, and the like.

[0038] Step S6, when the response scenario is a preset scenario, the preset large language model is used to call the agent application associated with the response scenario to execute the task corresponding to the target question content, and the target response content determined based on the execution result of the task is fed back to the target account.

[0039] Specifically, the response scenario is a preset scenario, indicating that the preset large language model needs to call an external proxy application to assist in processing the target question content. The preset scenario can specifically be a food ordering scenario, an order placement scenario, or any other scenario that requires calling an external proxy application to complete. In the preset scenario, at least one external proxy application associated with the response scenario is required to complete the corresponding execution function. Based on the execution result of the task, the target response content is determined and fed back to the target account, thereby responding to the task request initiated by the user in the specific scenario.

[0040] In one embodiment, Figure 3As shown, when the response scenario is a preset scenario, the preset large language model is used to call the agent application associated with the response scenario to execute the task corresponding to the target question content, and the target response content determined based on the execution result of the task is fed back to the target account, including:

[0041] Step S61, when the response scenario is a preset scenario, using the preset large language model to perform semantic recognition on the target question content, and determining the response process of the target question content in the response scenario;

[0042] Step S62, splitting the reply process into multiple tasks according to semantics;

[0043] Step S63, determining a corresponding proxy application according to the execution conditions of each task;

[0044] Step S64, calling each of the proxy applications to execute the corresponding tasks, and generating execution results corresponding to each of the tasks;

[0045] Step S65 , determining the target answer content corresponding to the target question content based on the integration of the execution results corresponding to the tasks.

[0046] Specifically, when the response scenario is a preset scenario, the preset large language model is first used to perform semantic recognition on the target question content to generate a response process corresponding to the target question content, and the response process is split into multiple tasks according to the semantics. The execution conditions of each task are used to call the respective applicable agent applications to perform the corresponding tasks. The agent application can be an external agent application or a preset large language model. Different agent applications are used to implement different functions. After using different agent applications to execute their respective corresponding tasks, a final target response content is determined based on the integration of the execution results of the corresponding tasks of each agent application.

[0047] In one embodiment, Figure 4 As shown, after determining the corresponding proxy application according to the execution conditions of each task, the method further includes:

[0048] Step S66, calling the proxy applications corresponding to the tasks in the reply process in sequence, wherein the current proxy application combines the execution results of the previous task adjacent to the current task when executing the current task, and the current proxy application is the proxy application corresponding to any task in the reply process;

[0049] Step S67: The execution result of the final task in the reply process is used as the target reply content.

[0050] Specifically, according to the execution order of each task in the reply process, the proxy application corresponding to each task is called in sequence. In this way, each proxy application can also combine the execution result of the previous task before the current task when executing the corresponding current task, until the execution of the last task in the reply process is completed, which means that the proxy application corresponding to the last task combines the execution results of all previous tasks to execute the last task, and the generated execution result is used as the final target reply content.

[0051] For example, the target question initiated by the user is: I want to run a lightweight application, do not need very good performance, and want an economical virtual machine to save money. Please give suggestions and execute the startup.

[0052] At this point, the preset large language model will combine the models and related characteristics in the knowledge base as the context of the target question to analyze the response process to achieve the target question content. It then splits the response process into the following three tasks:

[0053] The first step involves calling the preset large model. After analysis, the preset large model outputs the specific VM model and specifications (for example, N3, 1c2g). The proxy application at this point is the preset large language model.

[0054] The second step corresponds to calling the external agent application that creates the virtual machine and creating the virtual machine according to the recommended specifications;

[0055] The task corresponding to the third step is to call the external agent application to query the virtual machine, query the virtual machine information (such as uuid, ip address) of the created virtual machine, and feed back the queried virtual machine information as the final target reply content to the user.

[0056] In one embodiment, Figure 5 As shown, the process of finding the historical answer content corresponding to the target question content from the cache as the target answer content and feeding it back to the target account includes:

[0057] Step S41, when the target answer content corresponding to the target question content is found in the cache, determining the number of times the target answer content has been answered to the target account;

[0058] Step S42: When the number of responses of the target reply content to the target account is zero, the target reply content is fed back to the target account.

[0059] Specifically, when the target answer content corresponding to the target question content is found in the cache, it means that the preset large language model has answered the target question content, which means that an account has previously initiated a question content that is the same or similar to the target question content, but it is impossible to know whether the target account has previously initiated the same or similar target question content. If the target answer content is directly fed back to the target account, if the target account has previously initiated the same or similar target question content, repeated target answer content will be provided to the target account, which will affect the question-and-answer experience of the user corresponding to the target account for repeatedly receiving the same answer content.

[0060] In order to avoid using the cache to provide the same answer content to the same user when asking the same question multiple times, the number of times the target answer content found from the cache is answered to the target account is determined. If the number of replies is zero, it means that although the preset large language model has generated the target answer content for the target question content, the target answer content has not been fed back to the target account, that is, the target answer content is the first time received by the target account, then the target answer content can be fed back to the target account.

[0061] For example, the target account is account A, and account B has asked a question that is the same or similar to the target question. The preset large language model has generated the corresponding target reply content for the question content and fed back the reply content to account B. When account A again asks the same or similar target question that account B has asked before, although the target reply content is found in the cache, it was previously replied to account B and has not been replied to account A. Therefore, the target reply content in the cache that has been replied to account B can be fed back to account A. This not only reduces the frequency of using the preset large language model, but also ensures that the reply content provided to account A is a reply content that has never been received.

[0062] In one embodiment, Figure 6 As shown, when the target answer content corresponding to the target question content is found in the cache, after determining the number of responses of the target answer content to the target account, the method further includes:

[0063] Step S43: When the number of responses of the target response content to the target account is non-zero, a preset large language model is used to generate a target response content corresponding to the target question content.

[0064] Specifically, if the number of replies of the target reply content to the target account is non-zero, it means that the target account has initiated a question content that is the same or similar to the target question content, and the preset large language model has generated corresponding historical reply content for the question content, and fed back the historical reply content to the target account. Therefore, when the target account initiates the target question content again, the historical reply content found in the cache as the target reply content is the reply content that has already been received by the target account. In order to ensure that even if the same user asks the same question content multiple times, different reply contents can be fed back, and the preset large language model has the function of regenerating answers, the preset large language model is used to regenerate a new reply content for the target question content as the target reply content. The new target reply content and the historical reply content for the same question content in the cache may have changed in reply method and / or reply content. The reply method includes text reply, graphic reply, voice reply, video reply, etc., and the reply content includes component characters, character styles, etc.

[0065] In the previous example, account B initiates the target question again. Since the preset large language model has already answered account B for the target question, the target reply content stored in the cache is the reply content that account B has already received. Therefore, the number of replies of the target reply content to account B at this time is non-zero. The preset large language model is then reused to generate a new reply content for the target question as the target reply content, thereby avoiding feedback of the same result to the same user when the same question is asked multiple times.

[0066] In one embodiment, Figure 7 As shown, when the number of responses of the target response content to the target account is non-zero, after generating the target response content corresponding to the target question content using the preset large language model, the method further includes:

[0067] Step S44, storing the target reply content and the target question content in the cache, and establishing a reply relationship between the target reply content and the target account in the cache, wherein the reply relationship is used to indicate that the number of replies of the target reply content to the target account is non-zero.

[0068] Specifically, after the preset large language model regenerates new target reply content for the target question content initiated by the target account, the target reply content and the target question content are also stored in the cache, and the number of times the target reply content replies to the target account is established in the cache, which is equivalent to saving the question record of the target account in the cache. The question record contains the target question content, the target reply content and the account ID of the target account, so as to facilitate the subsequent judgment of the number of times the historical reply content in the cache replies to the question content initiated by different accounts, that is, any historical reply content in the cache can be provided to any account except the account corresponding to the account ID in the question record where it is located. The cache is used to cross-provide historical reply content for different accounts, which can not only reduce the frequency of use of the preset large language model to reduce the cost of using the preset large language model, but also ensure that new reply content is provided to the account.

[0069] In one embodiment, Figure 8 As shown, upon receiving the target question content of the target account, after determining the answer scenario of the target question content, the method further includes:

[0070] Step S5, when the response scenario is a non-preset scenario and the target response content corresponding to the target question content is not found in the cache, the target response content corresponding to the target question content is generated using the preset large language model, wherein the non-preset scenario refers to an application scenario that does not require calling an external proxy application.

[0071] Specifically, when the target answer content corresponding to the target question content is not found in the cache, the preset large language model is used to generate the target answer content corresponding to the target question content. There is no need to use the preset large language model to generate corresponding answer content for each received question content. While ensuring the answer to the target question content, the frequency of using the preset large language model is reduced as much as possible, thereby reducing the cost of using the preset large language model to solve the problem of high cost of using existing artificial intelligence question-answering models.

[0072] Figure 2-Figure 8 FIG. 1 is a flow chart of a question-answering method in one embodiment. It should be understood that although Figure 2-Figure 8 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 2-Figure 8At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0073] In one embodiment, Figure 9 As shown, a question-answering device is provided, comprising:

[0074] A determination module 310 is configured to determine, upon receiving a target question from a target account, a response scenario for the target question;

[0075] A reply module 320 is configured to, when the reply scenario is not a preset scenario, retrieve a target reply corresponding to the target question from a cache and feed it back to the target account, wherein the cache stores historical questions initiated by multiple different accounts and historical replies generated by a preset large language model for each of the historical questions;

[0076] The calling module 330 is used to use the preset large language model to call the agent application associated with the response scenario to execute the task corresponding to the target question content when the response scenario is a preset scenario, and to feed back the target response content determined based on the execution result of the task to the target account.

[0077] In one embodiment, the calling module 330 is further configured to:

[0078] When the response scenario is a preset scenario, the preset large language model is used to perform semantic recognition on the target question content to determine the response process of the target question content in the response scenario;

[0079] Splitting the reply process into multiple tasks according to semantics;

[0080] Determining a corresponding proxy application according to the execution conditions of each of the tasks;

[0081] respectively calling each of the proxy applications to execute the corresponding tasks and generating execution results corresponding to each of the tasks;

[0082] The target answer content corresponding to the target question content is determined based on the integration of the execution results corresponding to the various tasks.

[0083] In one embodiment, the calling module 330 is further configured to:

[0084] Invoke the proxy applications corresponding to the tasks in the reply process in sequence, wherein the current proxy application combines the execution results of the previous task adjacent to the current task when executing the current task, and the current proxy application is the proxy application corresponding to any one of the tasks in the reply process;

[0085] The execution result of the final task in the reply process is used as the target reply content.

[0086] In one embodiment, the reply module 320 is further configured to:

[0087] When the target answer content corresponding to the target question content is found in the cache, determining the number of times the target answer content has been answered to the target account;

[0088] When the number of responses of the target reply content to the target account is zero, the target reply content is fed back to the target account.

[0089] In one embodiment, the reply module 320 is further configured to:

[0090] When the number of responses of the target reply content to the target account is non-zero, a preset large language model is used to generate target reply content corresponding to the target question content.

[0091] In one embodiment, the reply module 320 is further configured to:

[0092] The target reply content and the target question content are stored in the cache, and a reply relationship between the target reply content and the target account is established in the cache, wherein the reply relationship is used to indicate that the number of replies of the target reply content to the target account is non-zero.

[0093] In one embodiment, the reply module 320 is further configured to:

[0094] When the response scenario is a non-preset scenario and the target response content corresponding to the target question content is not found in the cache, the preset large language model is used to generate the target response content corresponding to the target question content, wherein the non-preset scenario refers to an application scenario that does not require calling an external proxy application.

[0095] like Figure 10 As shown, an embodiment of the present application provides a computer device, including a processor 711, a communication interface 712, a memory 713 and a communication bus 714, wherein the processor 711, the communication interface 712, and the memory 713 communicate with each other through the communication bus 714;

[0096] Memory 713, for storing computer programs;

[0097] The processor 711 is configured to implement the question-answering method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 713 .

[0098] Those skilled in the art will understand that Figure 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0099] In one embodiment, the question-answering device provided by the present application can be implemented in the form of a computer program. The computer program can be used in Figure 10 The computer device is run on the computer device shown. The memory of the computer device can store various program modules that constitute the question-answering device, such as, Figure 9 The determination module 310, the reply module 320 and the calling module 330 are shown. The computer program composed of various program modules enables the processor to execute the question-answering method of each embodiment of the present application described in this specification.

[0100] Figure 10 The computer device shown can be Figure 9 The determination module 310 in the question-and-answer device shown determines the answer scenario for the target question content when receiving the target question content of the target account. The computer device can execute, through the answer module 320, when the answer scenario is a non-preset scenario, the target answer content corresponding to the target question content found in the cache is fed back to the target account, wherein the cache stores historical question contents initiated by multiple different accounts, and historical answer contents generated by a preset large language model for each of the historical question contents. The computer device can execute, through the calling module 330, when the answer scenario is a preset scenario, using the preset large language model to call the agent application associated with the answer scenario to execute the task corresponding to the target question content, and feed back the target answer content determined based on the execution result of the task to the target account.

[0101] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the question-and-answer method provided in any of the aforementioned method embodiments is implemented.

[0102] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0103] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, a server 120, or a network device, etc.) to execute the question-and-answer method described in each embodiment or certain parts of the embodiment.

[0104] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "comprise", "include", "contain" and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the specific order described or illustrated, unless the order of execution is clearly indicated. It should also be understood that additional or alternative methods may be used.

[0105] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A question-answering method, characterized in that: The method comprises: Upon receiving the target question content from the target account, determining a response scenario for the target question content; When the response scenario is a non-preset scenario, the target response content corresponding to the target question content is retrieved from the cache and fed back to the target account, wherein the cache stores historical question content initiated by multiple different accounts and historical response content generated by a preset large language model for each of the historical question content; When the response scenario is a preset scenario, the preset large language model is used to call the agent application associated with the response scenario to execute the task corresponding to the target question content, and the target response content determined based on the execution result of the task is fed back to the target account.

2. The question-answering method according to claim 1, wherein: When the response scenario is a preset scenario, the preset large language model is used to call the agent application associated with the response scenario to execute the task corresponding to the target question content, and the target response content determined based on the execution result of the task is fed back to the target account, including: When the response scenario is a preset scenario, the preset large language model is used to perform semantic recognition on the target question content to determine the response process of the target question content in the response scenario; Splitting the reply process into multiple tasks according to semantics; Determining a corresponding proxy application according to the execution conditions of each of the tasks; respectively calling each of the proxy applications to execute the corresponding tasks and generating execution results corresponding to each of the tasks; The target answer content corresponding to the target question content is determined based on the integration of the execution results corresponding to the various tasks.

3. The question-answering method according to claim 2, wherein: After determining the corresponding proxy application according to the execution conditions of each task, the method further includes: Invoke the proxy applications corresponding to the tasks in the reply process in sequence, wherein the current proxy application combines the execution results of the previous task adjacent to the current task when executing the current task, and the current proxy application is the proxy application corresponding to any one of the tasks in the reply process; The execution result of the final task in the reply process is used as the target reply content.

4. The question-answering method according to claim 1, wherein: The process of searching the cache for historical answers corresponding to the target question content and feeding them back to the target account as target answers includes: When the target answer content corresponding to the target question content is found in the cache, determining the number of responses of the target answer content to the target account; When the number of responses of the target reply content to the target account is zero, the target reply content is fed back to the target account.

5. The question-answering method according to claim 4, wherein: When the target answer content corresponding to the target question content is found in the cache, after determining the number of responses of the target answer content to the target account, the method further includes: When the number of responses of the target response content to the target account is non-zero, a preset large language model is used to generate target response content corresponding to the target question content.

6. The question-answering method according to claim 5, wherein: When the number of responses of the target response content to the target account is non-zero, after generating the target response content corresponding to the target question content using a preset large language model, the method further includes: The target reply content and the target question content are stored in the cache, and a reply relationship between the target reply content and the target account is established in the cache, wherein the reply relationship is used to indicate that the number of replies of the target reply content to the target account is non-zero.

7. The question-answering method according to claim 1, wherein: Upon receiving the target question content from the target account, after determining the response scenario for the target question content, the method further includes: When the response scenario is a non-preset scenario and the target response content corresponding to the target question content is not found in the cache, the preset large language model is used to generate the target response content corresponding to the target question content, wherein the non-preset scenario refers to an application scenario that does not require calling an external proxy application.

8. A question-answering device, characterized in that: The device comprises: A determination module, configured to determine a response scenario for a target question content upon receiving the target question content from the target account; a reply module, configured to, when the reply scenario is a non-preset scenario, retrieve a target reply corresponding to the target question from a cache and feed it back to the target account, wherein the cache stores historical questions initiated by multiple different accounts and historical replies generated by a preset large language model for each of the historical questions; A calling module is used to use a preset large language model to call the agent application associated with the response scenario to execute the task corresponding to the target question content when the response scenario is a preset scenario, and to feed back the target response content determined based on the execution result of the task to the target account.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the question-answering method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the question-answering method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method, computer device and computer readable recording medium for providing natural language conversation by timely providing substantial reply

    CN111556999A

  • Intelligent question answering method based on large language model

    CN117033597A

  • Task planning and responding system based on language model

    CN117114249A

  • Dialogue processing method and device based on large language model and electronic equipment

    CN117251552A

  • Question and answer method and device, electronic equipment and medium

    CN117521625A