Intelligent question and answer method and device, electronic equipment and computer readable storage medium

By building an interface parameter recognition and calling system for training large language models, the efficiency and accuracy of large language models when using internal enterprise API interfaces is solved, and more efficient and intelligent Q&A is achieved.

CN119691399APending Publication Date: 2025-03-25SANGFOR TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411818516.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Existing large language models cannot follow human instructions to use external tools when performing more advanced tasks, and it is difficult to effectively utilize API interfaces within different enterprises, resulting in limited accuracy and efficiency of smart question-and-answer.

Method used

By constructing a training sample collection for training the first largest language model, the collection includes input samples and output samples pairs, where the input samples contain target problems and interface information samples, and the output samples are interface parameter samples. Use this model to identify the interface parameters of the target interface and call the target interface to obtain internal data. Subsequently, the second largest language model is used to combine the internal data of the target interface to identify and generate answers to the target question.

Benefits of technology

It effectively improves the ability of the large language model to use internal interfaces of different enterprises, breaks the barrier between the large language model and internal data of the enterprise, and achieves more accurate and efficient intelligent Q&A.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691399A_ABST
    Figure CN119691399A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent question and answer method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: carrying out the recognition of a target question and the interface information of a target interface through a first large language model, and determining the interface parameters of the target interface; wherein the first large language model is obtained by performing model training by using a training sample set, and the training sample set comprises a plurality of input samples and output samples corresponding to the input samples; the input sample comprises a problem sample and an interface information sample which correspond to each other, and the output sample comprises an interface parameter sample; calling a target interface according to the target interface parameter to obtain internal data of the target interface; and identifying the target question and the internal data of the target interface by using the second large language model, and determining a target answer corresponding to the target question. By applying the technical scheme provided by the invention, the use capability of the large language model for internal interfaces of different enterprises can be effectively improved, and more accurate intelligent question and answer can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of deep learning models, and in particular to an intelligent question-answering method, and also to an intelligent question-answering device, an electronic device, and a computer-readable storage medium. Background Art

[0002] Large Language Model (LLM) refers to a deep learning model trained with massive text data that can understand input text and make corresponding responses or generate natural language text. Compared with traditional small language models, large language models have made great expansions in model size, pre-training data, and total computing power. They have a deeper understanding of natural language and can give better and more human-like responses in context.

[0003] However, the current large language model technology is still significantly limited in performing more advanced tasks, for example, it cannot follow human instructions to use external tools (API, Application Program Interface). However, when promoting the actual application scenarios of LLM, it is necessary to consider how to break the barriers between LLM and internal enterprise data. Most of the internal enterprise data can be obtained through internal API calls, and then use LLM's powerful reasoning ability to analyze the data and give answers. In this link, the APIs of different companies are different in style and function, which is a huge challenge for LLM to learn how to call the rich APIs of different companies.

[0004] Therefore, how to effectively improve LLM's ability to use different internal interfaces of an enterprise to achieve more accurate intelligent question and answer is an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0005] The purpose of this application is to provide an intelligent question-answering method, which can effectively improve LLM's ability to use different internal interfaces of an enterprise and help achieve more accurate intelligent question-answering; another purpose of this application is to provide an intelligent question-answering device, an electronic device, and a computer-readable storage medium, all of which have the above-mentioned beneficial effects.

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

[0007] The target question and the interface information of the target interface are identified by using the first large language model, and the interface parameters of the target interface are determined; wherein the first large language model is obtained by model training using a training sample collection, and the training sample collection includes a plurality of input samples and output samples corresponding to each of the input samples; the input samples include mutually corresponding question samples and interface information samples, and the output samples include interface parameter samples;

[0008] Call the target interface according to the target interface parameters to obtain the internal data of the target interface;

[0009] The target question and the internal data of the target interface are identified using the second largest language model to determine a target answer corresponding to the target question.

[0010] Preferably, the process of constructing the first language model includes:

[0011] Acquire an input sample collection, and determine an interface information sample in each input sample in the input sample collection;

[0012] Acquire a corresponding interface parameter sample according to the interface information sample as an output sample corresponding to the input sample;

[0013] Establishing the training sample collection according to each of the input samples and each of the output samples;

[0014] The first language model is obtained by training using the training sample collection.

[0015] Preferably, obtaining a collection of input samples includes:

[0016] Get the initial input sample collection;

[0017] Performing a preprocessing operation on each initial input sample in the initial input sample collection to obtain each input sample; the preprocessing operation includes a combination of one or more of a symbol filtering operation, an error correction operation, and a generalization operation;

[0018] The input sample collection is generated based on each of the input samples.

[0019] Preferably, when the preprocessing operation is the symbol filtering operation, performing a preprocessing operation on each initial input sample in the initial input sample collection to obtain each input sample includes:

[0020] For each initial input sample in the initial input sample collection, determine the emoticon in the initial input sample by using an emoticon library for matching;

[0021] The emoticons in the initial input sample are deleted to obtain the input sample.

[0022] Preferably, when the preprocessing operation is the error correction operation, performing a preprocessing operation on each initial input sample in the initial input sample collection to obtain each input sample includes:

[0023] For each initial input sample in the initial input sample collection, a preset error correction model is used to identify and determine the erroneous content in the initial input sample, and the erroneous content is corrected to obtain a corrected initial input sample as the input sample.

[0024] Preferably, when the preprocessing operation is the generalization operation, performing the preprocessing operation on each initial input sample in the initial input sample collection to obtain each input sample includes:

[0025] For each initial input sample in the initial input sample collection, using a preset generalization model to generate an extended input sample corresponding to the initial input sample;

[0026] The initial input samples and the extended input samples are used as the input samples.

[0027] Preferably, the first language model is obtained by training the training sample collection, including:

[0028] Constructing an initial large language model, wherein the initial large language model is a LoRA model or a Frezee model;

[0029] The local model parameters in the initial large language model are trained using the training sample collection to obtain the first large language model based on the optimal model parameters.

[0030] In a second aspect, the present application also discloses an intelligent question-answering device, comprising:

[0031] A first recognition module is used to use a first large language model to identify the target question and the interface information of the target interface, and determine the interface parameters of the target interface; wherein the first large language model is obtained by model training using a training sample collection, and the training sample collection includes a plurality of input samples and output samples corresponding to each of the input samples; the input samples include mutually corresponding question samples and interface information samples, and the output samples include interface parameter samples;

[0032] A calling module, used for calling the target interface according to the target interface parameters to obtain the internal data of the target interface;

[0033] The second recognition module is used to use the second largest language model to recognize the target question and the internal data of the target interface, and determine the target answer corresponding to the target question.

[0034] In a third aspect, the present application further discloses an electronic device, comprising:

[0035] Memory for storing computer programs;

[0036] A processor is used to implement the steps of any one of the intelligent question-answering methods described above when executing the computer program.

[0037] In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the intelligent question-answering methods described above are implemented.

[0038] The present application provides an intelligent question-answering method, comprising: using a first large language model to identify a target question and interface information of a target interface, and determining interface parameters of the target interface; wherein the first large language model is obtained by model training using a training sample collection, and the training sample collection includes multiple input samples and output samples corresponding to each of the input samples; the input samples include mutually corresponding question samples and interface information samples, and the output samples include interface parameter samples; calling the target interface according to the target interface parameters to obtain target interface internal data; using a second large language model to identify the target question and the target interface internal data, and determining a target answer corresponding to the target question.

[0039] It can be seen that the intelligent question and answer method provided in the present application pre-constructs a training sample collection for training the first large language model, and each training sample in the training sample collection includes an input sample-output sample pair, wherein the input sample includes a question sample and an interface information sample corresponding to each other, and the output sample includes an interface parameter sample corresponding to the interface information sample. Therefore, the first large language model trained using the training sample collection can effectively learn the calls of different API interfaces, further improving the ability of the large language model to use different internal enterprise interfaces, breaking the barrier between the large language model and the internal enterprise data. Based on this, in the intelligent question and answer process, the first large language model can be used to autonomously determine the API interface parameters corresponding to the user's question to realize the call of the corresponding API interface and obtain the internal enterprise data, and the second large language model can be used in combination with the internal enterprise data to achieve more accurate intelligent question and answer.

[0040] The intelligent question-and-answer device, electronic device, and computer-readable storage medium provided in this application all have the above-mentioned beneficial effects, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings required for use in the description of the prior art and the embodiments of the present application are briefly introduced below. Of course, the drawings described below in relation to the embodiments of the present application are only part of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present application.

[0042] Figure 1 A flowchart of an intelligent question-answering method provided in this application;

[0043] Figure 2 A flowchart of a first language model construction method provided in this application;

[0044] Figure 3 A flowchart of another intelligent question-answering method provided in this application;

[0045] Figure 4 A schematic diagram of the structure of an intelligent question-answering device provided in this application;

[0046] Figure 5 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0047] The core of this application is to provide an intelligent question-and-answer method, which can effectively improve LLM's ability to use different internal interfaces of enterprises and help achieve more accurate intelligent question-and-answer; another core of this application is to provide an intelligent question-and-answer device, system and computer-readable storage medium, which also have the above-mentioned beneficial effects.

[0048] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0049] An embodiment of the present application provides an intelligent question-answering method.

[0050] Please refer to Figure 1 , Figure 1 This is a flow chart of an intelligent question-answering method provided in the present application. The intelligent question-answering method may include the following S101~S103.

[0051] S101: Use the first largest language model to identify the target question and the interface information of the target interface, and determine the interface parameters of the target interface; wherein the first largest language model is obtained by model training using a training sample collection, the training sample collection includes multiple input samples and output samples corresponding to each input sample; the input samples include mutually corresponding question samples and interface information samples, and the output samples include interface parameter samples.

[0052] S102: calling the target interface according to the target interface parameters to obtain the internal data of the target interface.

[0053] S103: Using the second largest language model to identify the target question and the internal data of the target interface, and determining the target answer corresponding to the target question.

[0054] The technical solution provided in the embodiment of the present application aims to realize intelligent question and answer based on a large language model, and the large language model includes a first large language model and a second large language model, wherein the first large language model is used to realize the autonomous call of the API interface corresponding to the user question to obtain the internal data of the enterprise; the second large language model is used to realize the answering of the user question based on the internal data of the enterprise to output the answer to the user question.

[0055] It is understandable that both the first language model and the second language model are obtained by pre-training the model using sample data. Taking the first language model as an example, a training sample collection can be collected in advance to realize model training. The training sample collection includes multiple input sample-output sample pairs, and the input sample includes a question sample and an interface information sample, and the two correspond one to one. Here, the interface information sample is the interface information sample of the API interface corresponding to the corresponding question sample, which can be specifically the API interface name, that is, the input sample includes the corresponding question sample and the API interface name; the output sample includes the interface parameter sample, that is, the interface parameter sample of the API interface corresponding to the question sample. It should be noted that the interface parameter is intended to realize the corresponding API interface call. Thus, the training of the first language model can be realized using the training sample collection. It is understandable that the second language model can also be trained using this method, but the input samples in the training sample set used should be corresponding user question samples and interface internal data samples, and the output sample is the answer sample corresponding to the user question sample.

[0056] Based on this, in the intelligent question-answering process, when a target question input by the user is received, the target interface corresponding to the target question can be determined first, and then the target question and the target interface name can be input into the first largest language model for recognition, and the target interface parameters of the target interface can be obtained. The target interface parameters can then be used to call the target interface and obtain the internal data of the target interface. Finally, the target question and the internal data of the target interface can be input into the second largest prediction model for recognition, and the target answer corresponding to the target question can be obtained.

[0057] On this basis, please refer to Figure 2 , Figure 2 This is a flow chart of a first language model construction method provided in the present application, and its implementation process may include the following S201~S204.

[0058] S201: Acquire an input sample collection, and determine an interface information sample in each input sample in the input sample collection.

[0059] This step aims to achieve the acquisition of the input sample collection and the determination of the API interface in each input sample in the input sample collection. First, historical user questions can be collected to obtain a variety of different types of user questions, namely, the question samples in the input samples; further, for each question sample, it can be classified and identified using a preset classification model to determine its corresponding API interface, namely, the interface information sample corresponding to the question sample, that is, the interface information sample in the input sample. Thus, the question sample and the interface information sample correspond to each other to form an input sample, and multiple input samples can form an input sample collection.

[0060] In one embodiment of the present application, obtaining an input sample collection may include:

[0061] Get the initial input sample collection;

[0062] Performing a preprocessing operation on each initial input sample in the initial input sample collection to obtain each input sample; the preprocessing operation includes a combination of one or more of a symbol filtering operation, an error correction operation, and a generalization operation;

[0063] Generate an input sample collection based on each input sample.

[0064] The embodiment of the present application provides an implementation method for obtaining a collection of input samples. It is understandable that the form of the user's question will not be limited, and it may contain some useless information or erroneous information that will have an adverse effect on the intelligent question and answer results. Therefore, the received initial sample data can be preprocessed to obtain the input sample collection. Among them, the preprocessing operation may include symbol filtering operation, error correction operation, generalization operation, etc. The symbol filtering operation can filter out some illegal symbols and useless symbols in the input sample; the error correction operation can correct some erroneous information in the input sample; the generalization operation can expand the number of input samples to obtain a larger number of input samples for subsequent model training, so as to effectively improve the model accuracy.

[0065] Among them, when the preprocessing operation is a symbol filtering operation, the preprocessing operation is performed on each initial input sample in the initial input sample collection to obtain each input sample, which may include: for each initial input sample in the initial input sample collection, using the emoticon library to match and determine the emoticons in the initial input sample; deleting the emoticons in the initial input sample to obtain the input sample.

[0066] Specifically, the symbol filtering operation can be implemented based on the emoji library matching method. For each initial input sample in the initial input sample collection, its specific content can be matched with the emoji library to determine whether there are some emojis in the initial input sample that hit the emoji library. The emoji is considered to be invalid data in the sample data, so it can be deleted from the corresponding initial problem sample to obtain the final input sample.

[0067] Among them, when the preprocessing operation is an error correction operation, the preprocessing operation is performed on each initial input sample in the initial input sample collection to obtain each input sample, which may include: for each initial input sample in the initial input sample collection, using a preset error correction model to identify and determine the erroneous content in the initial input sample, and correcting the erroneous content to obtain the corrected initial input sample as the input sample.

[0068] Specifically, the error correction operation can be implemented based on a preset error correction model, that is, a learning network model for implementing the error correction operation is pre-built. For each initial input sample in the initial input sample collection, it can be directly input into the preset error correction model for processing. The preset error correction model can identify each error content in the initial input sample and correct it. At this time, the corrected initial input sample output by the preset error correction model is the input sample used to implement subsequent model training.

[0069] Among them, when the preprocessing operation is a generalization operation, a preprocessing operation is performed on each initial input sample in the initial input sample collection to obtain each input sample, including: for each initial input sample in the initial input sample collection, using a preset generalization model to generate an extended input sample corresponding to the initial input sample; and using each initial input sample and each extended input sample as an input sample.

[0070] Specifically, the generalization operation can also be implemented based on a preset generalization model, that is, a learning network model for implementing the generalization operation is pre-built. For each initial input sample in the initial input sample collection, it can be directly input into the preset generalization model for processing. The preset generalization model can learn to understand the form / content / type and other information of the initial input sample, and cite a larger number of input samples, that is, the above-mentioned extended input samples. At this time, both the initial input sample and the extended input sample obtained based on the initial input sample can be used as input samples for implementing subsequent model training.

[0071] S202: Obtain corresponding interface parameter samples according to the interface information samples as output samples corresponding to the input samples.

[0072] This step is intended to achieve the acquisition of output samples. It is understandable that the input sample and the output sample will generate an input sample-output sample pair for implementing the model training of the first language model. Among them, the specific content of the output sample is the API interface parameter. Specifically, for each input sample, after determining the API interface in the input sample, the interface parameters of the API interface, such as parameter definition, function description, data type, etc., can be manually filled in. These data information constitute the output sample corresponding to the input sample.

[0073] S203: Establish a training sample collection according to each input sample and each output sample.

[0074] S204: Use the training sample collection to train and obtain a first language model.

[0075] The above steps are aimed at realizing the model training of the first large language model. First, a training sample collection is established based on each input sample and each output sample. In the training sample collection, input samples and output samples correspond one to one, and exist in the form of input sample-output sample pairs; then, the large language model can be trained using the training sample collection. Obviously, based on the first large language model, the user questions and the corresponding interface information can be analyzed and processed to output the interface parameters corresponding to the user questions, thereby realizing the corresponding interface call.

[0076] Among them, using the training sample collection to train the first large language model can include: constructing an initial large language model, where the initial large language model is a LoRA model or a Frezee model; using the training sample collection to train local model parameters in the initial large language model to obtain the first large language model based on the optimal model parameters.

[0077] Specifically, the first language model can specifically adopt the LoRA model or the Frezee model, because the large language model has very large model parameters based on its own characteristics. If global parameter training is to be performed, the cost is too high. Therefore, the LoRA model or the Frezee model can only perform local parameter training, such as the LoRA model can only fine-tune the parameters of the self-attention network layer, and the Frezee model can only fine-tune the parameters of the last 5 network layers, which greatly reduces the model training cost. Of course, the second largest language model can also adopt the LoRA model or the Frezee model, which will not be repeated in this application.

[0078] It should be noted that the model types of the above-mentioned models do not affect the implementation of this technical solution, as long as the corresponding functions can be realized. In a possible implementation method, the model types of the above-mentioned models can all be big data models. In addition, in actual application scenarios, various models can be optimized and updated with reference to preset conditions (such as timing conditions) to effectively ensure the accuracy of the model, thereby ensuring the accuracy of the intelligent question and answer.

[0079] It can be seen that the intelligent question and answer method provided in the present application pre-constructs a training sample collection for training the first large language model, and each training sample in the training sample collection includes an input sample-output sample pair, wherein the input sample includes a question sample and an interface information sample corresponding to each other, and the output sample includes an interface parameter sample corresponding to the interface information sample. Therefore, the first large language model trained using the training sample collection can effectively learn the calls of different API interfaces, further improving the ability of the large language model to use different internal enterprise interfaces, breaking the barrier between the large language model and the internal enterprise data. Based on this, in the intelligent question and answer process, the first large language model can be used to autonomously determine the API interface parameters corresponding to the user's question to realize the call of the corresponding API interface and obtain the internal enterprise data, and the second large language model can be used in combination with the internal enterprise data to achieve more accurate intelligent question and answer.

[0080] Based on the above embodiments, the embodiments of the present application provide another intelligent question-answering method.

[0081] Please refer to Figure 3 , Figure 3 This is a flowchart of another intelligent question-answering method provided by this application, and its implementation process is as follows:

[0082] 1. Collect previous user questions and perform preprocessing, for example, remove emoticons, remove spaces, correct typos, and generalize user questions based on relevant API functions to obtain a comprehensive and high-quality data collection, namely, a question sample collection.

[0083] 2. Associate user questions with API interfaces through a trained classification model.

[0084] 3. Determine the final prompt through multiple experiments, and construct the final input of the LLM model (i.e., the input sample collection, in which user questions correspond to API interfaces one by one) with the data in step 2. The final form is, for example, "You are now an API usage expert. You need to fill in the parameters of xxAPI according to the user's questions. The following is the user's question (What is the recent attack trend?), please give your answer (answer)". The answer here is manually filled in, specifically the API interface parameters, as the output sample for implementing model training.

[0085] 4. After obtaining the data samples (input samples - output samples) of step 3, train the LoRA model or Frezee model to achieve local parameter fine-tuning, so that the model can gradually learn various properties of the API interface, such as parameter definition, function description, data type, etc.

[0086] 5. After the model is trained, the user questions and API interface are constructed and the prompt is input into the LLM model. The trained LLM model (i.e. the first language model) completes and outputs the API interface parameters through the user questions. Thus, the internal data of the interface can be obtained by calling the complete API interface according to the API interface parameters. Finally, the user questions and the internal data of the interface are input into the preset question-and-answer model (i.e. the second language model, which is trained in the same way as the first language model) to answer the user questions, output the corresponding answers, and complete the intelligent question-and-answer.

[0087] It can be seen that the intelligent question and answer method provided in the embodiment of the present application pre-constructs a training sample collection for training the first large language model, and each training sample in the training sample collection includes an input sample-output sample pair, wherein the input sample includes a question sample and an interface information sample corresponding to each other, and the output sample includes an interface parameter sample corresponding to the interface information sample. Therefore, the first large language model trained using the training sample collection can effectively learn the calls of different API interfaces, further improving the ability of the large language model to use different internal enterprise interfaces, breaking the barrier between the large language model and the internal enterprise data. Based on this, in the intelligent question and answer process, the first large language model can be used to autonomously determine the API interface parameters corresponding to the user's question to realize the call of the corresponding API interface and obtain the internal enterprise data, and the second large language model can be used in combination with the internal enterprise data to achieve more accurate intelligent question and answer.

[0088] This application also provides an intelligent question-answering device, please refer to Figure 4 , Figure 4 This is a schematic diagram of the structure of an intelligent question-answering device provided in this application. The intelligent question-answering device may include:

[0089] The first recognition module 1 is used to use the first large language model to identify the target question and the interface information of the target interface, and determine the interface parameters of the target interface; wherein the first large language model is obtained by model training using a training sample collection, and the training sample collection includes multiple input samples and output samples corresponding to each input sample; the input samples include mutually corresponding question samples and interface information samples, and the output samples include interface parameter samples;

[0090] Calling module 2, used for calling the target interface according to the target interface parameters to obtain the internal data of the target interface;

[0091] The second recognition module 3 is used to recognize the target question and the internal data of the target interface by using the second largest language model, and determine the target answer corresponding to the target question.

[0092] It can be seen that the intelligent question and answer device provided in the embodiment of the present application pre-constructs a training sample collection for training the first large language model, and each training sample in the training sample collection includes an input sample-output sample pair, wherein the input sample includes a question sample and an interface information sample that correspond to each other, and the output sample includes an interface parameter sample corresponding to the interface information sample. Therefore, the first large language model trained using the training sample collection can effectively learn the calls of different API interfaces, further improving the ability of the large language model to use different internal enterprise interfaces, breaking the barrier between the large language model and the internal enterprise data. Based on this, in the intelligent question and answer process, the first large language model can be used to autonomously determine the API interface parameters corresponding to the user's question to realize the call of the corresponding API interface and obtain the internal enterprise data, and the second large language model can be used in combination with the internal enterprise data to achieve more accurate intelligent question and answer.

[0093] In one embodiment of the present application, the intelligent question-answering model may further include:

[0094] A determination module, used to obtain an input sample collection and determine an interface information sample in each input sample in the input sample collection;

[0095] An acquisition module, used to acquire corresponding interface parameter samples according to the interface information samples as output samples corresponding to the input samples;

[0096] Establishing a module, used to establish a training sample collection according to each input sample and each output sample;

[0097] The training module is used to train the first language model using the training sample collection.

[0098] In one embodiment of the present application, the above-mentioned determination module may include:

[0099] An acquisition unit, used to acquire an initial input sample collection;

[0100] A preprocessing unit, used to perform a preprocessing operation on each initial input sample in the initial input sample collection to obtain each input sample; the preprocessing operation includes a combination of one or more of a symbol filtering operation, an error correction operation, and a generalization operation;

[0101] The generating unit is used to generate an input sample set based on each input sample.

[0102] In one embodiment of the present application, when the preprocessing operation is a symbol filtering operation, the preprocessing unit can be specifically used to determine the emoticons in the initial input sample by using the emoticon library matching for each initial input sample in the initial input sample collection; and delete the emoticons in the initial input sample to obtain an input sample.

[0103] In one embodiment of the present application, when the preprocessing operation is an error correction operation, the preprocessing unit may be specifically used to identify and determine the error content in each initial input sample in the initial input sample collection using a preset error correction model, and perform correction processing on the error content to obtain the corrected initial input sample as the input sample.

[0104] In one embodiment of the present application, when the preprocessing operation is a generalization operation, the above-mentioned preprocessing unit can be specifically used to generate an extended input sample corresponding to the initial input sample for each initial input sample in the initial input sample collection using a preset generalization model; and use each initial input sample and each extended input sample as an input sample.

[0105] In one embodiment of the present application, the above-mentioned training module can be specifically used to construct an initial large language model, which is a LoRA model or a Frezee model; the local model parameters in the initial large language model are trained using a collection of training samples to obtain a first large language model based on the optimal model parameters.

[0106] For an introduction to the device provided in this application, please refer to the above method embodiment, and this application will not go into details here.

[0107] This application also provides an electronic device, please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application, and the electronic device may include:

[0108] A memory 11, used for storing computer programs;

[0109] The processor 10 can implement the steps of any one of the above-mentioned intelligent question-answering methods when executing a computer program.

[0110] like Figure 5 , which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.

[0111] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.

[0112] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in an embodiment of the intelligent question-answering method.

[0113] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:

[0114] The first language model is used to identify the target question and the interface information of the target interface, and the interface parameters of the target interface are determined; wherein the first language model is obtained by model training using a training sample collection, the training sample collection includes a plurality of input samples and output samples corresponding to each input sample; the input samples include mutually corresponding question samples and interface information samples, and the output samples include interface parameter samples;

[0115] Call the target interface according to the target interface parameters to obtain the internal data of the target interface;

[0116] The second largest language model is used to identify the target question and the internal data of the target interface to determine the target answer corresponding to the target question.

[0117] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0118] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0119] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.

[0120] Of course, it should be noted that Figure 5 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 5 More or fewer components than shown, or combinations of certain components.

[0121] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned intelligent question-answering methods can be implemented.

[0122] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0123] For an introduction to the computer-readable storage medium provided in this application, please refer to the above method embodiment, and this application will not go into details here.

[0124] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0125] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0126] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0127] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples herein, and the description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. An intelligent question-answering method, characterized in that: include: The target question and the interface information of the target interface are identified by using the first large language model, and the interface parameters of the target interface are determined; wherein the first large language model is obtained by model training using a training sample collection, and the training sample collection includes a plurality of input samples and output samples corresponding to each of the input samples; the input samples include mutually corresponding question samples and interface information samples, and the output samples include interface parameter samples; Call the target interface according to the target interface parameters to obtain the internal data of the target interface; The target question and the internal data of the target interface are identified using the second largest language model to determine a target answer corresponding to the target question.

2. The intelligent question-answering method according to claim 1, characterized in that: The construction process of the first language model includes: Acquire an input sample collection, and determine an interface information sample in each input sample in the input sample collection; Acquire a corresponding interface parameter sample according to the interface information sample as an output sample corresponding to the input sample; Establishing the training sample collection according to each of the input samples and each of the output samples; The first language model is obtained by training using the training sample collection.

3. The intelligent question-answering method according to claim 2, characterized in that: Get a collection of input samples, including: Get the initial input sample collection; Performing a preprocessing operation on each initial input sample in the initial input sample collection to obtain each input sample; the preprocessing operation includes a combination of one or more of a symbol filtering operation, an error correction operation, and a generalization operation; The input sample collection is generated based on each of the input samples.

4. The intelligent question-answering method according to claim 3, characterized in that: When the preprocessing operation is the symbol filtering operation, performing a preprocessing operation on each initial input sample in the initial input sample set to obtain each input sample includes: For each initial input sample in the initial input sample collection, determine the emoticon in the initial input sample by using an emoticon library for matching; The emoticons in the initial input sample are deleted to obtain the input sample.

5. The intelligent question-answering method according to claim 3, characterized in that: When the preprocessing operation is the error correction operation, performing a preprocessing operation on each initial input sample in the initial input sample collection to obtain each input sample includes: For each initial input sample in the initial input sample collection, a preset error correction model is used to identify and determine the erroneous content in the initial input sample, and the erroneous content is corrected to obtain a corrected initial input sample as the input sample.

6. The intelligent question-answering method according to claim 3, characterized in that: When the preprocessing operation is the generalization operation, performing a preprocessing operation on each initial input sample in the initial input sample collection to obtain each input sample includes: For each initial input sample in the initial input sample collection, using a preset generalization model to generate an extended input sample corresponding to the initial input sample; The initial input samples and the extended input samples are used as the input samples.

7. The intelligent question-answering method according to any one of claims 2 to 6, characterized in that: The first language model is obtained by training the training sample collection, including: Constructing an initial large language model, wherein the initial large language model is a LoRA model or a Frezee model; The local model parameters in the initial large language model are trained using the training sample collection to obtain the first large language model based on the optimal model parameters.

8. An intelligent question-answering device, characterized in that: include: A first recognition module is used to use a first large language model to identify the target question and the interface information of the target interface, and determine the interface parameters of the target interface; wherein the first large language model is obtained by model training using a training sample collection, and the training sample collection includes a plurality of input samples and output samples corresponding to each of the input samples; the input samples include mutually corresponding question samples and interface information samples, and the output samples include interface parameter samples; A calling module, used for calling the target interface according to the target interface parameters to obtain the internal data of the target interface; The second recognition module is used to use the second largest language model to recognize the target question and the internal data of the target interface, and determine the target answer corresponding to the target question.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the intelligent question-answering method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the intelligent question-answering method according to any one of claims 1 to 7 are implemented.