CN113377936B - Intelligent question and answer method, device and equipment - Google Patents

Intelligent question and answer method, device and equipment Download PDF

Info

Publication number
CN113377936B
CN113377936B CN202110570657.1A CN202110570657A CN113377936B CN 113377936 B CN113377936 B CN 113377936B CN 202110570657 A CN202110570657 A CN 202110570657A CN 113377936 B CN113377936 B CN 113377936B
Authority
CN
China
Prior art keywords
question
target
standard
label
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110570657.1A
Other languages
Chinese (zh)
Other versions
CN113377936A (en
Inventor
薛志超
毛康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Souche Data Technology Co ltd
Original Assignee
Hangzhou Souche Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Souche Data Technology Co ltd filed Critical Hangzhou Souche Data Technology Co ltd
Priority to CN202110570657.1A priority Critical patent/CN113377936B/en
Publication of CN113377936A publication Critical patent/CN113377936A/en
Application granted granted Critical
Publication of CN113377936B publication Critical patent/CN113377936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides an intelligent question answering method, device and equipment, and relates to the technical field of computers. The method comprises the following steps: acquiring a target problem to be processed, and performing intention identification processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode; if the question intention is determined to be the matter consultation in the specified field, matching the target question and a plurality of pre-generated standard question-answer templates through a question processing model to obtain a standard answer of the target question; and returning standard answers to the questioning users of the target questions. Through the embodiment of the application, the intelligent question-answering efficiency and the model training efficiency are improved, and the model deployment difficulty is reduced.

Description

Intelligent question and answer method, device and equipment
Technical Field
The application relates to the technical field of computers, in particular to an intelligent question answering method, device and equipment.
Background
With the continuous development of artificial intelligence technology and natural language processing technology, the intelligent question-answering system is widely used with the characteristics of fast response speed, high answer accuracy and the like. When the existing intelligent question-answering system carries out intelligent question-answering, user questions are analyzed mainly based on key word matching, TF-IDF, BERT models and other modes, and then answers are output. However, the way of keyword matching and statistic TF-IDF is simple and efficient, but the matching efficiency is low; although the BERT model has high matching precision, the recall efficiency is low, and the deployment difficulty is large.
Disclosure of Invention
The embodiment of the application aims to provide an intelligent question answering method, an intelligent question answering device and intelligent question answering equipment, so as to solve the problems that a current intelligent question answering system is low in matching efficiency, large in deployment difficulty and the like.
To solve the above technical problem, one or more embodiments of the present application are implemented as follows:
in a first aspect, an embodiment of the present application provides an intelligent question answering method, including:
acquiring a target problem to be processed;
performing intention identification processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
if the question intention is determined to be the item consultation in the specified field, matching the target question and a plurality of pre-generated standard question-answer templates through the question processing model to obtain a standard answer of the target question;
and returning the standard answer to the questioning user of the target question.
In a second aspect, an embodiment of the present application provides an intelligent question answering device, including:
the acquisition module acquires a target problem to be processed;
the recognition module is used for performing intention recognition processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
the matching module is used for matching the target question and a plurality of pre-generated standard question-answer templates through the question processing model to obtain a standard answer of the target question if the question intention is determined to be the item consultation in the specified field;
and the feedback module returns the standard answer to the questioning user of the target question.
In a third aspect, an embodiment of the present application provides an intelligent question answering device, including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to carry out the steps of the intelligent question-answering method provided by the first aspect described above.
In a fourth aspect, an embodiment of the present application provides a storage medium for storing computer-executable instructions, where the computer-executable instructions, when executed, implement the steps of the intelligent question answering method provided in the first aspect.
According to the intelligent question-answering method, the intelligent question-answering device and the intelligent question-answering equipment, a question processing model is trained in advance based on a multi-task training mode, the question intention of a target question is identified through the question processing model, and when the question intention is matter consultation, the target question is matched with a plurality of standard question-answering templates which are obtained in advance through the question processing model, and standard answers of the target question are obtained. Because the recognition of the problem intention and the matching of the problem are carried out through the problem processing model, the recognition accuracy and the matching accuracy are improved, and the intelligent question-answering efficiency is improved; moreover, the problem processing model is trained based on a multi-task training mode, compared with multiple times of deployment and multiple times of training, the deployment resource of the model is saved, the deployment difficulty is reduced, and the model training efficiency is improved; in addition, the multi-task training increases the training sample size, so that the model can be concentrated on important features, and more universal features among multiple tasks can be learned, therefore, the model can be prevented from being over-fitted to a certain task, and the regularization effect is achieved.
Drawings
In order to more clearly illustrate one or more embodiments of the present application or technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without inventive exercise.
Fig. 1 is a first schematic flow chart of an intelligent question answering method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a second method for intelligent question answering according to an embodiment of the present application;
fig. 3 is a third schematic flow chart of an intelligent question answering method according to an embodiment of the present application;
fig. 4 is a fourth flowchart schematically illustrating an intelligent question answering method according to an embodiment of the present application;
fig. 5 is a fifth flowchart illustrating an intelligent question answering method according to an embodiment of the present application;
FIG. 6 is a detailed diagram of step S100-10 provided in an embodiment of the present application;
FIG. 7 is a detailed diagram of steps S100-12 provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a training network according to an embodiment of the present application;
fig. 9 is a schematic diagram illustrating a module composition of an intelligent question answering device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an intelligent question answering device according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without making any creative effort shall fall within the protection scope of the present application.
Fig. 1 is a schematic flowchart of an intelligent question answering method provided in an embodiment of the present application, where the method in fig. 1 can be executed by an intelligent question answering device, as shown in fig. 1, the method includes the following steps:
step S102, acquiring a target problem to be processed;
the intelligent question answering method provided by the embodiment of the application can be applied to various fields, such as the financial field, the E-commerce field, the automobile field and the like, and the automobile field is taken as an example in the following embodiments of the application for explanation. Optionally, the intelligent question-answering device is disposed in a terminal device of a user, for example, in a client related to an automobile field installed in the terminal device, where the client may be an independent Application program (App), or may be an applet embedded in another Application program, or may be a web-based Application. When the questioning user wants to consult related questions in the automobile field, such as after-sales maintenance questions of the vehicle, the questioning interface of the client in the terminal equipment can be operated to perform questioning, and the intelligent questioning and answering device responds to the questioning operation of the questioning user to obtain target questions to be processed. Or the intelligent inquiry device is arranged at the server, the terminal equipment of the questioning user is provided with a corresponding client, the client responds to the questioning operation executed by the questioning user based on the consultation interface, acquires the target question to be processed and sends the target question to the server, and the intelligent question-answering device acquires the target question received by the server.
Step S104, performing intention identification processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
in consideration of the fact that in practical application, a questioning user may operate a consultation interface to submit texts which are irrelevant to the event consultation in a specified field due to curiosity, for example, greetings and the like, in order to quickly respond to the questioning user, in one or more embodiments of the present application, after obtaining a target question, an intelligent question answering device first performs intention identification processing on the target question through a question processing model trained in advance, so as to obtain a question intention of the target question. The problem processing model is obtained by training based on a multi-task training mode, so that the problem processing model can perform multi-task related processing. The training process for the problem-handling model is described in detail later.
Step S106, if the question intention is determined to be the item consultation in the designated field, matching the target question and a plurality of pre-generated standard question-answer templates through a question processing model to obtain a standard answer of the target question;
the specific area of event consultation, such as vehicle purchasing consultation, vehicle maintenance consultation and the like in the automobile area. The standard question-and-answer template includes a plurality of standard questions and standard answers for each standard question.
And step S108, returning standard answers to the questioning users of the target questions.
Specifically, when the intelligent question answering device is arranged on the client side, the standard answers are displayed so that the questioning user can check the questions. When the intelligent question-answering device is arranged at the server side, the standard answers are sent to the corresponding client side, so that the client side can display the standard answers for the questioning user to check.
Further, if it is determined that the question intention is not the matter consultation of the specified field, the preset first response information is obtained, and the first response information is returned to the questioning user of the target question. The first response information may be set as needed in the actual application, for example, the first response information is "how good you can ask what can help you? ".
In one or more embodiments of the present application, a question processing model is trained in advance based on a multitask training mode, a question intention of a target question is identified through the question processing model, and when the question intention is a matter consultation, the target question is matched with a plurality of standard question-answer templates obtained in advance through the question processing model, so as to obtain a standard answer of the target question. Because the recognition of the problem intention and the matching of the problem are carried out through the problem processing model, the recognition accuracy and the matching accuracy are improved, and the intelligent question-answering efficiency is improved; moreover, the problem processing model is trained based on a multi-task training mode, compared with multiple times of deployment and multiple times of training, the deployment resource of the model is saved, the deployment difficulty is reduced, and the model training efficiency is improved; in addition, the multi-task training increases the training sample size, so that the model can be concentrated on important features, and more universal features among multiple tasks can be learned, therefore, the model can be prevented from being over-fitted to a certain task, and the regularization effect is achieved.
In order to realize problem intention identification, in one or more embodiments of the present application, problem categories are divided in advance for problems in a specific field (such as an automobile field), and are distinguished by labels. Accordingly, as shown in fig. 2, step S104 may include the following step S104-2:
step S104-2, performing intention identification processing on the target problem through an intention identification task of a pre-trained problem processing model to obtain a primary label and a secondary label of the target problem; the first-level label and the second-level label represent the problem category of the target problem, and the second-level label is a sub-label of the first-level label;
it should be noted that the hierarchy of the label can be set by itself in practical application as required, and if the second-level label still cannot effectively distinguish the problem categories, a third-level label can be set, and the third-level label is a sub-label of the second-level label.
Corresponding to step S104-2, as shown in FIG. 2, step S106 may include the following steps S106-2 and S106-4:
step S106-2, if the primary label and the secondary label of the target problem belong to a preset label set, determining that the problem intention of the target problem is the item consultation of the specified field;
and S106-4, matching the target question with a plurality of pre-generated standard question and answer templates through the question processing model to obtain a standard answer of the target question.
Further, in order to improve recall precision and matching efficiency of the problem processing model and further improve return efficiency of standard answers, in one or more embodiments of the present application, a rough recall is performed on the basis of the primary label and the secondary label obtained through the intention identification processing, and matching processing is performed on the basis of a result of the rough recall. Specifically, as shown in fig. 3, step S106-4 may include the following steps S106-42 to S106-48:
step S106-42, at least one standard question of a primary label and a secondary label marked with a target question is obtained from a pre-generated standard question-answering template, and the obtained standard question is determined as a candidate question;
specifically, the first-level label and the second-level label of the target question are matched with the first-level label and the second-level label of the standard question in the standard question-and-answer template, and if the first-level label and the second-level label are successfully matched, the standard question corresponding to the successfully matched first-level label and second-level label is determined as a candidate question.
S106-44, combining the target problem with each candidate problem to obtain a problem combination to be matched;
for example, candidate questions include question 1, question 3, and question 4; combining the target problem with the problem 1 to obtain a problem combination 1 to be matched; combining the target question with the question 3 to obtain a question combination 2 to be matched, and combining the target question with the question 4 to obtain a question combination 3 to be matched.
S106-46, matching the target problem and the candidate problem in the problem combination through a text matching task of the problem processing model to obtain a first similarity of the target problem and the candidate problem in each problem combination;
and S106-48, sequencing the first similarity to obtain the maximum similarity, and if the maximum similarity is not less than a preset similarity threshold, determining the standard answer of the candidate question corresponding to the maximum similarity as the standard answer of the target question.
Specifically, the first similarity is sequenced to obtain the maximum similarity, whether the maximum similarity is not smaller than a preset similarity threshold value is determined, if yes, the standard answer of the standard question corresponding to the maximum similarity is determined as the standard answer of the target question; if not, determining the preset second response information as a standard answer of the target question. When the maximum similarity is smaller than the similarity threshold, the semantic mean-difference distance between the representation target question and each candidate question is large, and at the moment, in order to avoid misleading a questioning user, the preset second response information is determined as a standard answer of the target question; wherein the second response message is "sorry, this problem is too difficult, i have not learned", etc.
Therefore, the first label and the second label of the target problem identified according to the intention are subjected to rough recall to obtain a candidate problem, the candidate problem is subjected to matching processing, the matching range is greatly reduced, the matching efficiency is improved, and the response rate of the target problem is further improved.
In order to effectively respond to a target question asking a user, in one or more embodiments of the present application, a standard answer template is pre-established. Specifically, as shown in fig. 4, step S102 may further include step S100-2 to step S100-8:
s100-2, acquiring historical questions in the specified field and answers of the historical questions;
specifically, relevant questions and answers in the current specified field are obtained from specified websites, forums and the like in a preset mode, the obtained questions are determined as historical questions, and the obtained answers are determined as answers to the historical questions. Wherein the preset mode is a crawler mode or the like.
Furthermore, after the historical questions and the answers to the historical questions are obtained, the historical questions and the answers to the historical questions can be stored in a designated original database for storing original data.
S100-4, clustering historical problems according to a preset clustering mode to obtain a plurality of problem sets; the problem types among the problem sets are different, and all historical problems in each problem set are similar problems;
the clustering mode can be set in practical application according to needs, for example, a BERT-base model is adopted, feature extraction is carried out on historical problems based on a feature-based method, and then clustering is carried out on similar problems. It can be understood that the similarity problem is a similar or identical semantic problem, and when the similarity between the similarity problems is calculated by a computer processing technology, the similarity is greater than a preset similarity threshold.
Further, after the question sets are obtained, the question sets and answers of all historical questions in the question sets can be stored in a specified labeling database.
S100-6, determining at least one standard problem in each problem set, and labeling a primary label and a secondary label of the problem category representing the standard problem; wherein, the secondary label is a sub-label of the primary label;
specifically, historical problems in each problem set in the labeling database are displayed, so that an administrator can perform manual verification, screen out the historical problems with wrong problem classification, and label a primary label and a secondary label of each standard problem; when the intelligent question answering device acquires verification information generated based on the verification operation of an administrator, deleting corresponding historical questions from a corresponding question set, and marking labels to be labeled on the deleted historical questions; and when the labeling information generated based on the labeling operation of the administrator is acquired, determining the historical problem corresponding to the labeling information as the standard problem of the corresponding problem set. The labeling information comprises a first-level label and a second-level label.
And S100-8, determining standard answers of the standard questions from the obtained answers, and generating a standard question-answer template according to the marked standard questions and the standard answers.
Specifically, the answers of all historical questions in the label database are displayed, so that an administrator can select the standard answers of all standard questions; and when the selection information generated based on the submitting operation of the administrator is acquired, determining the answer corresponding to the selection information as the standard answer of the corresponding standard question. And generating a standard question-answer template according to each standard question and the standard answer of the standard question.
Therefore, historical problems are classified through a clustering mode on a line, manual verification and standard problems are carried out after a problem set is obtained, and manual marking is not needed to be carried out on each historical problem, so that on the basis of ensuring the problem classification accuracy of each historical problem, the labor cost for marking is greatly saved, and the marking efficiency is improved.
In order to achieve intelligent question answering and improve the value of the acquired historical questions, in one or more embodiments of the present application, after a standard question-and-answer template is generated, the historical questions in each question set are also stored in a similar question bank, and a question processing model is trained based on each question in the similar question bank. Specifically, as shown in fig. 5, step S102 may further include the following steps S100-10 and S100-12 before:
s100-10, generating a problem sample to be trained according to the obtained problem set;
specifically, as shown in fig. 6, step S100-10 may include the following steps S100-10-2 to S100-10-8:
s100-10-2, determining a primary label and a secondary label of each historical problem in each problem set;
specifically, the primary label and the secondary label of each standard problem are determined as the primary label and the secondary label of a similar problem in the problem set where each standard problem is located.
S100-10-4, determining each historical problem, the primary label and the secondary label of the historical problem as a first problem sample to be trained of an intention recognition task in a problem processing model;
for example, historical problem 1, the primary label and the secondary label of historical problem 1 are determined as a first problem sample; historical problem 2, the primary label and the secondary label of historical problem 2 are determined as a first problem sample.
S100-10-6, acquiring the non-similar problem of each standard problem from the problem set according to a preset sampling strategy;
the sampling strategy can be set in practical application according to the requirement. For example, the random sampling strategy is to randomly select at least one historical problem from any problem set except a problem set where a standard problem exists, and determine the historical problem in the selected area as a non-similar problem of the standard problem. For another example, strategies such as Jacard distance and Euclidean distance are adopted to obtain the non-similarity problem of the body of the standard. Since the Jacard distance, the Euclidean distance, is a well known technique in the art, it is not described in detail herein.
Further, it can be understood that the similarity obtained when the similarity calculation is performed on the standard problem and the non-similar problem thereof by the computer processing technology is not greater than a preset similarity threshold value, wherein the problem is that the non-similar problem is different in semantics.
Step S100-10-8, combining each standard problem with similar problems and non-similar problems of the standard problems respectively to obtain a problem combination, and marking similarity labels of the problem combinations;
as an example, if the similar questions of standard question 1 include question 2 and question 3, and the dissimilar questions include question 4 and question 5, then combine standard question 1 with question 2 to obtain question combination 1, and label 1 for question combination 1 that characterizes the similarity of standard question 1 and question 2; combining the standard question 1 with the question 3 to obtain a question combination 2, and marking the question combination 2 with a label 1 which represents that the standard question 1 is similar to the question 3; combining the standard problem 1 with the problem 4 to obtain a problem combination 3, and marking a label 2 representing that the standard problem 1 is dissimilar to the problem 4 on the problem combination 3; standard problem 1 is combined with problem 5 to obtain problem combination 4, and problem combination 4 is labeled with label 2 that characterizes standard problem 1 as dissimilar to problem 5.
And S100-10-10, determining the question combination and the similarity label of the question combination as a second question sample to be trained of the text matching task in the question processing model.
If the above question combination 1 and label 1 are determined as one second question sample, the question combination 2 and label 1 are determined as another second question sample, and so on.
Therefore, at least one non-similar problem of the standard problem is obtained based on the preset sampling strategy, the second problem sample is generated based on the non-similar problem, training processing is carried out based on the second problem sample, and the accuracy of the obtained problem processing model can be improved.
Further, considering that new questions may be continuously generated as time goes on, in order to improve the intelligent question answering effectiveness and accuracy of the question processing model, in one or more embodiments of the present application, new historical questions are acquired at preset time intervals, and when it is determined that the update conditions of the similar question library are met, the similar question library is updated based on the new historical questions, and the question processing model is retrained, so as to improve the accuracy of the question processing model. Specifically, the method further comprises the following steps a2 to A8:
step A2, determining target historical problems needing reclassification in the historical problems;
specifically, the historical problem marked with the label to be standardized is determined as the target historical problem needing to be reclassified.
Step A4, acquiring new historical questions and answers of the new historical questions generated in corresponding time intervals according to preset time intervals;
the process of obtaining the new historical questions and the answers to the new historical questions is the same as the process of obtaining the answers to the historical questions and the answers to the historical questions, and is not described in detail herein.
Step A6, determining the target historical problem and the new historical problem as problems to be classified, and matching the problems to be classified and the standard problems through a problem processing model to obtain a second similarity between the problems to be classified and the standard problems;
specifically, each problem to be classified is combined with each standard problem to obtain a problem combination to be matched, and the problem combinations are matched through a problem processing model to obtain second similarity between each problem to be classified and each standard problem.
And step A8, acquiring the similarity problem of the standard problem from the problems to be classified according to the second similarity.
Specifically, according to a preset mode, determining a measurement parameter of the problem to be classified based on the second similarity; sequencing the measurement parameters to obtain a first sequencing result; acquiring a preset first number of target weighing parameters from the first sequencing result; adding the target measurement parameters corresponding to each standard problem; sequencing the results of the addition processing to obtain a second sequencing result; displaying the corresponding problems to be classified according to the second sorting result; if the label information of the displayed problem to be classified by the administrator is acquired, determining whether the corresponding problem to be classified is a similar problem of the corresponding standard problem or not according to the label information; and if so, saving the corresponding similar problems into the problem set corresponding to the standard problems. Correspondingly, when model training is carried out again, step S100-10 comprises generating a problem sample to be trained according to the problem set and the obtained similar problems.
In particular, considering that the process of machine matching is not completely equivalent to human understanding, for the problems to be classified with a large difference between the second similarity and 0.5, such as the problems to be classified with a similarity of 0.9, the problems to be classified with a similarity of 0.1, which are similar or dissimilar to the standard problems, the problem processing model can usually be accurately identified, and such similar problems are usually repeated problems with the previously acquired historical problems without collecting the similar problem library again. In order to accurately classify the problems to be classified, in one or more embodiments of the present application, the problems to be classified are displayed after being sorted based on the target measurement parameters, and are checked and labeled by the administrator, and the problems to be classified are classified based on the acquired standard information of the administrator. The preset mode can be set in practical application according to needs, and the sorting process can be sequential sorting from small to large or sequential sorting from large to small.
As an example, the second similarity is denoted as p, the determination mode of the measurement parameter is |0.5-p |, the measurement parameter is sorted in the order from small to large, and the first number is 2; the similarity between the standard problem 1 and the problem 1 to be classified, the similarity between the standard problem 2 and the problem 3 to be classified are respectively 0.7, 0.4 and 0.8, the corresponding measurement parameters are respectively 0.2, 0.1 and 0.3, the corresponding first sequencing results are respectively 0.1, 0.2 and 0.3, the obtained target measurement parameters are respectively 0.1 and 0.2, and the addition processing result is 0.3; the similarity between the standard problem 2 and the problem 4 to be classified, the similarity between the standard problem 5 and the similarity between the standard problem 2 and the problem 6 to be classified are respectively 0.2, 0.6 and 0.9, the corresponding measurement parameters are respectively 0.3, 0.1 and 0.4, the corresponding first sequencing results are respectively 0.1, 0.3 and 0.4, the obtained target measurement parameters are respectively 0.1 and 0.3, and the addition processing result is 0.4; and the second sequencing results are 0.3 and 0.4, and the questions are displayed according to the sequence of the question to be classified 2, the question to be classified 1, the question to be classified 5 and the question to be classified 4. According to the obtained labeling information of the administrator about the problem 2 to be classified, the problem 1 to be classified, the problem 5 to be classified and the problem 4 to be classified, whether the problem 2 to be classified and the problem 1 to be classified are similar problems of the standard problem 1 or not is determined, and whether the problem 5 to be classified and the problem 4 to be classified are similar problems of the standard problem 2 or not is determined.
And S100-12, performing training processing based on the problem sample according to a preset multi-task training mode to obtain a problem processing model.
Specifically, as shown in fig. 7, step S100-12 may include the following steps S100-12-2 to S100-12-10:
step S100-12-2, dividing the first problem sample into a first training set and a first testing set, dividing the first training set into a plurality of first training subsets, and labeling the first training subsets with first task labels; the first task label represents that the training task is intention identification training;
step S100-12-4, dividing the second problem sample into a second training set and a second testing set, dividing the second training set into a plurality of second training subsets, and labeling the second training subsets with second task labels; the second task label represents that the training task is text matching training;
s100-12-6, iteratively performing training processing based on a first training subset and a second training subset according to a preset multi-task training mode to obtain an initial model of a problem processing model;
specifically, a first target training subset to be trained currently is obtained from the first training subset in an iterative manner, and a second target training subset to be trained currently is obtained from the second training subset; simultaneously inputting the problem samples in the first target training subset and the second target training subset into a training network, and performing simultaneous training of an intention recognition task and a text matching task; and if the iteration times reach the preset times, determining the current obtained model as the initial model of the problem processing model.
The training network may include a sharing layer and a task-specific layer from bottom to top, as shown in fig. 8. After a first problem sample in the first target training subset and a second problem sample in the second target training subset are input simultaneously, in an encoding layer, encoding each problem sample based on a dictionary, wherein the encoding comprises word (word) encoding, position (position) encoding, segment (segment) encoding and the like; characterizing the problem sample as a vector in a vector characterization layer (also referred to as the L1 layer); in the context information capturing layer, capturing context information of each word based on a model; embedding the captured context information into a corresponding vector in a context embedding vector layer (which may also be referred to as an L2 layer); finally, multi-classification is carried out on the first problem sample through a specific task layer, namely a first-level label and a second-level label are generated; performing second classification on the second problem sample, namely generating a similarity label for representing whether two problems in the second problem sample are similar; thus, the training of the intention recognition task and the text matching task is finally completed. It should be noted that the structure of the training network is not limited to the above structure, and may be set as needed in practical application.
S100-12-8, testing the initial model based on the first test set and the second test set to obtain test result information;
and S100-12-10, if the test result information is determined to meet the preset condition, determining the currently obtained initial model as a problem processing model.
Specifically, if the problem processing accuracy of the initial model is determined to be not less than the accuracy threshold according to the test result information, it is determined that the test result information meets the preset condition, and the currently obtained initial model is determined to be the problem processing model.
Further, when the test result information is determined not to meet the preset conditions, the current initial model can be optimized by means of knowledge distillation, confrontation training and the like until a final problem processing model is obtained.
Further, in this embodiment of the present application, model training may be performed based on a tensrflow framework, and in order to improve online intelligent problem efficiency, in one or more embodiments of the present application, an obtained problem processing model may be further converted into a model in an ONNX (Open Neural Network Exchange) format.
In one or more embodiments of the present application, a question processing model is trained in advance based on a multitask training mode, a question intention of a target question is identified through the question processing model, and when the question intention is a matter consultation, the target question is matched with a plurality of standard question-answer templates obtained in advance through the question processing model, so as to obtain a standard answer of the target question. Because the recognition of the problem intention and the matching of the problem are carried out through the problem processing model, the recognition accuracy and the matching accuracy are improved, and the intelligent question-answering efficiency is improved; moreover, the problem processing model is trained based on a multi-task training mode, compared with multiple times of deployment and multiple times of training, the deployment resource of the model is saved, the deployment difficulty is reduced, and the model training efficiency is improved; in addition, the multi-task training increases the training sample size, so that the model can be concentrated on important features, and more universal features among multiple tasks can be learned, therefore, the model can be prevented from being over-fitted to a certain task, and the regularization effect is achieved.
Further, on the basis of the same technical concept, the embodiment of the application also provides an intelligent question-answering device corresponding to the intelligent question-answering method described above. Fig. 9 is a schematic diagram of a module composition of an intelligent question answering device provided in an embodiment of the present application, and as shown in fig. 9, the device includes:
an obtaining module 201, configured to obtain a target problem to be processed;
the recognition module 202 is used for performing intention recognition processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
the matching module 203 is used for matching the target question and a plurality of standard question-answer templates generated in advance through the question processing model to obtain a standard answer of the target question if the question intention is determined to be the matter consultation in the specified field;
and the feedback module 204 returns the standard answer to the questioning user of the target question.
Optionally, the identifying module 202 performs intent identification processing on the target problem through an intent identification task of the problem processing model to obtain a primary tag and a secondary tag of the target problem; wherein the primary label and the secondary label characterize the problem category of the target problem, and the secondary label is a sub-label of the primary label;
correspondingly, if it is determined that the primary label and the secondary label belong to a preset label set, the matching module 203 determines that the problem intention of the target problem is a matter consultation in a specified field.
Optionally, the matching module 203 acquires at least one standard question labeled with the primary label and the secondary label from the standard question-answering template, and determines the acquired standard question as a candidate question; and the number of the first and second groups,
combining the target problem with each candidate problem to obtain a problem combination to be matched; matching the target question and the candidate question in the question combination through a text matching task of the question processing model to obtain a first similarity between the target question and the candidate question in the question combination;
sequencing the first similarity to obtain the maximum similarity;
and if the maximum similarity is not less than a preset similarity threshold, determining the standard answer of the candidate question corresponding to the maximum similarity as the standard answer of the target question.
Optionally, the apparatus further comprises: a first generation module;
the first generation module is used for acquiring historical questions of the specified field and answers of the historical questions; and the number of the first and second groups,
clustering the historical problems according to a preset clustering mode to obtain a plurality of problem sets; the problem types among the problem sets are different, and the historical problems in each problem set are similar problems;
determining at least one standard problem in each problem set, and labeling a primary label and a secondary label of a problem category representing the standard problem; wherein the secondary label is a sub-label of the primary label;
determining a standard answer to the standard question from the answers;
and generating the standard question-answer template according to the labeled standard question and the standard answer.
Optionally, the apparatus further comprises: a second generation module and a training module;
the second generation module generates a problem sample to be trained according to the problem set;
and the training module is used for training and processing based on the problem sample according to a preset multi-task training mode to obtain the problem processing model.
The intelligent question-answering device provided by one or more embodiments of the application trains a question processing model based on a multi-task training mode in advance, identifies a question intention of a target question through the question processing model, and matches the target question with a plurality of standard question-answering templates obtained in advance through the question processing model when the question intention is matter consultation to obtain a standard answer of the target question. Because the recognition of the problem intention and the matching of the problem are carried out through the problem processing model, the recognition accuracy and the matching accuracy are improved, and the intelligent question-answering efficiency is improved; moreover, the problem processing model is trained based on a multi-task training mode, compared with multiple times of deployment and multiple times of training, the deployment resource of the model is saved, the deployment difficulty is reduced, and the model training efficiency is improved; moreover, the multi-task training increases the training sample size, so that the model can be concentrated on important features, more universal features among multiple tasks can be learned, the model can be prevented from being over-fitted to a certain task, and the regularization effect is achieved.
It should be noted that the embodiment of the intelligent question and answer apparatus in the present application and the embodiment of the intelligent question and answer method in the present application are based on the same inventive concept, so that the specific implementation of the embodiment may refer to the implementation of the foregoing corresponding intelligent question and answer method, and repeated details are not repeated.
Further, on the basis of the same technical concept, corresponding to the intelligent question answering method, an embodiment of the present application further provides an intelligent question answering device, where the device is configured to execute the intelligent question answering method, and fig. 10 is a schematic structural diagram of the intelligent question answering device provided in the embodiment of the present application.
As shown in fig. 10, the smart question answering device may have a relatively large difference due to different configurations or performances, and may include one or more processors 301 and a memory 302, where the memory 302 may store one or more stored applications or data. Memory 302 may be, among other things, transient storage or persistent storage. The application program stored in memory 302 may include one or more modules (not shown), each of which may include a series of computer-executable instructions in an intelligent question and answer apparatus. Still further, processor 301 may be configured to communicate with memory 302 to execute a series of computer-executable instructions in memory 302 on the smart question answering device. The smart question-answering apparatus may also include one or more power supplies 303, one or more wired or wireless network interfaces 304, one or more input-output interfaces 305, one or more keyboards 306, and the like.
In one particular embodiment, the smart question answering device includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the smart question answering device, and the one or more programs configured to be executed by the one or more processors include computer-executable instructions for:
acquiring a target problem to be processed;
performing intention identification processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
if the question intention is determined to be the item consultation in the specified field, matching the target question and a plurality of pre-generated standard question-answer templates through the question processing model to obtain a standard answer of the target question;
and returning the standard answer to the questioning user of the target question.
The intelligent question-answering device provided by the embodiment of the application trains the question processing model based on a multi-task training mode in advance, identifies the question intention of the target question through the question processing model, and matches the target question with a plurality of standard question-answering templates obtained in advance through the question processing model when the question intention is matter consultation to obtain the standard answer of the target question. Because the recognition of the problem intention and the matching of the problem are carried out through the problem processing model, the recognition accuracy and the matching accuracy are improved, and the intelligent question-answering efficiency is improved; moreover, the problem processing model is trained based on a multi-task training mode, compared with multiple times of deployment and multiple times of training, the deployment resource of the model is saved, the deployment difficulty is reduced, and the model training efficiency is improved; in addition, the multi-task training increases the training sample size, so that the model can be concentrated on important features, and more universal features among multiple tasks can be learned, therefore, the model can be prevented from being over-fitted to a certain task, and the regularization effect is achieved.
It should be noted that the embodiment of the intelligent question and answer apparatus in the present application and the embodiment of the intelligent question and answer method in the present application are based on the same inventive concept, so that specific implementation of the embodiment may refer to implementation of the foregoing corresponding intelligent question and answer method, and repeated details are not repeated.
Further, based on the same technical concept, corresponding to the data processing method, one or more embodiments of the present application further provide a storage medium for storing computer-executable instructions, where in a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, and the like, and when the storage medium stores the computer-executable instructions, the following process can be implemented:
acquiring a target problem to be processed;
performing intention identification processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
if the question intention is determined to be the item consultation in the specified field, matching the target question and a plurality of pre-generated standard question-answer templates through the question processing model to obtain a standard answer of the target question;
and returning the standard answer to the questioning user of the target question.
The computer-executable instructions stored in the storage medium provided by one or more embodiments of the present application, when executed by a processor, train a question processing model in advance based on a multitask training mode, identify a question intention of a target question through the question processing model, and when the question intention is a matter consultation, match the target question with a plurality of standard question-answer templates obtained in advance through the question processing model to obtain a standard answer of the target question. Because the recognition of the problem intention and the matching of the problem are carried out through the problem processing model, the recognition accuracy and the matching accuracy are improved, and the intelligent question-answering efficiency is improved; moreover, the problem processing model is trained based on a multi-task training mode, compared with multiple times of deployment and multiple times of training, the deployment resource of the model is saved, the deployment difficulty is reduced, and the model training efficiency is improved; in addition, the multi-task training increases the training sample size, so that the model can be concentrated on important features, and more universal features among multiple tasks can be learned, therefore, the model can be prevented from being over-fitted to a certain task, and the regularization effect is achieved.
It should be noted that the embodiment of the storage medium in this specification and the embodiment of the intelligent question-answering method in this specification are based on the same inventive concept, and therefore, specific implementation of this embodiment may refer to implementation of the foregoing corresponding intelligent question-answering method, and repeated details are not repeated.
One skilled in the art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
One or more embodiments of the specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of this document and is not intended to limit this document. Various modifications and changes may occur to those skilled in the art from this document. Any modifications, equivalents, improvements, etc. which come within the spirit and principle of the disclosure are intended to be included within the scope of the claims of this document.

Claims (11)

1. An intelligent question answering method is characterized by comprising the following steps:
acquiring a target problem to be processed;
performing intention identification processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
if the question intention is determined to be the item consultation in the designated field, matching the target question with a plurality of pre-generated standard question-answer templates through the question processing model to obtain a standard answer of the target question;
returning the standard answer to the questioning user of the target question;
the method for identifying the intention of the target problem by using the pre-trained problem processing model to obtain the problem intention of the target problem comprises the following steps:
performing intention identification processing on the target problem through an intention identification task of the problem processing model to obtain a primary label and a secondary label of the target problem; wherein the primary label and the secondary label characterize the problem category of the target problem, and the secondary label is a sub-label of the primary label;
the determining that the question is intended to be a domain-specific business consultation, comprising:
if the primary label and the secondary label belong to a preset label set, determining that the problem intention of the target problem is the item consultation of a specified field;
the matching processing of the target question and a plurality of standard question-answer templates generated in advance through the question processing model to obtain a standard answer of the target question comprises the following steps:
acquiring at least one standard question marked with the primary label and the secondary label from the standard question-answering template, and determining the acquired standard question as a candidate question;
combining the target problem with each candidate problem to obtain a problem combination to be matched;
matching the target question and the candidate question in the question combination through a text matching task of the question processing model to obtain a first similarity between the target question and the candidate question in the question combination;
sequencing the first similarity to obtain the maximum similarity;
if the maximum similarity is not smaller than a preset similarity threshold, determining the standard answer of the candidate question corresponding to the maximum similarity as the standard answer of the target question;
the method further comprises the following steps:
generating a problem sample to be trained according to the problem set;
training and processing are carried out based on the problem sample according to a preset multi-task training mode to obtain the problem processing model;
the multitask comprises an intention recognition task and a text matching task; generating a problem sample to be trained according to the problem set comprises:
obtaining historical questions of the specified field and answers of the historical questions;
determining the primary label and the secondary label of each of the historical questions in the set of questions;
determining each historical question, the primary label and the secondary label of the historical question as a first question sample to be trained of the intention recognition task;
according to a preset sampling strategy, acquiring the non-similar problem of each standard problem from the problem set;
combining each standard problem with similar problems and non-similar problems of the standard problems respectively to obtain a problem combination, and marking similarity labels of the problem combinations;
and determining the question combination and the similarity label as a second question sample to be trained of the text matching task.
2. The method of claim 1, wherein before obtaining the target problem to be processed, the method further comprises:
obtaining historical questions of the specified field and answers of the historical questions;
clustering the historical problems according to a preset clustering mode to obtain a plurality of problem sets; the problem types among the problem sets are different, and the historical problems in each problem set are similar problems;
determining at least one standard problem in each problem set, and labeling a primary label and a secondary label which characterize the problem category of the standard problem; wherein the secondary label is a sub-label of the primary label;
determining a standard answer to the standard question from the answers;
and generating the standard question-answer template according to the labeled standard question and the standard answer.
3. The method according to claim 1, characterized in that it comprises:
determining a target historical problem needing to be reclassified in the historical problems;
acquiring a new historical problem generated in a corresponding time interval and an answer of the new historical problem according to a preset time interval;
determining the target historical problem and the new historical problem as a problem to be classified, and performing matching processing on the problem to be classified and the standard problem through the problem processing model to obtain a second similarity between the problem to be classified and the standard problem;
according to the second similarity, obtaining the similarity problem of the standard problem from the problem to be classified;
generating a problem sample to be trained according to the problem set, comprising:
and generating a problem sample to be trained according to the problem set and the obtained similar problems.
4. The method according to claim 3, wherein the obtaining the similarity problem of the standard problem from the problem to be classified according to the second similarity degree comprises:
determining a weighing parameter of the problem to be classified based on the second similarity according to a preset mode;
sequencing the weighing parameters to obtain a first sequencing result;
acquiring a preset first number of target weighing parameters from the first sequencing result;
adding the target measurement parameters corresponding to each standard problem;
sequencing the results of the summation processing to obtain a second sequencing result;
displaying the corresponding problems to be classified according to the second sorting result;
if the marking information of the displayed problem to be classified by the administrator is obtained, determining whether the problem to be classified is a similar problem of the corresponding standard problem or not according to the marking information;
and if so, adding the problem to be classified into the problem set corresponding to the standard problem.
5. The method according to claim 1, wherein the performing training processing based on the problem sample according to a preset multitask training mode to obtain the problem processing model comprises:
dividing the first problem sample into a first training set and a first test set, dividing the first training set into a plurality of first training subsets, and labeling the first training subsets with first task labels; the first task label represents that the training task is intention recognition training;
dividing the second problem sample into a second training set and a second testing set, dividing the second training set into a plurality of second training subsets, and labeling a second task label to the second training subsets; the second task label represents that the training task is text matching training;
iteratively performing training processing based on the first training subset and the second training subset according to a preset multi-task training mode to obtain an initial model of the problem processing model;
based on the first test set and the second test set, carrying out test processing on the initial model to obtain test result information;
and if the test result information is determined to meet the preset condition, determining the initial model as the problem processing model.
6. The method of claim 5, wherein iteratively training based on the first training subset and the second training subset according to a predetermined multi-tasking training manner to obtain an initial model of the problem handling model, comprises:
iteratively obtaining a first target training subset to be trained currently from the first training subset, and obtaining a second target training subset to be trained currently from the second training subset;
simultaneously inputting the problem samples in the first target training subset and the second target training subset into a training network, and performing simultaneous training of the intention recognition task and the text matching task;
and if the iteration times reach the preset times, determining the current obtained model as the initial model of the problem processing model.
7. The method of claim 1, further comprising:
if the problem intention is determined not to be the item consultation of the appointed field, acquiring preset first response information;
and returning the first response information to the questioning user of the target question.
8. The method of claim 1, wherein the problem-handling model is trained based on a TensorFlow framework, the method further comprising:
and converting the problem processing model obtained by training into an ONNX format.
9. An intelligent question answering device, comprising:
the acquisition module acquires a target problem to be processed;
the recognition module is used for performing intention recognition processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
the matching module is used for matching the target question and a plurality of pre-generated standard question-answer templates through the question processing model to obtain a standard answer of the target question if the question intention is determined to be the item consultation in the specified field;
the feedback module returns the standard answer to the questioning user of the target question;
the method for identifying the intention of the target problem by using the pre-trained problem processing model to obtain the problem intention of the target problem comprises the following steps:
performing intention identification processing on the target problem through an intention identification task of the problem processing model to obtain a primary label and a secondary label of the target problem; wherein the primary label and the secondary label characterize the problem category of the target problem, and the secondary label is a sub-label of the primary label;
the determining that the question is intended to be a domain specific matter consultation, comprising:
if the first-level label and the second-level label belong to a preset label set, determining that the problem intention of the target problem is item consultation in a specified field;
the matching processing of the target question and a plurality of standard question-answer templates generated in advance through the question processing model to obtain a standard answer of the target question comprises the following steps:
acquiring at least one standard question marked with the primary label and the secondary label from the standard question-answering template, and determining the acquired standard question as a candidate question;
combining the target problem with each candidate problem to obtain a problem combination to be matched;
matching the target question and the candidate question in the question combination through a text matching task of the question processing model to obtain a first similarity between the target question and the candidate question in the question combination;
sequencing the first similarity to obtain the maximum similarity;
if the maximum similarity is not smaller than a preset similarity threshold, determining the standard answer of the candidate question corresponding to the maximum similarity as the standard answer of the target question;
the device further comprises: a second generation module and a training module;
the second generation module generates a problem sample to be trained according to the problem set;
the training module is used for performing training processing based on the problem sample according to a preset multi-task training mode to obtain the problem processing model;
the multitask comprises an intention recognition task and a text matching task; generating a problem sample to be trained according to the problem set comprises:
obtaining historical questions of the specified field and answers of the historical questions;
determining the primary label and the secondary label of each of the historical questions in the question set;
determining each historical question, the primary label and the secondary label of the historical question as a first question sample to be trained of the intention recognition task;
according to a preset sampling strategy, acquiring the non-similar problem of each standard problem from the problem set;
combining each standard problem with similar problems and non-similar problems of the standard problems respectively to obtain a problem combination, and marking similarity labels of the problem combinations;
and determining the question combination and the similarity label as a second question sample to be trained of the text matching task.
10. An intelligent question-answering device comprising:
a processor; and (c) a second step of,
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a target problem to be processed;
performing intention identification processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
if the question intention is determined to be the item consultation in the specified field, matching the target question and a plurality of pre-generated standard question-answer templates through the question processing model to obtain a standard answer of the target question;
returning the standard answer to the questioning user of the target question;
the method for identifying the intention of the target problem by using the pre-trained problem processing model to obtain the problem intention of the target problem comprises the following steps:
performing intention identification processing on the target problem through an intention identification task of the problem processing model to obtain a primary label and a secondary label of the target problem; wherein the primary label and the secondary label characterize the problem category of the target problem, and the secondary label is a sub-label of the primary label;
the determining that the question is intended to be a domain-specific business consultation, comprising:
if the primary label and the secondary label belong to a preset label set, determining that the problem intention of the target problem is the item consultation of a specified field;
the matching processing of the target question and a plurality of standard question-answer templates generated in advance through the question processing model to obtain a standard answer of the target question comprises the following steps:
acquiring at least one standard question marked with the primary label and the secondary label from the standard question-answering template, and determining the acquired standard question as a candidate question;
combining the target problem with each candidate problem to obtain a problem combination to be matched;
matching the target question and the candidate question in the question combination through a text matching task of the question processing model to obtain a first similarity between the target question and the candidate question in the question combination;
sequencing the first similarity to obtain the maximum similarity;
if the maximum similarity is not smaller than a preset similarity threshold, determining the standard answer of the candidate question corresponding to the maximum similarity as the standard answer of the target question;
further comprising:
generating a problem sample to be trained according to the problem set;
training and processing based on the problem sample according to a preset multi-task training mode to obtain a problem processing model;
the multitask comprises an intention recognition task and a text matching task; generating a problem sample to be trained according to the problem set comprises:
obtaining historical questions of the specified field and answers of the historical questions;
determining the primary label and the secondary label of each of the historical questions in the set of questions;
determining each historical question, the primary label and the secondary label of the historical question as a first question sample to be trained of the intention recognition task;
acquiring the non-similar problem of each standard problem from the problem set according to a preset sampling strategy;
combining each standard question with similar questions and non-similar questions of the standard questions respectively to obtain a question combination, and marking similarity labels of the question combinations;
and determining the question combination and the similarity label as a second question sample to be trained of the text matching task.
11. A storage medium storing computer-executable instructions that when executed by a processor implement the following:
acquiring a target problem to be processed;
performing intention identification processing on the target problem through a pre-trained problem processing model to obtain a problem intention of the target problem; the problem processing model is obtained by training based on a multi-task training mode;
if the question intention is determined to be the item consultation in the specified field, matching the target question and a plurality of pre-generated standard question-answer templates through the question processing model to obtain a standard answer of the target question;
returning the standard answer to the questioning user of the target question;
the method for identifying the intention of the target problem through the pre-trained problem processing model to obtain the problem intention of the target problem comprises the following steps:
performing intention identification processing on the target problem through an intention identification task of the problem processing model to obtain a primary label and a secondary label of the target problem; wherein the primary label and the secondary label characterize the problem category of the target problem, and the secondary label is a sub-label of the primary label;
the determining that the question is intended to be a domain-specific business consultation, comprising:
if the first-level label and the second-level label belong to a preset label set, determining that the problem intention of the target problem is item consultation in a specified field;
the matching processing of the target question and a plurality of standard question-answer templates generated in advance through the question processing model to obtain a standard answer of the target question comprises the following steps:
acquiring at least one standard question marked with the primary label and the secondary label from the standard question-answering template, and determining the acquired standard question as a candidate question;
combining the target problem with each candidate problem to obtain a problem combination to be matched;
matching the target question and the candidate question in the question combination through a text matching task of the question processing model to obtain a first similarity between the target question and the candidate question in the question combination;
sequencing the first similarity to obtain the maximum similarity;
if the maximum similarity is not smaller than a preset similarity threshold, determining the standard answer of the candidate question corresponding to the maximum similarity as the standard answer of the target question;
further comprising:
generating a problem sample to be trained according to the problem set;
training and processing are carried out based on the problem sample according to a preset multi-task training mode to obtain the problem processing model;
the multitask comprises an intention recognition task and a text matching task; generating a problem sample to be trained according to the problem set comprises:
obtaining historical questions of the specified field and answers of the historical questions;
determining the primary label and the secondary label of each of the historical questions in the set of questions;
determining each historical question, the primary label and the secondary label of the historical question as a first question sample to be trained of the intention recognition task;
according to a preset sampling strategy, acquiring the non-similar problem of each standard problem from the problem set;
combining each standard question with similar questions and non-similar questions of the standard questions respectively to obtain a question combination, and marking similarity labels of the question combinations;
and determining the question combination and the similarity label as a second question sample to be trained of the text matching task.
CN202110570657.1A 2021-05-25 2021-05-25 Intelligent question and answer method, device and equipment Active CN113377936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110570657.1A CN113377936B (en) 2021-05-25 2021-05-25 Intelligent question and answer method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110570657.1A CN113377936B (en) 2021-05-25 2021-05-25 Intelligent question and answer method, device and equipment

Publications (2)

Publication Number Publication Date
CN113377936A CN113377936A (en) 2021-09-10
CN113377936B true CN113377936B (en) 2022-09-30

Family

ID=77571845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110570657.1A Active CN113377936B (en) 2021-05-25 2021-05-25 Intelligent question and answer method, device and equipment

Country Status (1)

Country Link
CN (1) CN113377936B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114330358A (en) * 2021-11-25 2022-04-12 深圳市普渡科技有限公司 Intention recognition method and device, computer equipment and storage medium
CN114897183B (en) * 2022-05-16 2023-06-13 北京百度网讯科技有限公司 Question data processing method, training method and device of deep learning model
CN114757208B (en) * 2022-06-10 2022-10-21 荣耀终端有限公司 Question and answer matching method and device
CN115129816B (en) * 2022-07-04 2024-05-14 北京百度网讯科技有限公司 Question-answer matching model training method and device and electronic equipment
CN116756579B (en) * 2023-08-22 2023-12-12 腾讯科技(深圳)有限公司 Training method of large language model and text processing method based on large language model
CN117556006A (en) * 2023-11-10 2024-02-13 摩尔线程智能科技(上海)有限责任公司 Standard problem determining method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109299476A (en) * 2018-11-28 2019-02-01 北京羽扇智信息科技有限公司 Question answering method and device, electronic equipment and storage medium
CN109558477A (en) * 2018-10-23 2019-04-02 深圳先进技术研究院 A kind of community's question answering system, method and electronic equipment based on multi-task learning
CN110968663A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Answer display method and device of question-answering system
CN111666763A (en) * 2020-05-28 2020-09-15 平安科技(深圳)有限公司 Network structure construction method and device for multitask scene
CN111708873A (en) * 2020-06-15 2020-09-25 腾讯科技(深圳)有限公司 Intelligent question answering method and device, computer equipment and storage medium
CN112347760A (en) * 2020-11-16 2021-02-09 北京京东尚科信息技术有限公司 Method and device for training intention recognition model and method and device for recognizing intention
CN112417096A (en) * 2020-11-17 2021-02-26 平安科技(深圳)有限公司 Question-answer pair matching method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10303798B2 (en) * 2014-12-18 2019-05-28 Nuance Communications, Inc. Question answering from structured and unstructured data sources
US10262062B2 (en) * 2015-12-21 2019-04-16 Adobe Inc. Natural language system question classifier, semantic representations, and logical form templates
CN111368043A (en) * 2020-02-19 2020-07-03 中国平安人寿保险股份有限公司 Event question-answering method, device, equipment and storage medium based on artificial intelligence
CN112417894B (en) * 2020-12-10 2023-04-07 上海方立数码科技有限公司 Conversation intention identification method and system based on multi-task learning

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968663A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Answer display method and device of question-answering system
CN109558477A (en) * 2018-10-23 2019-04-02 深圳先进技术研究院 A kind of community's question answering system, method and electronic equipment based on multi-task learning
CN109299476A (en) * 2018-11-28 2019-02-01 北京羽扇智信息科技有限公司 Question answering method and device, electronic equipment and storage medium
CN111666763A (en) * 2020-05-28 2020-09-15 平安科技(深圳)有限公司 Network structure construction method and device for multitask scene
CN111708873A (en) * 2020-06-15 2020-09-25 腾讯科技(深圳)有限公司 Intelligent question answering method and device, computer equipment and storage medium
CN112347760A (en) * 2020-11-16 2021-02-09 北京京东尚科信息技术有限公司 Method and device for training intention recognition model and method and device for recognizing intention
CN112417096A (en) * 2020-11-17 2021-02-26 平安科技(深圳)有限公司 Question-answer pair matching method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113377936A (en) 2021-09-10

Similar Documents

Publication Publication Date Title
CN113377936B (en) Intelligent question and answer method, device and equipment
CN111027327B (en) Machine reading understanding method, device, storage medium and device
CN111026842B (en) Natural language processing method, natural language processing device and intelligent question-answering system
CN111783394B (en) Training method of event extraction model, event extraction method, system and equipment
CN110727779A (en) Question-answering method and system based on multi-model fusion
US20200394567A1 (en) Target document template generation
CN110019736B (en) Question-answer matching method, system, equipment and storage medium based on language model
CN110569356A (en) interviewing method and device based on intelligent interviewing interaction system and computer equipment
Sharp et al. Toward Semi-autonomous Information: Extraction for Unstructured Maintenance Data in Root Cause Analysis
CN114896386A (en) Film comment semantic emotion analysis method and system based on BilSTM
CN111782793A (en) Intelligent customer service processing method, system and equipment
CN115687647A (en) Notarization document generation method and device, electronic equipment and storage medium
CN114510570A (en) Intention classification method and device based on small sample corpus and computer equipment
CN117668180A (en) Document question-answering method, document question-answering device, and readable storage medium
CN110968776A (en) Policy knowledge recommendation method, device storage medium and processor
CN115374259A (en) Question and answer data mining method and device and electronic equipment
CN117493524A (en) Intelligent question-answering control method, device, equipment and storage medium
CN112579666A (en) Intelligent question-answering system and method and related equipment
CN116541528A (en) Labeling method and system for recruitment field knowledge graph construction
Bulut et al. Educational data mining: A tutorial for the rattle package in R
CN110765872A (en) Online mathematical education resource classification method based on visual features
CN112685618A (en) User feature identification method and device, computing equipment and computer storage medium
CN114969253A (en) Market subject and policy matching method and device, computing device and medium
CN115619496A (en) Accurate pushing method for E-commerce products and server
CN109885647B (en) User history verification method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant