Question and answer method and device based on large model, computer equipment and storage medium

By filtering out target plugins with high matching degree from the large model, the problem of low efficiency when the large model processes multiple plugins is solved, and fast and accurate question answering is achieved.

CN121009170APending Publication Date: 2025-11-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511121481.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Large models need to process a lot of plugin description information when calling multiple plugins, resulting in low problem-solving efficiency.

Method used

By using search terms related to candidate plugins based on the input question and the large model, target plugins that meet the matching criteria are selected. Service data is obtained by calling the service interface of the target plugins and then processed by the large model to output the answer.

Benefits of technology

It improves the efficiency and accuracy of problem handling, reduces reliance on plugin description information, and quickly and accurately filters out target plugins to obtain relevant service data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121009170A_ABST
    Figure CN121009170A_ABST
Patent Text Reader

Abstract

The invention provides a question answering method and device based on a large model, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps that at least one target plug-in is determined from a plurality of candidate plug-ins based on input questions and search words of the candidate plug-ins associated with a large model, and the search word of each candidate plug-in is used for indicating question features used for requesting corresponding services; the matching degree between the search word of the at least one target plug-in and the question meets a matching condition; based on the at least one target plug-in, calling a service interface of a service corresponding to the at least one target plug-in, and based on the service interface corresponding to the at least one target plug-in, obtaining service data from a server side corresponding to the at least one target plug-in; and processing the service data corresponding to the at least one target plug-in through the large model to obtain an answer to the question, and outputting the answer. According to the method, the problem processing efficiency is improved on the basis of ensuring that the large model can accurately process the problem.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to a large model-based question and answer method and device, computer equipment and a storage medium. BACKGROUND

[0002] With the development of computer technology, more and more large models have emerged, and people are increasingly accustomed to querying the answers to various questions through dialogue with large models. For example, querying the weather, querying nearby food, or querying tickets, etc. How to ensure the accuracy of the large model's reply is a focus of research in the field.

[0003] At present, the large model is usually pre-connected to the APIs (Application Programming Interface, application programming interface) of various services (such as weather services, map services), and plugins are created for the APIs of various services, so that the large model can call the APIs through the plugins to obtain relevant service data to answer the user's question. Among them, the large model usually adopts a "one-step-at-a-time" approach to obtain service data, that is, the large model will filter out the plugin that can solve the demand from all plugins to call and obtain service data when it analyzes a demand from the question.

[0004] However, in the above technical solution, every time the large model calls the plugin, it needs to input the description information (such as plugin name, function description, parameter description, etc.) of all plugins to the large model, so that the large model can determine the plugin to be called. If the large model is associated with many plugins, the more description information of the plugins that the large model needs to process, the lower the problem processing efficiency. SUMMARY

[0005] The embodiments of the present application provide a large model-based question and answer method, device, computer equipment and storage medium, which improves the problem processing efficiency on the basis of ensuring that the large model can accurately process the problem. The technical solution is as follows:

[0006] On the one hand, a large model-based question and answer method is provided, which comprises:

[0007] Based on the input question and the search terms of the plurality of candidate plugins associated with the large model, at least one target plugin is determined from the plurality of candidate plugins, different candidate plugins correspond to different services, each candidate plugin is used to instruct the large model to call a service interface of a corresponding service to request service data, and the search term of each candidate plugin is used to indicate a question feature for requesting the corresponding service, and the matching degree between the search term of the at least one target plugin and the question satisfies a matching condition;

[0008] The calling module is configured to: based on the at least one target plug-in, call a service interface of a service corresponding to the at least one target plug-in; and based on the service interface corresponding to the at least one target plug-in, obtain service data from a service end corresponding to the at least one target plug-in.

[0009] The processing module is configured to: process, by using a large model, the service data corresponding to the at least one target plug-in, to obtain an answer to the question, and output the answer.

[0010] In another aspect, a large model-based question answering device is provided, and the device comprises:

[0011] The determining module is configured to: based on a search term of a plurality of candidate plug-ins associated with a large model and a question input, determine at least one target plug-in from the plurality of candidate plug-ins, different candidate plug-ins correspond to different services, each candidate plug-in is used to instruct the large model to call a service interface of a corresponding service to request service data, the search term of each candidate plug-in is used to indicate a question feature used to request a corresponding service, and a matching degree between the search term of the at least one target plug-in and the question satisfies a matching condition.

[0012] The calling module is configured to: based on the at least one target plug-in, call a service interface of a service corresponding to the at least one target plug-in; and based on the service interface corresponding to the at least one target plug-in, obtain service data from a service end corresponding to the at least one target plug-in.

[0013] The processing module is configured to: process, by using a large model, the service data corresponding to the at least one target plug-in, to obtain an answer to the question, and output the answer.

[0014] In some embodiments, the determining module comprises:

[0015] The first determining unit is configured to: for any candidate plug-in in the plurality of candidate plug-ins, based on the question and a search term of the candidate plug-in, determine a matching degree between the question and the search term of the candidate plug-in.

[0016] The second determining unit is configured to: from a plurality of candidate plug-ins in a preset number of candidate plug-ins ranked in a high-to-low order according to the matching degree, determine the at least one target plug-in.

[0017] In some embodiments, the search term of each candidate plug-in has a plurality of search terms.

[0018] The first determining unit is configured to: for any search term of any candidate plug-in in the plurality of candidate plug-ins, based on a feature vector of the question and a feature vector of the search term, calculate a similarity between the question and the search term; and based on the similarities corresponding to the plurality of search terms of the candidate plug-in, determine a matching degree between the question and the search terms of the candidate plug-in.

[0019] In some embodiments, the first determining unit is configured to perform any one of the following:

[0020] For any candidate plugin in the plurality of candidate plugins, a maximum similarity in the similarities corresponding to the plurality of search terms of the candidate plugin is determined as a matching degree between the question and the search terms of the candidate plugin.

[0021] For any candidate plugin in the plurality of candidate plugins, the similarities corresponding to the plurality of search terms of the candidate plugin are summed to obtain a matching degree between the question and the search terms of the candidate plugin.

[0022] In some embodiments, the second determining unit is configured to predict the at least one target plugin based on the question and description information of a preset number of candidate plugins ranked in the front, by using a first screening model, wherein the description information of each candidate plugin is used to represent a function and a calling manner of the candidate plugin.

[0023] The first screening model is trained based on a sample question, description information of a plurality of sample plugins, and a reference plugin, wherein the reference plugin is a plugin in the plurality of sample plugins that can accurately reply to the sample question, and the trained first screening model is used to screen a plugin that can solve a question from a plurality of candidate plugins.

[0024] In some embodiments, the second determining unit is configured to determine at least one additional condition matched with the question based on the question, wherein the at least one additional condition is used to indicate a constraint condition for the large model to reply to the question; and determine the at least one target plugin based on the question, description information of a preset number of candidate plugins ranked in the front, and the at least one additional condition, wherein the description information of each candidate plugin is used to represent a function and a calling manner of the candidate plugin.

[0025] In some embodiments, the second determining unit is configured to determine a similarity between the question and each candidate condition based on a feature vector of the question and a feature vector of a plurality of candidate conditions; and determine at least one additional condition that satisfies a similarity condition from the plurality of candidate conditions.

[0026] In some embodiments, the second determining unit is configured to predict the at least one target plugin based on the question, description information of a preset number of candidate plugins ranked in the front, and the at least one additional condition, by using a second screening model.

[0027] The second screening model is trained based on a sample question, description information of a plurality of sample plug-ins, a sample additional condition, and a reference plug-in, the reference plug-in being a plug-in that can accurately reply to the sample question in the plurality of sample plug-ins, and the second screening model after training is used to screen a plug-in that can solve a question from a plurality of candidate plug-ins.

[0028] In some embodiments, the apparatus further includes:

[0029] The prediction module is configured to predict, by the second screening model, slot information of the at least one target plug-in based on the question, description information of a preset number of candidate plug-ins ranked in the front, and the at least one additional condition, the slot information of each target plug-in being used to indicate key information queried from a server corresponding to the target plug-in.

[0030] In some embodiments, after obtaining service data from the server corresponding to the at least one target plug-in, the apparatus further includes:

[0031] The filtering module is configured to filter, based on the question, the service data corresponding to the at least one target plug-in to obtain target data corresponding to the at least one target plug-in, the target data and the question satisfying a relevant condition in terms of an association degree, the association degree being used to represent a relevance between the target data and the question.

[0032] The processing module is configured to process, by the large model, the target data corresponding to the at least one target plug-in to obtain an answer to the question.

[0033] In another aspect, a computer device is provided, which includes a processor and a memory, the memory being used to store at least one piece of computer program, the at least one piece of computer program being loaded and executed by the processor to implement the large model-based question and answer method in the embodiments of the present application.

[0034] In another aspect, a computer readable storage medium is provided, which stores at least one piece of computer program, the at least one piece of computer program being loaded and executed by a processor to implement the large model-based question and answer method in the embodiments of the present application.

[0035] In another aspect, a computer program product is provided, which includes a computer program, the computer program code being stored in a computer readable storage medium, a processor of a computer device reading the computer program from the computer readable storage medium, and the processor executing the computer program to enable the computer device to perform the large model-based question and answer method provided in the various aspects or various optional implementations of the aspects.

[0036] The embodiment of the application provides a large model-based question and answer method, in the process of question and answer through a large model, at least one target plug-in capable of replying to a question can be screened from a plurality of candidate plug-ins associated with the large model based on the retrieval word of the candidate plug-in associated with the large model and the input question, since the number of the retrieval word of the plug-in is smaller than the description information of the plug-in, and the retrieval word can indicate the question characteristics for requesting the corresponding service, at least one target plug-in can be screened quickly and accurately, then, the corresponding service interface can be called through the at least one target plug-in to request related service data to reply to the question accurately, on the basis of guaranteeing that the large model can accurately process the question, the question processing efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0038] Figure 1 It is an implementation environment schematic diagram of a large model-based question and answer method provided by the embodiment of the application;

[0039] Figure 2 It is a flowchart of a large model-based question and answer method provided by the embodiment of the application;

[0040] Figure 3 It is a flowchart of another large model-based question and answer method provided by the embodiment of the application;

[0041] Figure 4 It is a schematic diagram of screening a plug-in provided by the embodiment of the application;

[0042] Figure 5 It is a schematic diagram of an additional condition provided by the embodiment of the application;

[0043] Figure 6 It is an architecture diagram of a large model-based question and answer provided by the embodiment of the application;

[0044] Figure 7 It is a block diagram of a large model-based question and answer device provided by the embodiment of the application;

[0045] Figure 8 It is a structural block diagram of a terminal provided by the embodiment of the application;

[0046] Figure 9 It is a structural schematic diagram of a server provided by the embodiment of the application. DETAILED DESCRIPTION

[0047] For the purposes of the present application, the technical solutions and advantages will be more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.

[0048] The terms "first", "second" and the like in the present application are used to distinguish the same items or similar items with substantially the same function, and it should be understood that there is no logical or time sequence between "first", "second", "nth", and the number and execution order are not limited.

[0049] The term "at least one" in the present application means one or more, and the meaning of "multiple" is two or more.

[0050] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant national and regional laws, regulations and standards. For example, the problems, plug-ins, plug-in search terms and service data involved in the present application are obtained under sufficient authorization.

[0051] The question and answer method based on a large model provided by the embodiments of the present application can be executed by a computer device. In some embodiments, the computer device is a terminal or a server. First, taking the computer device as a server as an example, the implementation environment of the question and answer method based on a large model provided by the embodiments of the present application will be introduced, Figure 1 is an implementation environment schematic diagram of a question and answer method based on a large model according to the embodiments of the present application. Referring to Figure 1 , the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.

[0052] In some embodiments, the terminal 101 is a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, a vehicle terminal, etc., but is not limited thereto. The terminal 101 runs an application program supporting intelligent question answering. The application program can be a smart assistant, a browser, a social application program, or a multimedia application program, etc., and the embodiments of the present application do not limit this. Illustratively, the terminal 101 is a terminal used by a user. The user can log in to the application program through the terminal 101 to obtain the services provided by the application program. For example, the user can input a question to be queried by himself in the above-mentioned application program, and then the terminal 101 sends the question to the server 102, which answers the question through a large model. Then, the server 102 returns the answer to the terminal 101, and the terminal 101 displays the answer to the user for viewing.

[0053] Those skilled in the art can know that the number of the above-mentioned terminals can be more or less. For example, the above-mentioned terminals can be only one, or the above-mentioned terminals can be dozens or hundreds, or more. The number of terminals and the type of equipment are not limited in the embodiments of the present application.

[0054] In some embodiments, the server 102 is an independent physical server, and can also be a server cluster or a distributed system composed of multiple physical servers, and can also be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), big data and artificial intelligence platforms, and other basic cloud computing services. The server 102 is used to provide background services for the application program supporting intelligent question answering. In some embodiments, the server 102 undertakes the main computing work, and the terminal 101 undertakes the secondary computing work; or the server 102 undertakes the secondary computing work, and the terminal 101 undertakes the main computing work; or the server 102 and the terminal 101 cooperatively compute in a distributed computing architecture.

[0055] Figure 2 is a flowchart of a large model-based question answering method according to an embodiment of the present application, see Figure 2 In the embodiments of the present application, a server is taken as an example for illustration. The large model-based question answering method includes the following steps:

[0056] 201. Based on the input question and the search terms of multiple candidate plugins associated with the large model, the server determines at least one target plugin from the multiple candidate plugins. Different candidate plugins correspond to different services. Each candidate plugin is used to instruct the large model to call the service interface of the corresponding service to request service data. The search terms of each candidate plugin are used to indicate the question features used to request the corresponding service. The matching degree between the search terms of at least one target plugin and the question satisfies the matching condition.

[0057] In this embodiment, the large model refers to a large language model used to answer questions, and this embodiment does not limit the architecture of the large model. The large model is associated with multiple candidate plugins. Different candidate plugins correspond to different services, such as weather services, location services, or ticketing services, and this embodiment does not impose any limitations on this. During the application of the large model, it can call the service interface of the corresponding service through the candidate plugins to request relevant service data. For example, if the input question involves weather, in this case, the large model can call the service interface corresponding to the weather service through the candidate plugin corresponding to the weather service to obtain weather service data from the service provider. Then, the large model can generate an answer to the question based on the weather service data.

[0058] The large model has multiple candidate plugins. Before obtaining relevant service data through the plugins, the server can filter the multiple candidate plugins of the large model to select the target plugin that can solve the input problem, and then directly call the service interface corresponding to the target plugin to request the relevant service data.

[0059] Each candidate plugin corresponds to a search term. The search term for each candidate plugin reflects the characteristics of the question used to request the service corresponding to that plugin. For example, the search term for a candidate plugin for a weather service is "weather." During the selection of target plugins, for any candidate plugin associated with the large model, the server processes the input question and the candidate plugin's search term to determine the degree of matching between the candidate plugin's search term and the question. Then, the server selects at least one target plugin from the multiple candidate plugins that meets the matching criteria.

[0060] The matching condition can be that the matching degree reaches the matching threshold, the matching degree is within the matching range, or the matching degree is in a preset order that is ranked high to low. This application embodiment does not limit the matching condition.

[0061] 202. The server, based on at least one target plugin, calls the service interface of at least one service corresponding to the target plugin, and obtains service data from the server corresponding to at least one target plugin based on the service interface corresponding to the target plugin.

[0062] In the embodiments of the present application, the service interface refers to an API, which is used to indicate a standardized communication protocol provided by an external service, and defines how to programmatically access its functions (such as querying the weather, database operations). The plug-in is a modular component encapsulating the service interface, which is usually pre-configured by the developer, hiding the complex details of the service interface and only exposing a simplified interface to the large model. For any target plug-in in the at least one target plug-in, the server calls the service interface of the service corresponding to the target plug-in based on the target plug-in, and sends a data request (HTTP request) to the server corresponding to the target plug-in through the service interface. Then, the server corresponding to the target plug-in returns the service data to the large model of the server.

[0063] 203、The server processes the service data corresponding to the at least one target plug-in through the large model to obtain the answer to the question, and outputs the answer.

[0064] In the embodiments of the present application, after receiving the service data corresponding to the at least one target plug-in, the server processes the service data corresponding to the at least one target plug-in through the large model to generate the answer to the input question. Then, the server can return the answer to the terminal of the input question. The terminal can display the answer on the interface to show the user.

[0065] For example, the large model is a DeepSeek-V3 model. The DeepSeek-V3 model includes an embedding layer and 61 Transformer layers. The server first inputs the question into the large model, and extracts the features of the question through the embedding layer to obtain a feature vector of the question. Then, the feature vector of the question is input into the 61 Transformer layers, and the feature vector of the question is processed through the 61 Transformer layers to obtain a target function to be called and parameters for calling the function. The target function is used to indicate that at least one target plug-in is selected from a plurality of candidate plug-ins based on the question. Then, the server calls the target function to determine at least one target plug-in from the plurality of candidate plug-ins based on the input question and the keywords associated with the plurality of candidate plug-ins in the large model. Then, the server calls the service interface of the service corresponding to the at least one target plug-in to obtain service data from the server corresponding to the at least one target plug-in. Then, the server inputs the question, the obtained service data, and the target function into the large model again, processes them through the embedding layer in the large model to obtain a feature vector of the question, the obtained service data, and the target function spliced together, and then the feature vector is input into the 61 Transformer layers, and the feature vector is processed through the 61 Transformer layers to obtain the answer to the question.

[0066] The embodiment of the application provides a question and answer method based on a large model. In the process of question and answer through the large model, at least one target plug-in capable of replying to the question can be screened from a plurality of candidate plug-ins associated with the large model based on the search words of the candidate plug-ins associated with the large model and the input question. Since the number of search words of the plug-in is smaller than the description information of the plug-in, and the search words can indicate the question characteristics for requesting the corresponding service, at least one target plug-in can be quickly and accurately screened, then the corresponding service interface can be called through the at least one target plug-in to request the related service data, so that the question can be accurately replied to, the question processing efficiency is improved on the basis of ensuring that the large model can accurately process the question.

[0067] Figure 3 It is another flowchart of a question and answer method based on a large model provided by the embodiment of the application, as shown in Figure 3 The question and answer method based on the large model comprises the following steps:

[0068] 301. For any candidate plug-in of a plurality of candidate plug-ins associated with the large model, the server determines the matching degree between the question and the search words of the candidate plug-in based on the input question and the search words of the candidate plug-in. The search words of each candidate plug-in are used to indicate the question characteristics for requesting the corresponding service.

[0069] In the embodiment of the application, the large model is associated with a plurality of candidate plug-ins. For any candidate plug-in of the plurality of candidate plug-ins, the server calculates the similarity between the question and the search words of the candidate plug-in based on the feature vector (embedding) of the input question and the feature vector (embedding) of the search words of the candidate plug-in, and determines the similarity as the matching degree between the question and the search words of the candidate plug-in.

[0070] The search words of each candidate plug-in can be specified by a person, or can be determined based on the historical questions received by the server corresponding to the candidate plug-in in a historical time period, and the embodiment of the application does not limit this. The server can prestore the feature vectors of the search words of the candidate plug-ins, so that after receiving the question of the user, the feature of the question can be extracted, and the similarity can be calculated based on the feature vector of the question and the feature vectors of the search words of the candidate plug-ins subsequently, the calculation efficiency of the similarity can be improved, and the target plug-in capable of solving the question can be quickly screened.

[0071] In some embodiments, each candidate plugin has multiple search terms. In the process of calculating the matching degree between the question and the search terms of each candidate plugin, for any search term of any candidate plugin in the multiple candidate plugins, the server calculates the similarity between the question and the search term based on the feature vector of the question and the feature vector of the search term. Then, the server determines the matching degree between the question and the search terms of the candidate plugin based on the similarities corresponding to the multiple search terms of the candidate plugin. The scheme provided by the embodiments of the present application determines the matching degree between the question and the search terms of each candidate plugin by calculating the similarity between the question and each search term of each candidate plugin, which can improve the accuracy of the matching degree, thereby providing a guarantee for subsequent screening of the target plugin that can solve the question.

[0072] In the above process of determining the matching degree based on the similarity, the server can determine the maximum similarity as the matching degree, or the server can also aggregate the multiple similarities to determine the matching degree, and the embodiments of the present application do not limit the above manner of determining the matching degree based on the similarity.

[0073] In some embodiments, the server determines the maximum similarity as the matching degree. Accordingly, the process of determining the matching degree between the question and the search terms of the candidate plugin by the server includes: for any candidate plugin in the multiple candidate plugins, the server determines the maximum similarity in the similarities corresponding to the multiple search terms of the candidate plugin as the matching degree between the question and the search terms of the candidate plugin. The scheme provided by the embodiments of the present application determines the maximum similarity as the matching degree between the question and the search terms of the candidate plugin, which can quickly determine the matching degree on the basis of guaranteeing that the matching degree can more accurately reflect the matching condition between the question and the candidate plugin, thereby facilitating the improvement of the question processing efficiency.

[0074] In other embodiments, the server aggregates the multiple similarities to determine the matching degree. Accordingly, the process of determining the matching degree between the question and the search terms of the candidate plugin by the server includes: for any candidate plugin in the multiple candidate plugins, the server sums the similarities corresponding to the multiple search terms of the candidate plugin to obtain the matching degree between the question and the search terms of the candidate plugin. The scheme provided by the embodiments of the present application determines the matching degree between the question and the search terms of the candidate plugin by summing the similarities corresponding to the multiple search terms, so that the matching degree can reflect the matching condition between the question and the candidate plugin from the overall perspective, which is more accurate, thereby providing a guarantee for subsequent screening of the target plugin that can solve the question.

[0075] In the above process of determining the matching degree based on the similarity, the server can determine the maximum similarity as the matching degree, or the server can also aggregate the multiple similarities to determine the matching degree, and the embodiments of the present application do not limit the above manner of determining the matching degree based on the similarity.

[0076] The process of calculating the similarity can be implemented by a neural network model, such as a Two-Tower / Dual-Encoder model, to calculate the similarity between the query and the search terms of each candidate plugin. The embodiments of the present application do not limit this.

[0077] The server can update the search terms of each candidate plugin. The server can periodically update the search terms of each candidate plugin, and the embodiments of the present application do not limit the length of the update period. Alternatively, the server updates the search terms of the candidate plugin based on the word group when it is detected that the word group meets the update condition. For example, for any candidate plugin, if the existing search terms of the candidate plugin contain the word group, and the word group is not detected within a preset time period or a preset number of queries, the server deletes the word group from the search terms of the candidate plugin. If the existing search terms of the candidate plugin do not contain the word group, and the frequency of detection of the word group reaches a preset frequency within a preset time period or a preset number of queries, the server adds the word group to the search terms of the candidate plugin. The embodiments of the present application do not limit the way of updating the search terms.

[0078] 302. The server determines at least one target plugin from the top N candidate plugins in the order of the matching degree from high to low, and the matching degree between the search terms of the at least one target plugin and the query meets the matching condition.

[0079] In the embodiments of the present application, the server can sort the plurality of candidate plugins in the order of the matching degree from high to low, and then determine at least one target plugin from the top N candidate plugins. The embodiments of the present application do not limit the preset number. The server can directly determine the top N candidate plugins as the target plugins. That is, the preset number is the number of target plugins.

[0080] For example, Figure 4 is a schematic diagram of screening a plugin according to an embodiment of the present application. Referring to Figure 4 The server calculates the similarity between the query and the search terms based on the feature vectors of the query and the search terms of each plugin. Then, the server determines the matching degree between the query and the search terms of the candidate plugin based on the similarity corresponding to the plurality of search terms of the candidate plugin. Then, the server screens the top N target plugins with higher matching degrees from the plurality of plugins.

[0081] In some embodiments, the server can further filter the preset number of candidate plugins ranked at the top to determine the at least one target plugin. The embodiments of the present application do not limit the filtering manner. Two filtering manners are exemplarily introduced below, but are by no means limited thereto.

[0082] In a first filtering manner, the server can filter the target plugin through a first filtering model. Accordingly, the server predicts the at least one target plugin based on the question and the description information of the preset number of candidate plugins ranked at the top through the first filtering model. The description information of each candidate plugin is used to represent the function and calling manner of the candidate plugin. The description information of each candidate plugin can include metadata such as the name, function introduction, version and developer of the candidate plugin, and can also include information such as the callable function list (function name, parameter, data structure), calling manner (actual HTTP interface address) and permission, which are not limited by the embodiments of the present application.

[0083] The first filtering model can belong to a Rank model, so as to filter the at least one target plugin with strong relevance to the question from the preset number of candidate plugins. For example, the first filtering model is a 4B dense neural network model trained through an SFT (Supervised Fine-Tuning) manner, and the model input is the question and the preset number of candidate plugins ranked at the top. The first filtering model is trained based on sample questions, description information of a plurality of sample plugins and reference plugins. The reference plugins are the plugins in the plurality of sample plugins that can accurately reply to the sample questions. The trained first filtering model is used to filter the plugins that can solve the question from the plurality of candidate plugins.

[0084] The scheme provided by the embodiments of the present application can further filter the preset number of candidate plugins ranked at the top through the trained first filtering model, so as to more accurately filter the at least one target plugin that can solve the question, thereby providing a guarantee for the subsequent large model to output an accurate answer to the question.

[0085] In the second screening manner, the server can screen the target plug-in through an attachment condition. Accordingly, the server determines at least one attachment condition matched with the question based on the question. Then, the server determines at least one target plug-in based on the question, the description information of the preset number of candidate plug-ins ranked in the front, and the at least one attachment condition, the description information of each candidate plug-in being used to indicate the function and calling manner of the candidate plug-in. The at least one attachment condition is used to indicate the constraint condition for the large model to reply to the question. The attachment condition can be a time condition (such as a holiday) or a location condition (such as nearby), and the present embodiment is not limited thereto. The present embodiment provides a scheme for further screening the preset number of candidate plug-ins ranked in the front through the at least one attachment condition matched with the question, further constraining the condition to be met by the plug-in used subsequently, and more accurately screening at least one target plug-in capable of solving the question, thereby providing a guarantee for the large model to output an accurate answer to the question subsequently.

[0086] In the second screening manner, the server can screen the target plug-in through an attachment condition. Accordingly, the server determines at least one attachment condition matched with the question based on the question. Then, the server determines at least one target plug-in based on the question, the description information of the preset number of candidate plug-ins ranked in the front, and the at least one attachment condition, the description information of each candidate plug-in being used to indicate the function and calling manner of the candidate plug-in. The at least one attachment condition is used to indicate the constraint condition for the large model to reply to the question. The attachment condition can be a time condition (such as a holiday) or a location condition (such as nearby), and the present embodiment is not limited thereto. The present embodiment provides a scheme for further screening the preset number of candidate plug-ins ranked in the front through the at least one attachment condition matched with the question, further constraining the condition to be met by the plug-in used subsequently, and more accurately screening at least one target plug-in capable of solving the question, thereby providing a guarantee for the large model to output an accurate answer to the question subsequently.

[0087] The similarity condition can be that the similarity reaches a similarity threshold, or the similarity is located in a similarity interval, or the similarity is in a preset order located in the front in the descending order, and the present embodiment is not limited thereto.

[0088] The plurality of candidate conditions can be specified by a human being or determined based on historical questions received by the large model in a historical time period, and the present embodiment is not limited thereto. The server can pre-store the feature vectors of the candidate conditions, so that after receiving the question of the user, the server can only perform feature extraction on the question, and subsequently calculate the similarity based on the feature vector of the question and the feature vectors of the candidate conditions, thereby improving the calculation efficiency of the similarity and quickly screening the attachment condition matched with the question.

[0089] For example, Figure 5 is a schematic diagram of an attachment condition according to the present embodiment. Referring toFigure 5 The server calculates the similarity between the question and the conditions through the feature vectors of the question and the feature vectors of the respective conditions. Then, the server screens a preset number (N) of additional plugins with high similarity from the plurality of conditions.

[0090] In the process of screening the target plugin through the additional conditions, the server can be implemented through a second screening model. That is, the server predicts at least one target plugin based on the question, the description information of the plurality of candidate plugins ranked in the front in a preset number, and the at least one additional condition through the second screening model. The second screening model is trained based on sample questions, description information of a plurality of sample plugins, sample additional conditions, and reference plugins. The reference plugins are the plugins in the plurality of sample plugins that can accurately reply to the sample questions. The trained second screening model is used to screen the plugins that can solve the question from the plurality of candidate plugins. The scheme provided in the embodiments of the present application can further screen the candidate plugins ranked in the front in a preset number through the trained second screening model, and can more accurately screen at least one target plugin that can solve the question, thereby providing a guarantee for the subsequent large model to output an accurate answer to the question.

[0091] In some other embodiments, the server can also predict the slot information of at least one target plugin based on the question, the description information of the plurality of candidate plugins ranked in the front in a preset number, and the at least one additional condition through the second screening model. The slot information of each target plugin is used to indicate the key information queried from the server corresponding to the target plugin. The description information of the plugin refers to the part of the field set in the plugin description information that is specially used to indicate the value that the large model should fill in, which usually appears in the form of JSON Schema, and the core fields include: slot name (name), data type (type), natural language prompt (description, to help the model understand what the slot is), Boolean value (required, to indicate whether it is required), and data format information.

[0092] The second screening model is a function calling model, that is, the second screening model can output a structured JSON (such as {"name":"get_weather","arguments":{"city":"City A"}}) in the question and answer process, and then an external system parses and actually executes the function, and returns the used service data to the large model to continue generating an answer. For example, the second screening model is a Qwen3-30B-A3B model, and the embodiments of the present application do not limit this. The second screening model can be trained by SFT and GRPO (Group Relative Policy Optimization) and the like, and the embodiments of the present application do not limit the training method of the second screening model.

[0093] The above two screening methods can be combined, for example, the server can first screen a plurality of intermediate plug-ins from the preset number of plug-ins at the top of the ranking by the first screening method, and then screen at least one target plug-in from the plurality of intermediate plug-ins by the second screening method, and the embodiments of the present application do not limit this.

[0094] 303. The server invokes the service interface of the service corresponding to the at least one target plug-in based on the at least one target plug-in, and obtains service data from the service end corresponding to the at least one target plug-in based on the service interface corresponding to the at least one target plug-in.

[0095] In the embodiments of the present application, for any target plug-in in the at least one target plug-in, the server invokes the service interface of the service corresponding to the target plug-in based on the target plug-in, and sends a data request (HTTP request) to the service end corresponding to the target plug-in through the service interface. Then, the service end corresponding to the target plug-in returns service data to the large model of the server.

[0096] 304. The server processes the service data corresponding to the at least one target plug-in through the large model to obtain an answer to the question, and outputs the answer.

[0097] In the embodiments of the present application, after receiving the service data corresponding to the at least one target plug-in, the server processes the service data corresponding to the at least one target plug-in through the large model to generate an answer to the input question. Then, the server can return the answer to the terminal of the input question. The terminal can display the answer on the interface to show the user.

[0098] After receiving the service data corresponding to the at least one target plug-in, the server can further filter the service data based on the question, so as to provide the large model with service data capable of solving the question. Accordingly, the server filters the service data corresponding to the at least one target plug-in based on the question, and obtains target data corresponding to the at least one target plug-in. The association degree between the target data and the question meets a related condition, and the association degree is used to represent the relevance between the target data and the question. Then, the server processes the target data corresponding to the at least one target plug-in through the large model, and obtains the answer to the question. The scheme provided in the embodiments of the present application filters the target data with high relevance to the question from the received service data, which is beneficial to improve the accuracy of the large model in processing the question.

[0099] For example, refer to Table 1 below. The first intent accuracy difference is the difference between the accuracy of the model in mapping the user's question to the top-level intent (first intent) of the plug-in and the baseline (or the previous round or manual annotation). The total parameter accuracy difference is the difference between the comprehensive accuracy (average or weighted) of the model in filling all slot parameters and the baseline. The first intent difference is used to indicate whether the plug-in is selected incorrectly; the total parameter difference is used to indicate whether the parameter is filled incorrectly. Both are the difference between the current performance and the baseline performance, and the greater the positive value, the higher the quality improvement.

[0100] Table 1

[0101] Plug-in name Accuracy difference of primary intent Accuracy difference of total input parameters Optimal change SunRiseSunSet - sunrise and sunset +7.69% -5.13% Good Time - calendar +47.89% +47.66% Good Weather - weather +26.05% +12.16% Good Stock - stock 0 0 Good ExchangeRate - exchange rate 0.00% +1.90% Good Flight - flight ticket +11.38% +10.22% Good TouristAttraction - scenic spot +24.83% +6.87% Good Map - map +35.67% +7.23% Good Train - train ticket +14.68% +10.34% Good Hotel - hotel +3.62% -0.59% Good Total +26.58% +9.07% GSB = 10: 0: 0

[0102] As can be seen from Table 1 above, the effect of the present scheme is better than that of the end-to-end plug-in.

[0103] For the train plug-in, the DIFF (difference ratio) between the present scheme and the existing scheme is 33.47% (80 / 239), and the DIFF GSB (Grounded Search Bias) is 23:44:13, and the overall effect is better.

[0104] For the map plug-in, the DIFF between the present scheme and the existing scheme is 60.19% (121 / 201), and the DIFF GSB is 43:52:26, and the overall effect is better.

[0105] For the sunrise and sunset plug-in, the DIFF between the present scheme and the existing scheme is 15.38% (6 / 39), and the DIFF GSB is 3:3:0, and the overall effect is better.

[0106] For the stock plug-in, the DIFF between the present scheme and the existing scheme is 16.38% (19 / 116), and the DIFF GSB is 2:16:1, and the overall effect is better.

[0107] Weather plugin, DIFF between the present scheme and the existing scheme: 20.00% (23 / 115), DIFF GSB: 8:15:0, overall effect is better;

[0108] Air ticket plugin, DIFF between the present scheme and the existing scheme: 41.86% (54 / 129), DIFF GSB: 24:17:13, overall effect is better;

[0109] Exchange rate plugin, DIFF between the present scheme and the existing scheme: 14.96% (17 / 127), DIFF GSB: 5:10:2, overall effect is better;

[0110] Hotel plugin, DIFF between the present scheme and the existing scheme: 32.60% (104 / 319), DIFF GSB: 40:24:40, overall effect is flat;

[0111] Calendar plugin, DIFF between the present scheme and the existing scheme: 26.42% (28 / 106), DIFF GSB: 1:22:5, overall effect is worse;

[0112] Scenic spot plugin, DIFF between the present scheme and the existing scheme: 44.27% (58 / 131), DIFF GSB: 7:41:10, overall effect is worse.

[0113] Among them, GSB divides the results into three categories by comparing the differences between the present scheme and the existing scheme: G (improvement): the present scheme performs better than the existing scheme; S (flat): the present scheme and the existing scheme perform consistently; B (retrogression): the present scheme performs worse than the existing scheme. The proportion of improvement (G), flat (S), and retrogression (B) is calculated. From the above GSB proportion, it can be seen that the corresponding improvement (G) proportion of most plugins is high, and thus it can be seen that for the answers of most plugins corresponding to the service, the present scheme can provide more accurate answers and better effects.

[0114] In order to more clearly describe the method for answering questions based on a large model provided by the embodiments of the present application, the process of answering questions based on a large model is further described below based on the drawings. For example, Figure 6 is an architecture diagram for answering questions based on a large model according to the embodiments of the present application. Referring to Figure 6, the server performs plugin recall based on the input question and the search terms of the plurality of candidate plugins associated with the large model to filter out a preset number of candidate plugins with a high-to-low matching degree from the plurality of candidate plugins, and then filters out a plurality of intermediate plugins from the preset number of candidate plugins through a rank model (a first filtering model). Then, the server filters out at least one target plugin from the plurality of intermediate plugins through a hybrid plugin Function Calling model (a second filtering model) based on at least one additional condition determined from the candidate conditions (external knowledge). Then, the server calls an API of a service corresponding to the at least one target plugin, and obtains service data from a server corresponding to the at least one target plugin based on the API corresponding to the at least one target plugin. Then, the server performs relevance recall on the obtained service data based on the input question to filter out target data strongly related to the question. Then, the server processes the target data corresponding to the at least one target plugin through the large model to obtain an answer to the question.

[0115] The embodiments of the present application provide a large model-based question answering method. In the process of question answering through a large model, at least one target plugin capable of answering a question can be filtered out from a plurality of candidate plugins associated with the large model based on the input question and search terms of the candidate plugins. Since the number of search terms of the plugins is smaller than that of the description information of the plugins, and the search terms can indicate the characteristics of the question for requesting the corresponding service, the at least one target plugin can be quickly and accurately filtered out. Then, the corresponding service interface can be quickly called through the at least one target plugin to request related service data, so as to accurately answer the question. On the basis of ensuring that the large model can accurately process the question, the question processing efficiency is improved.

[0116] In addition, since the plugins can be filtered out before the question is solved, the correlation between the process of generating an answer to the question and the number of plugins associated with the large model is reduced, so that the number of plugins (or accessible service interfaces) associated with the large model can be greatly expanded. That is, on the basis of ensuring the question processing efficiency, the number of services associated with the large model is increased, which is beneficial to improve the performance and applicability of the large model in processing the question.

[0117] Figure 7 is a block diagram of a large model-based question answering device provided by the embodiments of the present application. The large model-based question answering device is used to execute the steps of the above-described large model-based question answering method, and the steps are described in detail with reference to Figure 7 The large model-based question answering device comprises:

[0118] The determining module 701 is configured to determine at least one target plug-in from the plurality of candidate plug-ins based on the input question and the keywords of the plurality of candidate plug-ins associated with the large model, different candidate plug-ins correspond to different services, each candidate plug-in is used to instruct the large model to call a service interface of a corresponding service to request service data, and the keyword of each candidate plug-in is used to indicate a question feature used to request the corresponding service, and a matching degree between the keyword of the at least one target plug-in and the question satisfies a matching condition.

[0119] The calling module 702 is configured to call, based on the at least one target plug-in, the service interface of the corresponding service of the at least one target plug-in, and obtain, based on the service interface of the corresponding service of the at least one target plug-in, the service data from a server of the corresponding service of the at least one target plug-in.

[0120] The processing module 703 is configured to process, by the large model, the service data corresponding to the at least one target plug-in to obtain an answer to the question, and output the answer.

[0121] In some embodiments, the determining module 701 includes:

[0122] The first determining unit is configured to determine, for any candidate plug-in in the plurality of candidate plug-ins, a matching degree between the question and the keyword of the candidate plug-in based on the question and the keyword of the candidate plug-in.

[0123] The second determining unit is configured to determine, from the plurality of candidate plug-ins in a preset number of candidate plug-ins ranked in a high-to-low order according to the matching degrees, the at least one target plug-in.

[0124] In some embodiments, the keyword of each candidate plug-in has a plurality of keywords.

[0125] The first determining unit is configured to, for any keyword of any candidate plug-in in the plurality of candidate plug-ins, calculate a similarity between the question and the keyword based on a feature vector of the question and a feature vector of the keyword, and determine a matching degree between the question and the keyword of the candidate plug-in based on the similarities corresponding to the plurality of keywords of the candidate plug-in.

[0126] In some embodiments, the first determining unit is configured to perform any of the following:

[0127] For any candidate plug-in in the plurality of candidate plug-ins, the maximum similarity in the similarities corresponding to the plurality of keywords of the candidate plug-in is determined as the matching degree between the question and the keyword of the candidate plug-in.

[0128] For any candidate plug-in in the plurality of candidate plug-ins, the similarities corresponding to the plurality of keywords of the candidate plug-in are summed to obtain the matching degree between the question and the keyword of the candidate plug-in.

[0129] In some embodiments, the second determining unit is configured to predict, by using a first screening model, the at least one target plug-in based on the question and description information of the top pre-set number of candidate plug-ins, the description information of each candidate plug-in being used to represent a function and a calling manner of the candidate plug-in.

[0130] The first screening model is trained based on sample questions, description information of a plurality of sample plug-ins, and reference plug-ins, the reference plug-ins being plug-ins in the plurality of sample plug-ins that can accurately reply to the sample questions, and the trained first screening model is used to screen plug-ins that can solve the question from the plurality of candidate plug-ins.

[0131] In some embodiments, the second determining unit is configured to determine, based on the question, at least one additional condition matched with the question, the at least one additional condition being used to indicate a constraint condition for the large model to reply to the question, and determine, based on the question, the description information of the top pre-set number of candidate plug-ins, and the at least one additional condition, the at least one target plug-in, the description information of each candidate plug-in being used to represent a function and a calling manner of the candidate plug-in.

[0132] In some embodiments, the second determining unit is configured to determine, based on a feature vector of the question and feature vectors of a plurality of candidate conditions, a similarity between the question and each candidate condition, and determine, from the plurality of candidate conditions, at least one additional condition that satisfies a similarity condition.

[0133] In some embodiments, the second determining unit is configured to predict, by using a second screening model, the at least one target plug-in based on the question, the description information of the top pre-set number of candidate plug-ins, and the at least one additional condition.

[0134] The second screening model is trained based on sample questions, description information of a plurality of sample plug-ins, sample additional conditions, and reference plug-ins, the reference plug-ins being plug-ins in the plurality of sample plug-ins that can accurately reply to the sample questions, and the trained second screening model is used to screen plug-ins that can solve the question from the plurality of candidate plug-ins.

[0135] In some embodiments, the apparatus further includes:

[0136] The prediction module is configured to predict, by using a second screening model, slot information of the at least one target plug-in based on the question, the description information of the top pre-set number of candidate plug-ins, and the at least one additional condition, the slot information of each target plug-in being used to indicate key information queried from a server corresponding to the target plug-in.

[0137] In some embodiments, after the service data is obtained from the server corresponding to the at least one target plug-in, the apparatus further includes:

[0138] The filtering module is configured to filter service data corresponding to at least one target plug-in based on the question to obtain target data corresponding to the at least one target plug-in, and an association degree between the target data and the question satisfies a related condition, the association degree being used to represent a correlation between the target data and the question.

[0139] The processing module is configured to process the target data corresponding to the at least one target plug-in by using the large model to obtain an answer to the question.

[0140] The embodiments of the present application provide a question and answer device based on a large model. In the process of answering a question by using a large model, at least one target plug-in that can reply to the question is selected from a plurality of candidate plug-ins associated with the large model based on search words of the candidate plug-ins and the input question. Since the number of search words of the plug-in is smaller than that of description information of the plug-in and the search words can indicate characteristics of the question for requesting corresponding services, the at least one target plug-in can be quickly and accurately selected. Then, the related service data can be quickly requested by calling a corresponding service interface through the at least one target plug-in to accurately reply to the question. On the basis of ensuring that the large model can accurately process the question, the question processing efficiency is improved.

[0141] It should be noted that the question and answer device based on the large model provided in the above embodiments is used to reply to a question of a user by using a large model. Only the division of the above functional modules is used as an example for illustration. In actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the question and answer device based on the large model provided in the above embodiments and the question and answer method based on the large model belong to the same concept. For specific implementation processes, refer to the method embodiments, which will not be repeated here.

[0142] In the embodiments of the present application, the computer device can be configured as a terminal or a server. When the computer device is configured as a terminal, the technical solutions provided in the embodiments of the present application can be implemented by the terminal as an execution subject. When the computer device is configured as a server, the technical solutions provided in the embodiments of the present application can be implemented by the server as an execution subject. The technical solutions provided in the present application can also be implemented through interaction between the terminal and the server, and the embodiments of the present application do not limit this.

[0143] Figure 8is a structural block diagram of a terminal 800 according to an embodiment of the present application. The terminal 800 can be a portable mobile terminal, such as a smartphone, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer, or a desktop computer. The terminal 800 can also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal, or other names.

[0144] Generally, the terminal 800 includes a processor 801 and a memory 802.

[0145] The processor 801 can include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 801 can be implemented in the form of at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 801 can also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 801 can be integrated with a GPU (Graphics Processing Unit) for rendering and drawing content to be displayed on a display screen. In some embodiments, the processor 801 can further include an AI (Artificial Intelligence) processor for processing machine learning-related computing operations.

[0146] The memory 802 can include one or more computer-readable storage media, which can be non-transitory. The memory 802 can also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one computer program for being executed by the processor 801 to implement a large model-based question answering method provided by the method embodiment of the present application.

[0147] In some embodiments, terminal 800 can also optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802, and the peripheral device interface 803 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 803 through a bus, a signal line, or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 804, a display screen 805, a camera component 806, an audio circuit 807, and a power supply 808.

[0148] The peripheral device interface 803 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 can be implemented on a separate chip or circuit board, and the present embodiments are not limited in this regard.

[0149] The radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 804 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 804 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 804 can also include NFC (Near Field Communication) related circuitry, and the present application is not limited in this regard.

[0150] The display screen 805 is configured to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 805 is a touch display screen, the display screen 805 is further configured to capture touch signals on or above the surface of the display screen 805. The touch signals can be input to the processor 801 as control signals for processing. In this case, the display screen 805 can also be configured to provide virtual buttons and / or virtual keyboard, also known as soft buttons and / or soft keyboard. In some embodiments, the display screen 805 can be one, disposed on the front panel of the terminal 800; in other embodiments, the display screen 805 can be at least two, respectively disposed on different surfaces of the terminal 800 or in a folding design; in other embodiments, the display screen 805 can be a flexible display screen, disposed on a curved surface or a folding surface of the terminal 800. Even, the display screen 805 can also be disposed in an irregular shape other than a rectangle, i.e., a special-shaped screen. The display screen 805 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.

[0151] The camera assembly 806 is configured to capture images or videos. In some embodiments, the camera assembly 806 includes a front camera and a rear camera. Generally, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, the rear camera is at least two, which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, to realize the background blur function by fusing the main camera and the depth-of-field camera, the panoramic shooting and VR (Virtual Reality) shooting function by fusing the main camera and the wide-angle camera, or other fusion shooting functions. In some embodiments, the camera assembly 806 can further include a flash. The flash can be a single-color-temperature flash or a dual-color-temperature flash. The dual-color-temperature flash refers to the combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.

[0152] The audio circuit 807 can include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into an electrical signal input to the processor 801 for processing, or input to the radio frequency circuit 804 to realize voice communication. For the purpose of stereo sound collection or noise reduction, the microphone can be multiple, respectively arranged at different parts of the terminal 800. The microphone can also be an array microphone or an omnidirectional collection type microphone. The speaker is used to convert the electrical signal from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker can be a conventional diaphragm speaker, or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can it convert electrical signals into sound waves that humans can hear, but it can also convert electrical signals into sound waves that humans cannot hear for ranging purposes. In some embodiments, the audio circuit 807 can also include a headphone jack.

[0153] The power supply 808 is used to supply power to each component in the terminal 800. The power supply 808 can be alternating current, direct current, disposable battery or rechargeable battery. When the power supply 808 includes a rechargeable battery, the rechargeable battery can be a wired charging battery or a wireless charging battery. The wired charging battery is a battery charged through a wired line, and the wireless charging battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0154] In some embodiments, the terminal 800 also includes one or more sensors 809. The one or more sensors 809 include, but are not limited to, an acceleration sensor 810, a gyroscope sensor 811, a pressure sensor 812, an optical sensor 813, and a proximity sensor 814.

[0155] The acceleration sensor 810 can detect the acceleration in three coordinate axes of the coordinate system established by the terminal 800. For example, the acceleration sensor 810 can be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 801 can control the display screen 805 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 810. The acceleration sensor 810 can also be used for game or user motion data collection.

[0156] The gyroscope sensor 811 can detect the body direction and rotation angle of the terminal 800, and the gyroscope sensor 811 can collect 3D actions of the user on the terminal 800 in cooperation with the acceleration sensor 810. The processor 801 can realize the following functions according to the data collected by the gyroscope sensor 811: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization when shooting, game control, and inertial navigation.

[0157] The pressure sensor 812 can be arranged at the side frame of the terminal 800 and / or the lower layer of the display screen 805. When the pressure sensor 812 is arranged at the side frame of the terminal 800, the holding signal of the user to the terminal 800 can be detected, and the left-hand or right-hand recognition or the shortcut operation can be performed by the processor 801 according to the holding signal collected by the pressure sensor 812. When the pressure sensor 812 is arranged at the lower layer of the display screen 805, the operability control on the UI interface can be controlled by the processor 801 according to the pressure operation of the user to the display screen 805. The operability control includes at least one of the button control, the scroll bar control, the icon control and the menu control.

[0158] The optical sensor 813 is used to collect the ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 according to the ambient light intensity collected by the optical sensor 813. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is decreased. In another embodiment, the processor 801 can also dynamically adjust the shooting parameter of the camera assembly 806 according to the ambient light intensity collected by the optical sensor 813.

[0159] The proximity sensor 814, also called the distance sensor, is usually arranged at the front panel of the terminal 800. The proximity sensor 814 is used to collect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 814 detects that the distance between the user and the front of the terminal 800 gradually decreases, the display screen 805 is switched from the bright screen state to the off-screen state by the processor 801; when the proximity sensor 814 detects that the distance between the user and the front of the terminal 800 gradually increases, the display screen 805 is switched from the off-screen state to the bright screen state by the processor 801.

[0160] Those skilled in the art can understand that the structure shown in the above embodiments is not a limitation on the terminal 800, and the terminal 800 can include more or less components than the structure shown in the above embodiments, or combine certain components, or adopt a different component arrangement. Figure 8

[0161] Figure 9 ​A structural schematic diagram of a server is provided according to an embodiment of the present application. The server 900 can have great differences due to different configurations or performances, and can include one or more processors (Central Processing Units, CPUs) 901 and one or more memories 902. The memory 902 stores at least one computer program, which is loaded and executed by the processor 901 to implement the large model-based question answering method provided by each method embodiment. Of course, the server can also have a wired or wireless network interface, a keyboard, an input and output interface, and other components for realizing the functions of the device, and the like, so as to perform input and output. The server can also include other components for realizing the functions of the device, and the like, and will not be described here.

[0162] The present application also provides a computer readable storage medium having at least one computer program stored therein. The at least one computer program is loaded and executed by a processor of a computer device to implement the operations performed by the computer device in the large model-based question answering method of the above embodiments. For example, the computer readable storage medium can be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0163] In some embodiments, the computer program related to the embodiments of the present application can be deployed to execute on one computer device, or on multiple computer devices located in one place, or on multiple computer devices distributed in multiple places and interconnected through a communication network, which can constitute a blockchain system.

[0164] The present application also provides a computer program product, including a computer program. The computer program code is stored in a computer readable storage medium. The processor of the computer device reads the computer program from the computer readable storage medium. The processor executes the computer program, so that the computer device executes the large model-based question answering method provided in the various optional implementation manners.

[0165] Those of ordinary skill in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or by a program instructing relevant hardware, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0166] The above merely provides the optional embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A large model-based question answering method, characterized in that, The method comprises: determining at least one target plug-in from a plurality of candidate plug-ins associated with a large model based on keywords of the plurality of candidate plug-ins and an input question, different candidate plug-ins correspond to different services, each candidate plug-in is used to instruct the large model to call a service interface of a corresponding service to request service data, and the keyword of each candidate plug-in is used to indicate a question feature used to request the corresponding service, and a matching degree between the keyword of the at least one target plug-in and the question satisfies a matching condition; based on the at least one target plug-in, calling a service interface of a service corresponding to the at least one target plug-in, and based on the service interface corresponding to the at least one target plug-in, obtaining service data from a server corresponding to the at least one target plug-in; processing the service data corresponding to the at least one target plug-in through the large model to obtain an answer to the question, and outputting the answer.

2. The method of claim 1, wherein, The method comprises: for any candidate plug-in in the plurality of candidate plug-ins, determining a matching degree between the question and the keyword of the candidate plug-in based on the question and the keyword of the candidate plug-in; determining the at least one target plug-in from a plurality of candidate plug-ins in a preset number of candidate plug-ins sorted in a high-to-low order according to the matching degree.

3. The method of claim 2, wherein, The keyword of each candidate plug-in has a plurality of keywords. The method comprises: for any keyword of any candidate plug-in in the plurality of candidate plug-ins, calculating a similarity between the question and the keyword based on a feature vector of the question and a feature vector of the keyword; determining the matching degree between the question and the keyword of the candidate plug-in based on the similarities corresponding to the plurality of keywords of the candidate plug-in.

4. The method of claim 3, wherein, The method comprises: for any candidate plug-in in the plurality of candidate plug-ins, determining a maximum similarity in the similarities corresponding to the plurality of keywords of the candidate plug-in as the matching degree between the question and the keyword of the candidate plug-in; for any candidate plug-in in the plurality of candidate plug-ins, summing the similarities corresponding to the plurality of keywords of the candidate plug-in to obtain the matching degree between the question and the keyword of the candidate plug-in.

5. The method of claim 2, wherein, The method comprises: based on the question and description information of the plurality of candidate plug-ins sorted in the high-to-low order, predicting the at least one target plug-in through a first screening model, and the description information of each candidate plug-in is used to represent a function and a calling mode of the candidate plug-in. The first screening model is trained based on a sample question, description information of a plurality of sample plug-ins, and a reference plug-in, the reference plug-in being a plug-in in the plurality of sample plug-ins that can accurately reply to the sample question, and the first screening model after training is used to screen a plug-in that can solve a question from a plurality of candidate plug-ins.

6. The method of claim 2, wherein, The at least one target plug-in is determined from the plurality of candidate plug-ins in the preset quantity in the order of priority, including: Based on the question, at least one additional condition matched with the question is determined, the at least one additional condition being used to indicate a constraint condition for the large model to reply to the question; Based on the question, description information of the plurality of candidate plug-ins in the preset quantity in the order of priority, and the at least one additional condition, the at least one target plug-in is determined, the description information of each candidate plug-in being used to represent a function and a calling mode of the candidate plug-in.

7. The method of claim 6, wherein, The at least one additional condition matched with the question is determined based on the question, including: Based on a feature vector of the question and a feature vector of a plurality of candidate conditions, a similarity between the question and each candidate condition is determined; From the plurality of candidate conditions, at least one additional condition satisfying a similarity condition is determined.

8. The method of claim 6, wherein, The at least one target plug-in is determined based on the question, description information of the plurality of candidate plug-ins in the preset quantity in the order of priority, and the at least one additional condition, including: The at least one target plug-in is predicted based on the question, description information of the plurality of candidate plug-ins in the preset quantity in the order of priority, and the at least one additional condition through a second screening model; The second screening model is trained based on a sample question, description information of a plurality of sample plug-ins, a sample additional condition, and a reference plug-in, the reference plug-in being a plug-in in the plurality of sample plug-ins that can accurately reply to the sample question, and the second screening model after training is used to screen a plug-in that can solve a question from a plurality of candidate plug-ins.

9. The method of claim 8, wherein, The method further includes: Slot information of the at least one target plug-in is predicted based on the question, description information of the plurality of candidate plug-ins in the preset quantity in the order of priority, and the at least one additional condition through the second screening model, the slot information of each target plug-in being used to indicate key information queried from a server corresponding to the target plug-in.

10. The method of claim 1, wherein, After service data is obtained from the server corresponding to the at least one target plug-in, the method further includes: Based on the question, the service data corresponding to the at least one target plug-in is filtered to obtain target data corresponding to the at least one target plug-in, an association degree between the target data and the question satisfying a relevant condition, the association degree being used to represent a relevance between the target data and the question; The answer to the question is obtained by processing the service data corresponding to the at least one target plug-in through the large model, including: The answer to the question is obtained by processing the target data corresponding to the at least one target plug-in through the large model.

11. A large model-based question answering device, characterized by, The device includes: The determining module is configured to determine at least one target plug-in from a plurality of candidate plug-ins associated with the large model based on search terms of the input question and the plurality of candidate plug-ins, different candidate plug-ins correspond to different services, each candidate plug-in is used to instruct the large model to call a service interface of a corresponding service to request service data, and the search term of each candidate plug-in is used to indicate a question feature used to request the corresponding service, and a matching degree between the search term of the at least one target plug-in and the question satisfies a matching condition; The calling module is configured to call, based on the at least one target plug-in, a service interface of a service corresponding to the at least one target plug-in, and obtain service data from a server of the service corresponding to the at least one target plug-in based on the service interface of the service corresponding to the at least one target plug-in. The processing module is configured to process, by the large model, the service data corresponding to the at least one target plug-in to obtain an answer to the question, and output the answer.

12. A computer device, comprising: The computer device includes a processor and a memory, the memory is used to store at least one segment of computer program, the at least one segment of computer program is loaded and executed by the processor, and the large model-based question and answer method in any one of claims 1 to 10 is executed.

13. A computer-readable storage medium, characterized in that, The computer readable storage medium is used to store at least one segment of computer program, and the large model-based question and answer method in any one of claims 1 to 10 is executed.

14. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the large model-based question and answer method in any one of claims 1 to 10.

Citation Information

Cited By

  • Dialogue management method, electronic equipment and computer readable storage medium

    CN121581067A