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

By filtering and updating the prompts in the question-answering recognition model, the problem of high data processing pressure in the question-answering task processing system is solved, the efficiency and accuracy of question-answering tasks are improved, and the applicability of the model is expanded.

CN116340495BActive Publication Date: 2026-05-26PING AN TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2023-04-19
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing question-answering task processing systems require extensive training on corpora for different scenarios, resulting in high data processing pressure, reduced speed and efficiency of question-answering task deployment, and impact on processing effectiveness.

Method used

By parsing the question-answering task information, the question-answering recognition model added to each network layer is retrieved based on the importance of the prompts, and the recognition process is performed. When there are prompts that need to be updated, the information is updated and the model is adjusted to reduce the addition of unimportant prompts and improve the model's adaptability.

Benefits of technology

It improves the processing efficiency and accuracy of the question-answering recognition model, reduces the system training pressure, expands the applicability of the model, and enhances the effectiveness of question-answering tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116340495B_ABST
    Figure CN116340495B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, storage medium, and computer device for processing question-answering tasks, relating to the field of natural language processing technology. Its main objective is to address the problem of poor processing effectiveness in existing question-answering tasks. The method includes: upon detecting the execution of a question-answering task, parsing the question-answering information; retrieving a pre-trained question-answering recognition model based on the question-answering information (the model is trained by filtering prompts added to each network layer based on their importance); processing the question-answering information using the recognition model to obtain the recognition result of the question-answering task and acquiring evaluation information matching the recognition result; when there is prompt information matching the evaluation information that needs updating, updating the prompt information based on the prompt information to be updated, and adjusting the question-answering recognition model matched to the question-answering task based on the updated prompt information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language technology, and in particular to a method and apparatus for processing question-and-answer tasks, a storage medium, and a computer device. Background Technology

[0002] With the rapid development of artificial intelligence, major financial companies are using intelligent robots to conduct human-like question-and-answer sessions with customers to complete various question-and-answer tasks.

[0003] Currently, existing methods for performing question-answering tasks typically involve training models on different scenario-specific corpora for different question-answering tasks, and then using the trained machine learning models to perform the question-answering tasks. However, since question-answering tasks have many applicable scenarios, each task requires training on a large corresponding corpus, which significantly increases the system's data processing pressure, reduces the speed and efficiency of question-answering task deployment, and thus affects the effectiveness of question-answering task processing. Summary of the Invention

[0004] In view of this, the present invention provides a method and apparatus for processing question-and-answer tasks, a storage medium, and a computer device, the main purpose of which is to solve the problem of poor processing effectiveness of existing question-and-answer tasks.

[0005] According to one aspect of the present invention, a method for processing a question-answering task is provided, comprising:

[0006] Once a question-and-answer task is detected, the question and answer information of the task is parsed.

[0007] The question-and-answer recognition model that has been trained is retrieved based on the question-and-answer information. The question-and-answer recognition model is obtained by training the model after filtering the prompt information added in each network layer based on the importance of the prompt.

[0008] Based on the question-and-answer recognition model, the question-and-answer information is recognized and processed to obtain the recognition result of the question-and-answer task, and the question-and-answer task evaluation information matching the recognition result is obtained;

[0009] When there is a prompt message that matches the evaluation information of the question-answering task, the prompt message is updated based on the prompt message to be updated, and the question-answering recognition model matched by the question-answering task is adjusted based on the updated prompt message.

[0010] Furthermore, before retrieving the pre-trained question-answering recognition model based on the question-answering information, the method further includes:

[0011] Determine the initial question-answering recognition model to be trained and obtain prompt information;

[0012] The prompt information is added to each network layer of the initial question-answering recognition model, and the initial question-answering recognition model with the added prompt information is trained based on the prompt learning training set.

[0013] During model training, prompts in each network layer are deleted sequentially, and the importance parameters of the prompts corresponding to the deleted prompts are determined.

[0014] Based on the importance parameter of the prompt, the prompt information to be added is selected, and a question-answering recognition model is constructed according to the prompt information to be added and each of the network layers, and the question-answering recognition model is trained based on the task learning training set.

[0015] Furthermore, the step of sequentially deleting the prompt information in each network layer and determining the prompt importance parameter corresponding to the deleted prompt information includes:

[0016] The target prompt information of the target network layer to be deleted is determined in hierarchical order, and the first model accuracy obtained by training the initial question-answering recognition model based on the prompt learning training set is obtained.

[0017] Based on the prompt learning training set, the initial question recognition model after deleting the target prompt information is trained to obtain the second model accuracy of the initial question recognition model;

[0018] The importance parameter of the target prompt information is determined based on the difference between the accuracy of the first model and the accuracy of the second model.

[0019] Furthermore, the step of filtering the information to be added based on the importance parameter of the prompt, and constructing a question-answering recognition model according to the information to be added and each of the network layers includes:

[0020] The prompts whose importance parameters meet the preset importance threshold are identified as prompts to be added; or,

[0021] The importance parameters of the prompts are sorted, and the prompt information to be added is determined from the sorted importance parameters according to a preset number of filters.

[0022] Furthermore, updating the prompt information based on the prompt information to be updated includes:

[0023] Analyze the task keywords in the question-and-answer task evaluation information and determine the prompt learning objects that match the task keywords;

[0024] According to the prompt learning object, the matching prompt information to be updated is found in the prompt task configuration information, and the prompt information to be updated is used to replace the prompt information in the question-answering recognition model.

[0025] Furthermore, the step of retrieving the pre-trained question-and-answer recognition model based on the question-and-answer information includes:

[0026] After the question-and-answer recognition model completes its training, a task classification matching the question-and-answer recognition model is generated. The task classification is used to define the scope of question-and-answer tasks that the question-and-answer recognition model can recognize and process.

[0027] The task scenarios corresponding to the question-and-answer information are analyzed, and the task categories are matched with the task scenarios;

[0028] If the task category matches the task scenario, then the question-answering recognition model corresponding to the task category is retrieved.

[0029] Furthermore, the method also includes:

[0030] If no evaluation information for the question-answering task matching the recognition result is obtained, then the text information of the completed question-answering task is obtained, and the matching prompt learning training set and / or task learning training set is determined from the number of affirmative words in the text information, so as to retrieve the question-answering recognition model trained based on the prompt learning training set and / or the task learning training set.

[0031] According to another aspect of the present invention, a processing apparatus for a question-answering task is provided, comprising:

[0032] The parsing module is used to parse the question and answer information of the question and answer task after it is detected that a question and answer task has been executed;

[0033] The retrieval module is used to retrieve the question-and-answer recognition model that has been trained based on the question-and-answer information. The question-and-answer recognition model is obtained by training the model after filtering the prompt information added in each network layer based on the importance of the prompts.

[0034] The processing module is used to process the question and answer information based on the question and answer recognition model, obtain the recognition result of the question and answer task, and obtain the question and answer task evaluation information that matches the recognition result;

[0035] The adjustment module is used to update the prompt information based on the prompt information to be updated when there is prompt information to be updated that matches the evaluation information of the question-answering task, and to adjust the question-answering recognition model matched by the question-answering task based on the updated prompt information.

[0036] Furthermore, the device also includes:

[0037] The determination module is used to determine the initial question-answering recognition model to be trained and to obtain prompt information;

[0038] The training module is used to add the prompt information to each network layer of the initial question-answering recognition model, and to train the initial question-answering recognition model after adding the prompt information based on the prompt learning training set.

[0039] The deletion module is used to sequentially delete the prompt information in each network layer during model training and determine the prompt importance parameter corresponding to the deleted prompt information.

[0040] The module is used to filter the prompt information to be added based on the prompt importance parameter, and to build a question-answering recognition model according to the prompt information to be added and each of the network layers, so as to train the question-answering recognition model based on the task learning training set.

[0041] Further, the deletion module is specifically used to sequentially determine a target prompt message of the target network layer to be deleted according to the hierarchical order, and obtain a first model accuracy obtained by training the initial question-answering recognition model based on the prompt learning training set; train the initial question recognition model after deleting the target prompt message based on the prompt learning training set to obtain a second model accuracy of the initial question recognition model; and determine the prompt importance parameter of the target prompt message based on the difference between the first model accuracy and the second model accuracy.

[0042] Furthermore, the deletion module is specifically used to determine the prompt information whose prompt importance parameter meets the preset importance threshold as the prompt information to be added; or, to sort multiple prompt importance parameters and determine the prompt information to be added from the sorted prompt importance parameters according to a preset number of filters.

[0043] Furthermore, the adjustment module is specifically used to parse the task keywords in the question-and-answer task evaluation information and determine the prompt learning object that matches the task keywords; according to the prompt learning object, it searches for matching prompt information to be updated from the prompt task configuration information and replaces the prompt information in the question-and-answer recognition model with the prompt information to be updated.

[0044] Furthermore, the retrieval module is specifically used to generate a task classification that matches the question-and-answer recognition model after the detection model has completed model training. The task classification is used to divide the scope of question-and-answer tasks that the question-and-answer recognition model can identify and process; parse the task scenario corresponding to the question-and-answer information and match the task classification with the task scenario; if the task classification matches the task scenario, then retrieve the question-and-answer recognition model corresponding to the task classification.

[0045] Furthermore, the device also includes:

[0046] The acquisition module is used to acquire text information of completed question-answering tasks if no evaluation information matching the recognition result is acquired, and to determine the matching prompt learning training set and / or task learning training set from the number of affirmative words in the text information, so as to retrieve the question-answering recognition model trained based on the prompt learning training set and / or the task learning training set.

[0047] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform an operation corresponding to the question-and-answer task processing method described above.

[0048] According to another aspect of the present invention, a computer device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0049] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the question-and-answer task processing method described above.

[0050] By employing the above-described technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages:

[0051] This invention provides a method, apparatus, storage medium, and computer device for processing question-and-answer tasks. Compared with existing technologies, this invention, upon detecting the execution of a question-and-answer task, parses the question-and-answer information of the task; retrieves a pre-trained question-and-answer recognition model based on the question-and-answer information (the model is trained after filtering the added prompts in each network layer based on their importance); processes the question-and-answer information based on the recognition model to obtain the recognition result of the task, and acquires the question-and-answer task evaluation information matching the recognition result; when there is prompt information to be updated that matches the evaluation information, updates the prompt information based on the prompt information to be updated, and adjusts the question-and-answer recognition model matching the task based on the updated prompt information. This achieves the goal of improving the model based on prompt information, reduces the addition of unimportant prompt information, improves the model's adaptability, and greatly improves the processing efficiency and accuracy of question-and-answer based on the question-and-answer recognition model, thereby improving the effectiveness of question-and-answer recognition processing.

[0052] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0053] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0054] Figure 1 A flowchart of a question-answering task processing method provided by an embodiment of the present invention is shown;

[0055] Figure 2 A block diagram of a question-answering task processing device provided in an embodiment of the present invention is shown;

[0056] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0057] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0058] This invention provides a method for processing question-answering tasks, such as... Figure 1 As shown, the method includes:

[0059] 101. When a question-and-answer task is detected, the question-and-answer information of the task is parsed.

[0060] In this embodiment of the invention, the question-and-answer task is a task in which a terminal or server, acting as the current executing entity, engages in a human dialogue with a user. For example, after a user calls, they are transferred to an intelligent robot question-and-answer service. The current executing entity initiates the question-and-answer task, retrieves the question-and-answer task process that matches the user's needs, and finds the response content requested by the user based on the question-and-answer content, thereby completing the execution of the question-and-answer task. Therefore, after the current executing entity detects the execution of the question-and-answer task, it first parses the question-and-answer information of the task. At this time, the question-and-answer information can be the voice content or text content in which the user answers according to the voice content output by the human robot. This embodiment of the invention does not impose specific limitations.

[0061] It should be noted that in different question-and-answer scenarios, the question-and-answer task can be implemented based on text input or voice input to obtain the corresponding question-and-answer information, namely voice question-and-answer information and text question-and-answer information. This embodiment of the invention does not make specific limitations.

[0062] 102. Retrieve the question-and-answer recognition model that has been trained based on the question-and-answer information.

[0063] In this embodiment of the invention, since different question-answering tasks require the question-answering recognition model to be trained for the corresponding task scenario, after parsing the question-answering information, the question-answering recognition model that matches the question-answering information and has completed model training is retrieved. The question-answering recognition model is obtained by training the model after filtering the added prompt information in each network layer based on the importance of the prompts. That is, when constructing the question-answering recognition model, prompt information is added to each network layer, and the importance parameter of each prompt information in the network layer is calculated by eliminating them one by one, thereby determining the network layers with prompt information in the final question-answering recognition model, and completing the model construction. Furthermore, in this embodiment of the invention, different question-answering information can be matched with a question-answering recognition model suitable for that question-answering information. Moreover, during the training of the question-answering recognition model, since prompt information is introduced and non-important prompt information is deleted after selecting importance, the applicability of the question-answering recognition model is greatly expanded, allowing one question-answering recognition model to be used for question-answering information recognition for multiple question-answering tasks after model training. For example, if the parsed question and answer information is the Ping An Insurance coverage amount, then the question and answer recognition model applicable to Ping An Insurance coverage prediction is retrieved. In this case, the question and answer recognition model can be a prediction model built based on a neural network. This embodiment of the invention does not impose specific limitations.

[0064] It should be noted that, in the embodiments of the present invention, when constructing the question-answering recognition model, the added prompt information is the object used by the prompt learning method in the artificial intelligence algorithm. When applied to the embodiments of the present invention, the prompt information is pre-configured to prompt content that matches the question-answering task, thereby improving the accuracy of model training and expanding the scope of model applicability.

[0065] 103. Based on the question-and-answer recognition model, the question-and-answer information is recognized and processed to obtain the recognition result of the question-and-answer task, and the question-and-answer task evaluation information matching the recognition result is obtained.

[0066] In this embodiment of the invention, after the current execution terminal retrieves the question-and-answer recognition model, it performs recognition processing on the question-and-answer information based on this model. The recognition processing corresponds to the model type; for example, if the model is a classification model, the classification recognition yields the classification result of the question-and-answer task; if the model is a prediction model, the prediction recognition yields the prediction result of the question-and-answer task. This embodiment of the invention does not impose specific limitations. After obtaining the recognition result, this result is matched with the question-and-answer information and output, such as outputting it via voice or text, thereby instructing the user to enter evaluation information for the question-and-answer task based on this recognition result. For example, after recognition processing, if the obtained recognition result is that the insurance period for Ping An Life Insurance is 20 years, after the voice broadcast to the user, a prompt is played stating "Please rate the answer above," and the user enters evaluation information such as "Satisfied," "Neutral," or "Dissatisfied."

[0067] 104. When there is a prompt message to be updated that matches the evaluation information of the question-and-answer task, update the prompt message based on the prompt message to be updated, and adjust the question-and-answer recognition model matched by the question-and-answer task based on the updated prompt message.

[0068] In this embodiment of the invention, to improve the applicability of the question-answering recognition model and reduce the system pressure and data resource waste during model training, after obtaining the question-answering task evaluation information, the current execution end updates the original prompt information based on the prompt information to be provided matched by this evaluation information. This update can include deletion, adjustment, reconfiguration, etc., thereby adjusting the question-answering recognition model with the updated prompt information to optimize model training and broaden its applicability. Specifically, when adjusting the question-answering recognition model based on the updated prompt information, it is necessary to recalculate the importance parameters of the added prompt information for each network layer, thus reconstructing the question-answering recognition model to achieve the adjustment objective. If there is no prompt information to be updated, it indicates that the question-answering task recognition model is at its optimal processing capacity; therefore, it can continue to be used.

[0069] In another embodiment of the invention, for further explanation and limitation, before retrieving the pre-trained question-and-answer recognition model based on the question-and-answer information, the method further includes:

[0070] Determine the initial question-answering recognition model to be trained and obtain prompt information;

[0071] The prompt information is added to each network layer of the initial question-answering recognition model, and the initial question-answering recognition model with the added prompt information is trained based on the prompt learning training set.

[0072] During model training, prompts in each network layer are deleted sequentially, and the importance parameters of the prompts corresponding to the deleted prompts are determined.

[0073] Based on the importance parameter of the prompt, the prompt information to be added is selected, and a question-answering recognition model is constructed according to the prompt information to be added and each of the network layers, and the question-answering recognition model is trained based on the task learning training set.

[0074] To improve the execution speed of question-answering tasks by constructing a question-answering recognition model that does not require training for each specific task, the current execution end first determines an initial question-answering recognition model and obtains the necessary prompts. Preferably, the initial question-answering recognition model is constructed based on a convolutional neural network with at least three layers, adding prompts at each layer. In this embodiment, the prompts are pre-configured. If the length of the training text is L, the length of the corresponding added prompts is k, where L > k. In this case, the network layer is M, and the hidden state dimension during encoding in the initial question-answering recognition model is d. The learnable prompts are obtained by concatenating a randomly initialized learnable parameter matrix k*d before each layer of the initial question-answering recognition model, i.e., the sentence hidden state (which is a matrix of dimension L*d). This ensures that the initial question-answering recognition model actually receives input of dimension (L+k)*d, allowing for model training based on the prompt-learning training set.

[0075] It should be noted that during the training of the initial question-answering recognition model based on the prompt learning training set, it is necessary to sequentially delete the prompt information in each network layer. While retaining the prompt information in other layers, the prompt importance parameters corresponding to the deleted prompt information are determined. Based on the determined prompt importance parameters of the added prompt information in each network layer, the question-answering recognition model is finally constructed.

[0076] It should be noted that after the question-answering recognition model is built, since each network layer in the question-answering recognition model only retains the most important prompts, it can be flexibly trained once for different question-answering tasks by combining the task learning training set with the question-answering recognition model in a wider range of applications, thereby reducing the system pressure of training the model for each question-answering task.

[0077] In another embodiment of the invention, for further explanation and limitation, the steps of sequentially deleting the prompt information in each network layer and determining the prompt importance parameter corresponding to the deleted prompt information include:

[0078] The target prompt information of the target network layer to be deleted is determined in hierarchical order, and the first model accuracy obtained by training the initial question-answering recognition model based on the prompt learning training set is obtained.

[0079] Based on the prompt learning training set, the initial question recognition model after deleting the target prompt information is trained to obtain the second model accuracy of the initial question recognition model;

[0080] The importance parameter of the target prompt information is determined based on the difference between the accuracy of the first model and the accuracy of the second model.

[0081] To accurately determine the importance parameter of the prompts and filter out the prompt information that can be retained in each network layer, the current execution end first determines the first target prompt information of the target network layer to be deleted, i.e., it determines them sequentially according to the order of each layer. Specifically, after deleting the target prompt information of the target network layer, the initial question-answering recognition model is trained based on the prompt learning training set to obtain the accuracy of the second model, and the difference between the second model accuracy and the accuracy of the first model is calculated. The accuracy of the first model is obtained by training the initial question-answering recognition model based on the prompt learning training set. Therefore, the importance parameter of the target prompt information of the target network layer is calculated as the difference between the accuracy of the first model and the accuracy of the second model. For example, when calculating the importance parameter of the prompt information of the i-th layer (i can be equal to 1, 2, 4, ... 12, without specific limitation), the prompt information of the i-th layer is removed, the initial question-answering recognition model with the remaining prompt information is trained on the prompt learning training set, and the accuracy S is calculated. t The initial question-answering recognition model with all prompts is then trained on the prompt learning training set, and the accuracy S is calculated. all S t With S all The difference between the values ​​is the importance parameter of the prompt information in layer i. A larger difference score indicates that the prompt information in layer i is more important.

[0082] In another embodiment of the invention, for further explanation and limitation, the step of filtering the information to be added based on the importance parameter of the prompt, and constructing a question-answering recognition model according to the information to be added and each of the network layers includes:

[0083] The prompts whose importance parameters meet the preset importance threshold are identified as prompts to be added; or,

[0084] The importance parameters of the prompts are sorted, and the prompt information to be added is determined from the sorted importance parameters according to a preset number of filters.

[0085] To accurately construct the question-answering recognition model and facilitate deployment for different question-answering tasks, in one specific implementation scenario, the current execution end filters the prompt information according to a preset importance threshold. This preset importance threshold is a set threshold, such as 5 or 10, and is not specifically limited in this embodiment. For example, after calculating the importance parameters of all network layers, only the importance parameters of the prompt information added to the third and fourth layers are greater than the preset importance threshold of 10. Therefore, the prompt information added to the third and fourth layers is retained. That is, when the calculated importance parameter of a prompt is greater than this preset importance threshold, it is determined that this prompt information is the final prompt information required to construct the question-answering recognition model. In another specific implementation scenario, the current execution end can select according to a preset number of filters. That is, after calculating the importance parameters of all network layers, they are sorted from largest to smallest, and prompt information that meets the preset number of filters is selected, thus retaining the addition of these prompts. For example, if the preset number of filters is 3, and the information is sorted according to the importance parameter of the prompt information, the prompt information corresponding to the 2nd, 4th and 5th layers will be retained. This embodiment of the invention does not make specific limitations.

[0086] In another embodiment of the invention, for further explanation and limitation, the step of updating the prompt information based on the prompt information to be updated includes:

[0087] Analyze the task keywords in the question-and-answer task evaluation information and determine the prompt learning objects that match the task keywords;

[0088] According to the prompt learning object, the matching prompt information to be updated is found in the prompt task configuration information, and the prompt information to be updated is used to replace the prompt information in the question-answering recognition model.

[0089] To improve the accuracy and effectiveness of question-and-answer task processing, when updating the prompt information based on the question-and-answer task evaluation information, the current execution terminal first parses the task keywords in the question-and-answer task evaluation information to determine whether an update is needed. These task keywords characterize the evaluation results in the question-and-answer task evaluation information, including but not limited to evaluation terms such as "satisfied," "unsatisfied," and "neutral." These keywords can be determined according to different evaluation systems, and this embodiment of the invention does not impose specific limitations. In addition, to improve the accuracy of the question-and-answer recognition model after adding prompts, prompt learning objects corresponding to different task keywords are pre-configured. This allows for the retrieval of prompts to be updated from the prompt task configuration information. The prompt learning objects represent replaceable classification labels or predicted labels in the prompt learning training set. For example, if the task keyword is "unsatisfied," the prompt learning object matching the task keyword is determined to be the label in the prompt learning training set whose classification result is "yes." Therefore, matching prompts to be updated are retrieved from the prompt task configuration information (which contains updated prompts corresponding to different labels or predicted results). In this embodiment, the prompts in the prompt task configuration information can be configured based on the applicable scenarios of the question-and-answer task by the developers; this embodiment does not impose specific limitations. Once a prompt to be updated is matched, this prompt is replaced in the question-and-answer recognition model.

[0090] It should be noted that after the prompt information is updated, the current execution end retrains the question-and-answer recognition model, that is, it redetermines the importance parameters of the prompts after adding the prompt information to each network layer, so as to rebuild a new question-and-answer recognition model and thus optimize the question-and-answer recognition model.

[0091] In another embodiment of the invention, for further explanation and limitation, the step of retrieving the pre-trained question-and-answer recognition model based on the question-and-answer information includes:

[0092] After the question-and-answer recognition model completes its training, a task classification matching the question-and-answer recognition model is generated. The task classification is used to define the scope of question-and-answer tasks that the question-and-answer recognition model can recognize and process.

[0093] The task scenarios corresponding to the question-and-answer information are analyzed, and the task categories are matched with the task scenarios;

[0094] If the task category matches the task scenario, then the question-answering recognition model corresponding to the task category is retrieved.

[0095] To meet the processing needs of question-answering recognition models in different question-answering scenarios, improve the applicability of question-answering recognition models, and reduce the training pressure on each model, the current execution end monitors in real time whether the question-answering recognition model has completed model training, such as whether the model accuracy has reached a preset range. This embodiment of the invention does not impose specific limitations. After the model's U-shaped capability is completed, a task classification matching the question-answering recognition model is generated. That is, classification can be performed by learning the training set through the recognition task. For example, if the question-answer information in the task learning training set conforms to insurance classification, claims classification, and tax classification, then the task classification is one of the three major categories: insurance classification, claims classification, and tax classification. The current execution end only needs to use natural language processing technology to identify whether the text words in the training set match the major categories in the preset classification word library to determine the task classification. This embodiment of the invention does not impose specific limitations. Once the question and answer information is determined, the text of words in the question and answer information is identified based on natural language processing technology to determine the task scenario. For example, "I consult about purchasing insurance" can be identified as an insurance scenario through specific words such as "consultation". Therefore, it is determined whether insurance matches the insurance category. If they match, the question and answer recognition model corresponding to the insurance category can be retrieved. This embodiment of the invention does not make specific limitations.

[0096] It should be noted that if there are multiple question-answering recognition models for matching task classification, any one of them can be called for processing, and the embodiments of the present invention do not make specific limitations.

[0097] In another embodiment of the invention, for further explanation and limitation, the steps further include:

[0098] If no evaluation information for the question-answering task matching the recognition result is obtained, then the text information of the completed question-answering task is obtained, and the matching prompt learning training set and / or task learning training set is determined from the number of affirmative words in the text information, so as to retrieve the question-answering recognition model trained based on the prompt learning training set and / or the task learning training set.

[0099] To accurately train the question-answering recognition model and achieve unmanned question answering through human learning, when the current execution terminal does not obtain question-answering task evaluation information matching the recognition result, it indicates that the user has not provided feedback on the execution of the aforementioned question-answering task. Therefore, the current execution terminal obtains the text information of the completed question-answering task. This text information refers to the complete question-answering dialogue between the user and the AI, used to determine the corresponding prompt learning training set and / or task learning training set based on the number of affirmative words in the text information. This allows for retraining the question-answering recognition model based on the selected training set. Furthermore, affirmative words can be identified using natural language processing (NLP) technology. For example, NLP can identify the affirmative word "correct" in the text information "Yes, I did buy this insurance." This embodiment of the invention does not impose specific limitations. It should be noted that the prompt learning training set is the pre-training sample set used when building the question-answering recognition model, while the task learning training set is the sample set used to train the question-answering recognition model to meet the needs of different question-answering tasks. Both the prompt learning training set and / or the task learning training set can be updated in real time according to time intervals or question-answering information. When the number of affirmative words in the prompt learning training set and / or the task learning training set is the same as or greater than the number of affirmative words counted above, any training set can be directly called to re-optimize the training and improve the accuracy of the model.

[0100] This invention provides a method for processing question-and-answer tasks. Compared with existing technologies, this invention, upon detecting the execution of a question-and-answer task, parses the question-and-answer information of the task; retrieves a pre-trained question-and-answer recognition model based on the question-and-answer information (the model is trained by filtering the added prompts in each network layer based on their importance); processes the question-and-answer information based on the recognition model to obtain the recognition result of the task, and acquires the question-and-answer task evaluation information matching the recognition result; when there is prompt information to be updated that matches the evaluation information, updates the prompt information based on the prompt information to be updated, and adjusts the question-and-answer recognition model matching the task based on the updated prompt information. This achieves the goal of improving the model based on prompt information, reduces the addition of unimportant prompt information, improves the model's adaptability, and greatly improves the efficiency and accuracy of question-and-answer processing based on the question-and-answer recognition model, thereby improving the effectiveness of question-and-answer recognition processing.

[0101] Furthermore, as a response to the above Figure 1 The implementation of the method shown in this embodiment of the invention provides a question-answering task processing device, such as... Figure 2 As shown, the device includes:

[0102] The parsing module 21 is used to parse the question and answer information of the question and answer task after detecting that the question and answer task has been executed;

[0103] The retrieval module 22 is used to retrieve the question-and-answer recognition model that has been trained based on the question-and-answer information. The question-and-answer recognition model is obtained by training the model after filtering the prompt information added in each network layer based on the importance of the prompts.

[0104] The processing module 23 is used to process the question and answer information based on the question and answer recognition model to obtain the recognition result of the question and answer task, and to obtain the question and answer task evaluation information that matches the recognition result;

[0105] The adjustment module 24 is used to update the prompt information based on the prompt information to be updated when there is prompt information to be updated that matches the evaluation information of the question-answering task, and to adjust the question-answering recognition model matched by the question-answering task based on the updated prompt information.

[0106] Furthermore, the device also includes:

[0107] The determination module is used to determine the initial question-answering recognition model to be trained and to obtain prompt information;

[0108] The training module is used to add the prompt information to each network layer of the initial question-answering recognition model, and to train the initial question-answering recognition model after adding the prompt information based on the prompt learning training set.

[0109] The deletion module is used to sequentially delete the prompt information in each network layer during model training and determine the prompt importance parameter corresponding to the deleted prompt information.

[0110] The module is used to filter the prompt information to be added based on the prompt importance parameter, and to build a question-answering recognition model according to the prompt information to be added and each of the network layers, so as to train the question-answering recognition model based on the task learning training set.

[0111] Further, the deletion module is specifically used to sequentially determine a target prompt message of the target network layer to be deleted according to the hierarchical order, and obtain a first model accuracy obtained by training the initial question-answering recognition model based on the prompt learning training set; train the initial question recognition model after deleting the target prompt message based on the prompt learning training set to obtain a second model accuracy of the initial question recognition model; and determine the prompt importance parameter of the target prompt message based on the difference between the first model accuracy and the second model accuracy.

[0112] Furthermore, the deletion module is specifically used to determine the prompt information whose prompt importance parameter meets the preset importance threshold as the prompt information to be added; or, to sort multiple prompt importance parameters and determine the prompt information to be added from the sorted prompt importance parameters according to a preset number of filters.

[0113] Furthermore, the adjustment module is specifically used to parse the task keywords in the question-and-answer task evaluation information and determine the prompt learning object that matches the task keywords; according to the prompt learning object, it searches for matching prompt information to be updated from the prompt task configuration information and replaces the prompt information in the question-and-answer recognition model with the prompt information to be updated.

[0114] Furthermore, the retrieval module is specifically used to parse the task keywords in the question-and-answer task evaluation information and determine the prompt learning object that matches the task keywords; according to the prompt learning object, it searches for matching prompt information to be updated from the prompt task configuration information and replaces the prompt information in the question-and-answer recognition model with the prompt information to be updated.

[0115] Furthermore, the device also includes:

[0116] The acquisition module is used to acquire text information of completed question-answering tasks if no evaluation information matching the recognition result is acquired, and to determine the matching prompt learning training set and / or task learning training set from the number of affirmative words in the text information, so as to retrieve the question-answering recognition model trained based on the prompt learning training set and / or the task learning training set.

[0117] This invention provides a question-and-answer task processing device. Compared with the prior art, the embodiments of this invention, upon detecting the execution of a question-and-answer task, parse the question-and-answer information of the task; retrieve a pre-trained question-and-answer recognition model based on the question-and-answer information, wherein the model is trained after filtering the added prompt information in each network layer based on the importance of the prompts; process the question-and-answer information based on the question-and-answer recognition model to obtain the recognition result of the question-and-answer task, and obtain the question-and-answer task evaluation information matching the recognition result; when there is prompt information to be updated that matches the question-and-answer task evaluation information, update the prompt information based on the prompt information to be updated, and adjust the question-and-answer recognition model matching the question-and-answer task based on the updated prompt information. This achieves the purpose of improving the model based on prompt information, reduces the addition of unimportant prompt information, improves the model's adaptability, greatly improves the processing efficiency and accuracy of question-and-answer based on the question-and-answer recognition model, and thus improves the effectiveness of question-and-answer recognition processing.

[0118] According to one embodiment of the present invention, a storage medium is provided, the storage medium storing at least one executable instruction, the computer-executable instruction being capable of executing the question-and-answer task processing method in any of the above method embodiments.

[0119] Figure 3 The diagram illustrates a structural schematic of a computer device according to an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.

[0120] like Figure 3 As shown, the computer device may include: a processor 302, a communications interface 304, a memory 306, and a communications bus 308.

[0121] The processor 302, communication interface 304, and memory 306 communicate with each other via communication bus 308.

[0122] Communication interface 304 is used to communicate with other network elements such as clients or other servers.

[0123] The processor 302 is used to execute program 310, specifically to execute the relevant steps in the above-described question-and-answer task processing method embodiment.

[0124] Specifically, program 310 may include program code that includes computer operation instructions.

[0125] Processor 302 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0126] Memory 306 is used to store program 310. Memory 306 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0127] Specifically, program 310 can be used to cause processor 302 to perform the following operations:

[0128] Once a question-and-answer task is detected, the question and answer information of the task is parsed.

[0129] The question-and-answer recognition model that has been trained is retrieved based on the question-and-answer information. The question-and-answer recognition model is obtained by training the model after filtering the prompt information added in each network layer based on the importance of the prompt.

[0130] Based on the question-and-answer recognition model, the question-and-answer information is recognized and processed to obtain the recognition result of the question-and-answer task, and the question-and-answer task evaluation information matching the recognition result is obtained;

[0131] When there is a prompt message that matches the evaluation information of the question-answering task, the prompt message is updated based on the prompt message to be updated, and the question-answering recognition model matched by the question-answering task is adjusted based on the updated prompt message.

[0132] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0133] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for processing question-answering tasks, characterized in that, include: Once a question-and-answer task is detected, the question and answer information of the task is parsed. The question-and-answer recognition model that has been trained is retrieved based on the question-and-answer information. The question-and-answer recognition model is obtained by training the model after filtering the prompt information added in each network layer based on the importance of the prompt. Based on the question-and-answer recognition model, the question-and-answer information is recognized and processed to obtain the recognition result of the question-and-answer task, and the question-and-answer task evaluation information matching the recognition result is obtained; When there is a prompt message that matches the evaluation information of the question-answering task, the prompt message is updated based on the prompt message to be updated, and the question-answering recognition model matched by the question-answering task is adjusted based on the updated prompt message. Before retrieving the pre-trained question-answering recognition model based on the question-answering information, the method further includes: Determine the initial question-answering recognition model to be trained and obtain prompt information; The prompt information is added to each network layer of the initial question-answering recognition model, and the initial question-answering recognition model with the added prompt information is trained based on the prompt learning training set. During model training, prompts in each network layer are deleted sequentially, and the importance parameters of the prompts corresponding to the deleted prompts are determined. Based on the importance parameter of the prompt, the prompt information to be added is selected, and a question-answering recognition model is constructed according to the prompt information to be added and each of the network layers, and the question-answering recognition model is trained based on the task learning training set.

2. The method according to claim 1, characterized in that, The step of sequentially deleting the prompt information in each network layer and determining the prompt importance parameter corresponding to the deleted prompt information includes: The target prompt information of the target network layer to be deleted is determined in hierarchical order, and the first model accuracy obtained by training the initial question-answering recognition model based on the prompt learning training set is obtained. Based on the prompt learning training set, the initial question-answering recognition model after deleting the target prompt information is trained to obtain the second model accuracy of the initial question-answering recognition model; The importance parameter of the target prompt information is determined based on the difference between the accuracy of the first model and the accuracy of the second model.

3. The method according to claim 1, characterized in that, The step of filtering the information to be added based on the importance parameter of the prompt, and constructing a question-answering recognition model according to the information to be added and each of the network layers, includes: The prompts whose importance parameters meet the preset importance threshold are identified as prompts to be added; or, The importance parameters of the prompts are sorted, and the prompt information to be added is determined from the sorted importance parameters according to a preset number of filters.

4. The method according to any one of claims 1-3, characterized in that, The step of updating the prompt information based on the prompt information to be updated includes: Analyze the task keywords in the question-and-answer task evaluation information and determine the prompt learning objects that match the task keywords; According to the prompt learning object, the matching prompt information to be updated is found in the prompt task configuration information, and the prompt information to be updated is used to replace the prompt information in the question-answering recognition model.

5. The method according to claim 4, characterized in that, The step of retrieving the pre-trained question-and-answer recognition model based on the question-and-answer information includes: After the question-and-answer recognition model completes its training, a task classification matching the question-and-answer recognition model is generated. The task classification is used to define the scope of question-and-answer tasks that the question-and-answer recognition model can recognize and process. The task scenarios corresponding to the question-and-answer information are analyzed, and the task categories are matched with the task scenarios; If the task category matches the task scenario, then the question-answering recognition model corresponding to the task category is retrieved.

6. The method according to claim 1, characterized in that, The method further includes: If no evaluation information for the question-answering task matching the recognition result is obtained, then the text information of the completed question-answering task is obtained, and the matching prompt learning training set and / or task learning training set is determined from the number of affirmative words in the text information, so as to retrieve the question-answering recognition model trained based on the prompt learning training set and / or the task learning training set.

7. A processing apparatus for a question-and-answer task, characterized in that, include: The parsing module is used to parse the question and answer information of the question and answer task after it is detected that a question and answer task has been executed; The retrieval module is used to retrieve the question-and-answer recognition model that has been trained based on the question-and-answer information. The question-and-answer recognition model is obtained by training the model after filtering the prompt information added in each network layer based on the importance of the prompts. The processing module is used to process the question and answer information based on the question and answer recognition model, obtain the recognition result of the question and answer task, and obtain the question and answer task evaluation information that matches the recognition result; The adjustment module is used to update the prompt information based on the prompt information to be updated when there is prompt information to be updated that matches the evaluation information of the question-answering task, and to adjust the question-answering recognition model matched by the question-answering task based on the updated prompt information. The device further includes: The determination module is used to determine the initial question-answering recognition model to be trained and to obtain prompt information; The training module is used to add the prompt information to each network layer of the initial question-answering recognition model, and to train the initial question-answering recognition model after adding the prompt information based on the prompt learning training set. The deletion module is used to sequentially delete the prompt information in each network layer during model training and determine the prompt importance parameter corresponding to the deleted prompt information. The module is used to filter the prompt information to be added based on the prompt importance parameter, and to build a question-answering recognition model according to the prompt information to be added and each of the network layers, so as to train the question-answering recognition model based on the task learning training set.

8. A storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the question-and-answer task processing method as described in any one of claims 1-6.

9. A computer device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the question-and-answer task processing method as described in any one of claims 1-6.