CN117610666A - Question-answer model training and answer determining method, device, equipment and medium - Google Patents

Question-answer model training and answer determining method, device, equipment and medium Download PDF

Info

Publication number
CN117610666A
CN117610666A CN202311786658.5A CN202311786658A CN117610666A CN 117610666 A CN117610666 A CN 117610666A CN 202311786658 A CN202311786658 A CN 202311786658A CN 117610666 A CN117610666 A CN 117610666A
Authority
CN
China
Prior art keywords
answer
question
target
sample
text
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.)
Pending
Application number
CN202311786658.5A
Other languages
Chinese (zh)
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.)
BY Health Co Ltd
Original Assignee
BY Health 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 BY Health Co Ltd filed Critical BY Health Co Ltd
Priority to CN202311786658.5A priority Critical patent/CN117610666A/en
Publication of CN117610666A publication Critical patent/CN117610666A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/041Abduction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/01Customer relationship services
    • G06Q30/015Providing customer assistance, e.g. assisting a customer within a business location or via helpdesk
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a method, a device, equipment and a medium for training and answer determination of a question-answer model, and relates to the technical field of artificial intelligence. Comprising the following steps: fusing the user information, the scene information, the target round questions and the historical round questions in the sample question and answer event to obtain a sample text; embedding the sample text by a first natural language processing model pre-trained in the initial question-answering model to obtain a text embedded vector; determining the prediction matching degree of target round questions and answers in a sample question and answer event by an initial answer evaluation model in an initial question and answer model, an associated information vector and a text embedding vector; and training the natural language processing model and the initial answer evaluation model according to the predicted matching degree and the marked matching degree to obtain a target question-answer model. According to the technical scheme, the matching degree of the target round questions and answers is determined through the associated information vector and the text embedding vector, so that the model is trained, and the accuracy of providing answers by the model is improved.

Description

Question-answer model training and answer determining method, device, equipment and medium
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method, a device, equipment and a medium for training a question-answer model and determining answers.
Background
In a plurality of customer service scenes such as pre-sales service, in-sales service, after-sales service and the like, a user often presents various consultation questions, and in order to help the user to solve the questions more quickly, the user experience is improved, and a method for providing answers to the user through an answer recommendation model is widely applied to various industries.
The answer recommendation model in the prior art has the defect of poor matching degree between recommended answers and user consultation questions.
Disclosure of Invention
The invention provides a method, a device, equipment and a medium for training and answer determination of a question-answer model so as to improve the accuracy of providing answers by the model.
In a first aspect, the present invention provides a training method for a question-answering model, including:
acquiring a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, marking matching degree of target round questions and answers in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library;
Fusing the user information, the scene information, the target round questions and the historical round questions in the sample question and answer event to obtain a sample text; wherein the turns of the historical turn questions precede the turns of the target turn questions;
performing text embedding processing on the sample text through a first natural language processing model pre-trained in the initial question-answering model to obtain a text embedding vector;
determining the prediction matching degree of target round questions and answers in a sample question and answer event according to the associated information vector and the text embedding vector by an initial answer evaluation model in an initial question and answer model;
training a first natural language processing model and an initial answer evaluation model in the initial question-answer model according to the predicted matching degree and the marked matching degree to obtain a target question-answer model; wherein the target question-answer model comprises a target natural language processing model and a target answer evaluation model
In a second aspect, the present invention further provides a method for determining an answer to a question, including:
acquiring a target question input by a user in a target question-answer event, user information of the user, scene information of the target question-answer event, at least one preset answer in a history round question-answer and answer library in the target question-answer event and associated information vectors of all preset answers; wherein the turns of the historical turn questions precede the turns of the target questions;
Fusing user information, scene information, target questions, preset answers and historical round questions and answers aiming at each preset answer to obtain a target text;
performing text embedding processing on a target text through a target natural language processing model in the target question-answering model to obtain a text embedding vector;
determining the matching degree between the preset answer and the target question according to the associated information vector and the text embedding vector through a target answer evaluation model in the target question-answer model;
and selecting a target answer from the preset answers according to the matching degree between the preset answers and the target questions, and providing the target answer for the user.
In a third aspect, the present invention further provides a training device for a question-answering model, including:
the event acquisition module is used for acquiring a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, annotation matching degree of target round questions and answers in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library;
the text determining module is used for fusing the user information, the scene information, the target round questions and answers and the historical round questions and answers in the sample question and answer event to obtain a sample text; wherein the turns of the historical turn questions precede the turns of the target turn questions;
The vector determining module is used for carrying out text embedding processing on the sample text through a first natural language processing model trained in advance in the initial question-answering model to obtain a text embedding vector;
the matching degree prediction module is used for determining the prediction matching degree of the target round questions and answers in the sample question and answer event according to the associated information vector and the text embedding vector through an initial answer evaluation model in the initial question and answer model;
the model training module is used for training a first natural language processing model and an initial answer evaluation model in the initial question-answer model according to the prediction matching degree and the marking matching degree to obtain a target question-answer model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model.
In a fourth aspect, the present invention also provides an answer determining device for a question, including:
the event acquisition module is used for acquiring at least one preset answer in a history round question and answer library and associated information vectors of all preset answers in a target question and answer event, wherein the target question is input by a user in the target question and answer event, the user information of the user, scene information of the target question and answer event, and the history round question and answer in the target question and answer event; wherein the turns of the historical turn questions precede the turns of the target questions;
The text determining module is used for fusing the user information, the scene information, the target questions, the preset answers and the historical round questions and answers aiming at each preset answer to obtain a target text;
the vector determining module is used for carrying out text embedding processing on the target text through a target natural language processing model in the target question-answering model to obtain a text embedding vector;
the matching degree determining module is used for determining the matching degree between the preset answer and the target question according to the associated information vector and the text embedding vector through a target answer evaluation model in the target question-answer model;
and the answer providing module is used for selecting a target answer from the preset answers according to the matching degree between the preset answers and the target questions and providing the target answer for the user.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the method comprises the steps of
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of training the question-answering model provided by any one of the embodiments of the present invention, and/or the method of determining answers to questions provided by any one of the embodiments of the present invention.
In a sixth aspect, embodiments of the present invention further provide a computer readable storage medium, where the computer readable storage medium stores computer instructions for causing a processor to implement a training method of a question-answering model according to any one of the embodiments of the present invention, and/or an answer determining method of a question provided by any one of the embodiments of the present invention when executed.
The method comprises the steps of obtaining a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, marking matching degree of target round questions in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library; fusing the user information, the scene information, the target round questions and the historical round questions in the sample question and answer event to obtain a sample text; wherein the turns of the historical turn questions precede the turns of the target turn questions; performing text embedding processing on the sample text through a first natural language processing model pre-trained in the initial question-answering model to obtain a text embedding vector; determining the prediction matching degree of target round questions and answers in a sample question and answer event according to the associated information vector and the text embedding vector by an initial answer evaluation model in an initial question and answer model; training a first natural language processing model and an initial answer evaluation model in the initial question-answer model according to the predicted matching degree and the marked matching degree to obtain a target question-answer model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model. According to the technical scheme, user information, scene information, target round questions and answers and historical round questions and answers are fused, and a sample text is obtained; and training the initial question-answer model according to the predicted matching degree determined by the text embedded vector of the sample text and the associated information vector and the labeled matching degree to obtain a trained target question-answer model, and compared with the method for training the model by the questions and the answers in the prior art, the method enriches the background information of the questions and the answers, and further improves the accuracy of providing the answers by the model.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a training method of a question-answering model according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a training method of a question-answering model according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a training method of a question-answering model according to a third embodiment of the present invention;
fig. 4 is a flowchart of a method for determining answers to questions according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a training device for question-answering model according to a fifth embodiment of the present invention;
Fig. 6 is a schematic structural diagram of an answer determining device to a question according to a sixth embodiment of the invention;
fig. 7 is a schematic structural diagram of an electronic device implementing a training method of a question-answering model according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and "third," etc. in the description and claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the technical scheme of the embodiment of the invention, the acquisition, storage, application and the like of the related sample question-answer event and the like all accord with the regulations of related laws and regulations, and the public order harmony is not violated.
Example 1
Fig. 1 is a flowchart of a method for training a question-answering model according to an embodiment of the present invention, where the method may be performed by a device for training a question-answering model, and the device for training a question-answering model may be implemented in hardware and/or software, and specifically configured in an electronic device, such as a server.
Referring to the training method of the question-answering model shown in fig. 1, the method includes:
s101, acquiring a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, marking matching degree of target round questions and answers in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library.
In this embodiment, the sample question-answer event may be a question-answer event used as a model training sample. The question-answer event may be an event in which the user makes a question consultation. The question-answer event may include at least one round of question-answer; wherein, a question and an answer corresponding to the question can be included in a round of questions and answers. The initiating user may be a user initiating a sample question-answer event. The user information may include, but is not limited to, the user's gender, age, medical history, and records of purchased products, etc. It should be noted that, in the embodiment of the present invention, the user information is legal information obtained by authorization of the user. The scene information may be information of a scene to which the sample question-answer event belongs; the scene information may include, but is not limited to, information of a store to which the sample question-answer event belongs, channel information of the store to which the sample question-answer event belongs, product information in the store to which the sample question-answer event belongs, and the like. The store information can be used for representing stores where a user initiates a sample question-answer event; the channel information may be used to characterize a channel corresponding to the affiliated store, for example, the channel may be an off-line channel or an internet channel, etc.
The target round questions and answers may be round questions and answers for training the model. The target round questions and target round answers may be included in the target round questions and target round answers. The degree of annotation matching may be manually annotated, the degree of matching between the target round questions and the target round answers. The answer library comprises at least one preset answer, and the preset answer can be set by a technician according to actual requirements or practical experience, and the invention is not limited to the preset answer. The association information vector may be a vector of association information for characterizing a preset answer; the element values in the association information vector may be used to characterize the association information of the preset answer. The associated information may include, but is not limited to, store information to which the preset answer belongs, channel information of a store to which the preset answer belongs, product information included in the preset answer, specification information of a product in the preset answer, applicable crowd of the product in the preset answer, and the like.
S102, fusing user information, scene information, target round questions and answers and historical round questions and answers in a sample question and answer event to obtain a sample text; wherein the turns of the historical turn questions precede the turns of the target turn questions.
In this embodiment, the user information, the scene information, the target round questions and the history round questions may be represented in the form of text. The number of historical round questions is at least one, and typically a plurality. A historical round question and a historical round answer corresponding to the historical round question may be included in a historical round question. The sample text may be a text obtained by fusing user information, scene information, target round questions and historical round questions in a sample question event.
Specifically, entity extraction is carried out on the history round questions and answers, and the extracted entities are spliced into entity texts; splicing the historical round questions and answers to obtain spliced texts of the historical round questions and answers, and extracting abstracts of the spliced texts to obtain abstract texts; and splicing the user information, the scene information, the target round questions and answers, the entity text and the abstract text to obtain a sample text. It should be noted that at least one technology in the prior art may be used to extract the abstract of the spliced text, so as to obtain the abstract text.
In an alternative embodiment, taking the history round questions with the smallest round as extraction round questions, and extracting the entity from the extraction round questions through a NER (Named Entity Recognition, NER) model to obtain at least one entity and an entity category to which each entity belongs; wherein, entity categories may include, but are not limited to, product, nutrient, food, drug, disease, efficacy, lifestyle, and crowd categories; for each entity, adding the entity into an entity set corresponding to the entity category of the entity according to the entity category of the entity; checking whether the number of the entities in the entity set is larger than the preset number of the entities according to the entity set corresponding to each entity category; if the number of the entities in the entity set is larger than the preset number of the entities, removing the entity with the earliest adding time from the entity set; updating the extraction round questions to be adjacent to the extraction round questions, and the historical round questions after the extraction round questions are updated; repeatedly executing the steps, namely extracting the entity from the extraction round questions and answers through the NER model to obtain at least one entity and the entity category to which each entity belongs; for each entity, adding the entity into an entity set corresponding to the entity category of the entity according to the entity category of the entity; checking whether the number of the entities in the entity set is larger than the preset number of the entities according to the entity set corresponding to each entity category; if the number of the entities in the entity set is larger than the preset number of the entities, removing the entity with the earliest adding time from the entity set; updating the extraction round questions to be adjacent to the extraction round questions, and the historical round questions after the extraction round questions until the entity extraction operation of all the historical round questions is completed.
In an optional embodiment, after adding, for each entity, the entity to the entity set corresponding to the entity category of the entity according to the entity category to which the entity belongs, the method further includes: checking whether the entity identical to the entity exists in the entity set; if the entity identical to the entity exists in the entity set, removing the entity identical to the entity from the entity set.
S103, performing text embedding processing on the sample text through a first natural language processing model trained in advance in the initial question-answering model to obtain a text embedding vector.
In this embodiment, the initial question-answering model may be an untrained question-answering model for providing answers. The first natural language processing model may be a pre-trained natural language processing model for performing text embedding processing on the text. The text embedding vector may be a feature expression vector obtained by performing text embedding processing on the sample text.
In an alternative embodiment, a number of neurons in the first natural language processing model are deactivated; performing text embedding processing on the sample text through a first natural language processing model with partial neuron inactivation to obtain a text embedded vector, so as to adjust the numerical value of the text embedded vector under the condition of not changing text characteristic information represented by the text embedded vector; the target question-answering model trained by the technical scheme can obtain a relatively close matching degree when determining the matching degree between the semanteme similar but different answers and questions, so that the accuracy of providing the answers by the target question-answering model is improved.
S104, determining the prediction matching degree of the target round questions and answers in the sample question and answer event according to the associated information vector and the text embedding vector through an initial answer evaluation model in the initial question and answer model.
In this embodiment, the initial answer evaluation model may be an untrained answer evaluation model for determining the degree of matching between the questions and the answers. The predicted match level may be a target round of questions and answers predicted by the initial question and answer model.
Specifically, a certain algorithm is adopted, and the prediction matching degree of target round questions and answers in a sample question and answer event is determined according to the associated information vector and the text embedding vector.
S105, training a first natural language processing model and an initial answer evaluation model in the initial question-answer model according to the prediction matching degree and the annotation matching degree to obtain a target question-answer model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model.
In this embodiment, the target question-answering model may be a trained question-answering model; the target natural language processing model may be a trained natural language processing model; the target answer assessment model may be a trained answer assessment model. Specifically, a loss function is constructed according to the predicted matching degree and the marked matching degree, and model parameters of a first natural language processing model and an initial answer evaluation model in the initial question-answer model are updated by adopting the loss function, so that a target question-answer model is obtained.
The method comprises the steps of obtaining a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, marking matching degree of target round questions in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library; fusing the user information, the scene information, the target round questions and the historical round questions in the sample question and answer event to obtain a sample text; wherein the turns of the historical turn questions precede the turns of the target turn questions; performing text embedding processing on the sample text through a first natural language processing model pre-trained in the initial question-answering model to obtain a text embedding vector; determining the prediction matching degree of target round questions and answers in a sample question and answer event according to the associated information vector and the text embedding vector by an initial answer evaluation model in an initial question and answer model; training a first natural language processing model and an initial answer evaluation model in the initial question-answer model according to the predicted matching degree and the marked matching degree to obtain a target question-answer model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model. According to the technical scheme, user information, scene information, target round questions and answers and historical round questions and answers are fused, and a sample text is obtained; and training the initial question-answer model according to the predicted matching degree determined by the text embedded vector of the sample text and the associated information vector and the labeled matching degree to obtain a trained target question-answer model, and compared with the method for training the model by the questions and the answers in the prior art, the method enriches the background information of the questions and the answers, and further improves the accuracy of providing the answers by the model.
Example two
Fig. 2 is a flowchart of a training method of a question-answer model according to a second embodiment of the present invention, where additional optimization is performed based on the technical solution of the foregoing embodiment.
Further, before acquiring a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, marking matching degree of target round questions in the sample question-answer event and associated information vector of corresponding preset answers of the target round answers in the sample question-answer event in an answer library, additionally acquiring a sample question-answer pair; the sample question-answer pair comprises a sample question and a sample answer corresponding to the sample question; inquiring similar questions of the sample questions in the sample question-answering pair, and taking answers corresponding to the similar questions as auxiliary answers; constructing auxiliary question-answer pairs according to the sample questions and the auxiliary answers; determining a text embedded vector of the sample question-answer pair and a text embedded vector of the auxiliary question-answer pair through a second natural language processing model; determining the sample matching degree of the sample question-answer pair according to the text embedded vector of the sample question-answer pair and determining the auxiliary matching degree of the auxiliary question-answer pair according to the text embedded vector of the auxiliary question-answer pair through a second natural language processing model; training the second natural language processing model according to the sample matching degree and the auxiliary matching degree to obtain a pre-trained first natural language processing model so as to realize the determining operation of the first natural language processing model.
In the embodiments of the present invention, the details are not described, and reference may be made to the description of the foregoing embodiments.
Referring to the training method of the question-answering model shown in fig. 2, the method includes:
s201, obtaining sample question-answer pairs; the sample question-answer pair comprises a sample question and a sample answer corresponding to the sample question.
In this embodiment, the sample question-answer pair may be a question-answer pair used as a model training sample; the sample question is a question in a sample question-answer pair; the sample answer is the answer corresponding to the sample question. Specifically, a certain algorithm is adopted to obtain sample question-answer pairs.
Optionally, obtaining a sample question-answer pair includes: acquiring original question-answer pairs; the original question-answer pair comprises an original question and an original answer corresponding to the original question; checking whether the length of the original answer is greater than or equal to a preset length; if the length of the original answer is smaller than the preset length, determining the original question-answer pair as a sample question-answer pair; if the length of the original answer is greater than or equal to the preset length, word segmentation is carried out on the original answer, and at least one word segmentation vocabulary is obtained; selecting a replacement vocabulary from each word segmentation vocabulary, and updating the replacement vocabulary into synonyms of the replacement vocabulary; and fusing each word segmentation vocabulary and the replacement vocabulary to obtain a fused answer, and taking a question-answer pair consisting of the original question and the fused answer as a sample question-answer pair.
Wherein the original question-answer pair may be a pre-constructed question-answer pair. The original question is a question in the original question-answer pair; the original answer is the answer corresponding to the original question. The word segmentation vocabulary may be a vocabulary obtained by segmenting the original answer. The replacement vocabulary may be a vocabulary to be replaced, and the number of the replacement vocabulary is at least one, and typically a plurality of replacement vocabularies. The fusion answer can be an answer obtained by fusing each word segmentation vocabulary and the replacement vocabulary.
Specifically, selecting a replacement vocabulary from each word segmentation vocabulary, and inquiring synonyms of the replacement vocabulary; updating the replacement vocabulary into synonyms of the replacement vocabulary; fusing each word segmentation vocabulary and each replacement vocabulary to obtain a fused answer; and taking the question-answer pair consisting of the original question and the fusion answer as a sample question-answer pair. It should be noted that, the number of the replacement words and the preset length may be set by the skilled person according to the actual requirement or practical experience, which is not limited by the present invention.
In an alternative embodiment, at least one word segmentation vocabulary may be deleted, and the remaining word segmentation vocabularies are fused to obtain a fused answer; and taking the question-answer pair consisting of the original question and the fusion answer as a sample question-answer pair.
It can be understood that, by adopting the above technical scheme, if the length of the original answer is greater than or equal to the preset length, word segmentation is performed on the original answer to obtain word segmentation vocabulary; and replacing and/or deleting a part of the segmented words, so as to obtain sample question-answer pairs, training according to the sample question-answer pairs to obtain a pre-trained first natural language processing model, and adjusting the original answers under the condition of not changing the original answer semantics. The situation that the result with larger difference is obtained when the first natural language processing model obtained through training processes different answers with the same semantics but different texts is avoided, namely, similar processing results are obtained when the first natural language processing model processes original answers with similar semantics, and further the accuracy of the model for processing the natural language texts is improved.
In an alternative embodiment, a knowledge graph recorded with entity attributes and entity relationships can be obtained, and an original question and an original answer are constructed in advance according to the attributes of the entities recorded in the knowledge picture and the relationships among the entities; and the original questions and the original answers are matched; or selecting the user questions from the real question-answer events as original questions, and constructing original question-answer pairs by taking answers corresponding to the user questions as original answers.
S202, inquiring similar questions of the sample questions in the sample question-answering pair, and taking answers corresponding to the similar questions as auxiliary answers.
In this embodiment, the similar problem may be a similar problem to the sample problem; the auxiliary answers may be similarly corresponding answers. In an alternative embodiment, determining the similarity between at least one preset question in the preset question-answer library and the sample question, and sorting the preset questions according to the similarity; the question-answer library comprises at least one preset question and a preset answer corresponding to the preset question; selecting a first preset number of preset questions with higher similarity as a first preset question set; selecting a first auxiliary problem from a second preset number of preset problems with higher similarity in the first preset problem set; selecting a second auxiliary problem from a third preset number of preset problems with lower similarity in the first preset problem set; taking a preset answer corresponding to the first preset question as an auxiliary answer, and taking a preset answer corresponding to the second preset question as an auxiliary answer; wherein the second preset number is smaller than the first preset number; the third preset number is smaller than the second preset number.
Illustratively, the first preset number is 50, the second preset number is 10, and the third preset number is 12; sorting the preset questions according to the similarity between the preset questions and the sample questions; selecting the first 50 preset questions with higher similarity as a first preset question set; selecting a first auxiliary problem from the first 10 preset problems with higher similarity in the first preset problem set; selecting a second auxiliary problem from 12 preset problems with lower similarity in the first preset problem set; taking the preset answer corresponding to the first preset question as an auxiliary answer, and taking the preset answer corresponding to the second preset question as an auxiliary answer.
Optionally, before querying the similar questions of the sample questions in the sample question-answering pair and using the answers corresponding to the similar questions as auxiliary answers, the method further comprises: splicing the sample questions and the sample answers in the sample question-answer pair into sample question-answer texts; replacing at least one sample word in the sample question-answering text with a marked word through an initial natural language processing model to obtain a sample marked text, and performing text embedding on the sample marked text to obtain a text embedding vector of the sample marked text; determining the confidence coefficient of each marked word corresponding to each preset word according to the text embedded vector of the sample marked text; training the initial natural language processing model according to the confidence coefficient of each marked word corresponding to each preset word to obtain a third natural language processing model; performing text embedding on the sample problem text through a third natural language processing model to obtain a text embedding vector of the sample problem text; and generating a predicted answer text according to the text embedding vector of the sample question text, and training the third natural language processing model according to the sample answer and the predicted answer text to obtain a second natural language processing model.
Wherein the initial natural language processing model may be an untrained natural language processing model; the marked vocabulary can be used for representing that the vocabulary of the position of the marked vocabulary is the vocabulary to be predicted; the preset vocabulary can be set by the technician according to the actual demand or practical experience. The predicted answer text may be text of an answer predicted by the third natural language processing model.
Specifically, for each marked word, determining the confidence coefficient of each predicted word corresponding to the marked word according to the text embedded vector of the sample marked text; determining a loss value of the marked vocabulary according to the confidence coefficient of the marked vocabulary corresponding to each preset vocabulary; determining a loss value of the initial natural language processing model according to the loss value of each marked word; according to the loss value of the initial natural language processing model, training related parameters of text embedding processing in the initial natural language processing model and related parameters for determining the confidence coefficient of a preset vocabulary to obtain a third natural language processing model; by way of example, this can be expressed by the following formula:
wherein Loss represents a Loss value of the initial natural language model; n represents the number of tagged words; loss (i) represents the loss value of the ith markup word; c represents the number of preset words; w (w) j Is the importance weight of the j-th preset vocabulary; x is x i,j Representing the confidence that the ith marked word corresponds to the jth preset word; x is x i,k Representing the confidence that the ith marked word corresponds to the kth preset word; y is i,j The identity between the ith marked word and the jth preset word is represented; wherein if the ith marked word is the same as the jth preset word, y i,j 1 is shown in the specification; if the ith marked word is different from the jth preset word, y i,j Is 0.
Performing text embedding on the sample problem text through a third natural language processing model to obtain a text embedding vector of the sample problem text; generating a predicted answer text according to the text embedded vector of the sample question text, and constructing a cross entropy loss function of a third natural language processing model according to the sample answer and the predicted answer text; training the related parameters of text embedding processing and the related parameters of text generation in the third natural language processing model according to the cross entropy loss function of the third natural language processing model to obtain a second natural language processing model.
It can be understood that by adopting the technical scheme, before training the second natural language processing model to obtain the first natural language processing model, pre-training word classification is performed on the text embedded vector generated by the initial natural language processing model to obtain the third natural language processing model, so that the representation capability of the text embedded vector generated by the third natural language processing model on words in the text can be improved; the text embedded vector generated by the third natural language processing model is used for pre-training the text generation to obtain a second natural language processing model, so that the representation capability of the text embedded vector generated by the second natural language processing model to text sentences can be improved, and the accuracy of text embedded vector expression text features can be improved.
S203, constructing auxiliary question-answer pairs according to the sample questions and the auxiliary answers.
Specifically, for each auxiliary answer, the sample question corresponding to the auxiliary answer and the auxiliary answer are used as an auxiliary question-answer pair.
S204, determining a text embedded vector of the sample question-answer pair and a text embedded vector of the auxiliary question-answer pair through a second natural language processing model.
Specifically, sample questions and sample answers in a sample question-answer pair are spliced into sample question-answer texts, and sample questions and auxiliary answers in an auxiliary question-answer pair are spliced into auxiliary question-answer texts; and performing text embedding processing on the sample question-answer text through a second natural language processing model to obtain a text embedding vector of the sample question-answer pair, and performing text embedding processing on the auxiliary question-answer text to obtain a text embedding vector of the auxiliary question-answer pair.
S205, determining the sample matching degree of the sample question-answer pair according to the text embedded vector of the sample question-answer pair through a second natural language processing model, and determining the auxiliary matching degree of the auxiliary question-answer pair according to the text embedded vector of the auxiliary question-answer pair.
In this embodiment, the sample matching degree may be a matching degree between a sample question and a sample answer in a sample question-answer pair; the auxiliary matching degree may be a matching degree between the sample question and the auxiliary answer in the auxiliary question-answer pair.
In an alternative embodiment, a matching degree conversion matrix is included in the second natural language processing model for converting the text embedded vector into a one-dimensional vector. Specifically, through a second natural language processing model, according to the matching degree conversion matrix, converting the text embedded vector of the sample question-answer pair into a one-dimensional vector; taking the element value of the one-dimensional vector as a sample matching degree; and converting the auxiliary matching degree of the auxiliary question-answer pair into a one-dimensional vector; the element value of the one-dimensional vector is taken as the auxiliary matching degree.
S206, training the second natural language processing model according to the sample matching degree and the auxiliary matching degree to obtain a first natural language processing model trained in advance.
Specifically, constructing a loss function according to the sample matching degree and the auxiliary matching degree; training the relevant parameters of text embedding processing and the relevant parameters for determining the matching degree in the second natural language processing model according to the loss function to obtain a pre-trained first natural language processing model.
Illustratively, the loss function of the second natural language processing model may be expressed by the following formula:
wherein S represents a loss function of the second natural language processing model; q represents the number of sample question-answer pairs; QA (quality assurance) q,d Representing a sample question-answer pair q; r (QA) q,d ) Representing the sample matching degree; QA (quality assurance) q,f An auxiliary question-answer pair which represents a sample question-answer pair q; r (QA) q,f ) Representing the auxiliary matching degree; delta represents a Sigmoid function.
In an alternative embodiment, a loss function constructed from the sample matching degree and the auxiliary matching degree may be used as the first loss function; constructing a second loss function according to the auxiliary matching degree of different auxiliary question-answer pairs; training the relevant parameters of text embedding processing and the relevant parameters for determining the matching degree in the second natural language processing model according to the first loss function and the second loss function to obtain a pre-trained first natural language processing model. Illustratively, the second loss function of the second natural language processing model may be expressed by the following formula:
wherein S' represents a second loss function; QA (quality assurance) q,fh The auxiliary question-answer pair fh which corresponds to the sample question-answer pair q and has higher auxiliary matching degree is represented; r (QA) q,fh ) Representing the auxiliary matching degree of the auxiliary question and answer pair fh; QA (quality assurance) q,fl Auxiliary question-answer pairs fl which are lower in auxiliary matching degree and correspond to the sample question-answer pairs q are represented; r (QA) q,fl ) Indicating the degree of auxiliary matching of the auxiliary questions and answers to fl.
S207, acquiring a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, marking matching degree of target round questions and answers in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library.
S208, fusing the user information, the scene information, the target round questions and answers and the historical round questions and answers in the sample question and answer event to obtain a sample text; wherein the turns of the historical turn questions precede the turns of the target turn questions.
S209, performing text embedding processing on the sample text through a first natural language processing model trained in advance in the initial question-answering model to obtain a text embedding vector.
S210, determining the prediction matching degree of the target round questions and answers in the sample question and answer event according to the associated information vector and the text embedding vector through an initial answer evaluation model in the initial question and answer model.
S211, training a first natural language processing model and an initial answer evaluation model in the initial question-answer model according to the prediction matching degree and the annotation matching degree to obtain a target question-answer model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model.
According to the embodiment of the invention, the auxiliary question-answer pair is constructed by acquiring the sample question-answer pair; determining a text embedded vector of the sample question-answer pair and a text embedded vector of the auxiliary question-answer pair through a second natural language processing model; determining the sample matching degree of the sample question-answer pair according to the text embedded vector of the sample question-answer pair and determining the auxiliary matching degree of the auxiliary question-answer pair according to the text embedded vector of the auxiliary question-answer pair through a second natural language processing model; training the second natural language processing model according to the sample matching degree and the auxiliary matching degree to obtain a first natural language processing model trained in advance, so that a text embedded vector generated by the first natural language processing model obtained through training has the capability of representing the matching degree between a question and an answer, further, the representation capability of the text embedded vector generated by the first natural language processing model on text sentences is improved, and the accuracy of the text embedded vector for expressing text features is improved.
Example III
Fig. 3 is a flowchart of a training method of a question-answer model according to a third embodiment of the present invention, where the embodiment of the present invention optimizes and improves the operation of determining the prediction matching degree based on the technical solution of the foregoing embodiment.
Further, the method comprises the steps of 'determining the prediction matching degree of target round questions and answers in a sample question and answer event according to the associated information vector and the text embedded vector' is thinned to be according to a first parameter matrix, and converting the associated information vector into a conversion vector with the same dimension as the text embedded vector; and determining the predicted matching degree of the target round questions and answers in the sample question and answer event according to the conversion vector and the text embedding vector so as to perfect the determination operation of the predicted matching degree.
In the embodiments of the present invention, the details are not described, and reference may be made to the description of the foregoing embodiments.
Referring to the training method of the question-answering model shown in fig. 3, the method includes:
s301, acquiring a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, marking matching degree of target round questions and answers in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library.
S302, fusing the user information, the scene information, the target round questions and answers and the historical round questions and answers in the sample question and answer event to obtain a sample text; wherein the turns of the historical turn questions precede the turns of the target turn questions.
S303, performing text embedding processing on the sample text through a first natural language processing model trained in advance in the initial question-answering model to obtain a text embedding vector.
S304, converting the associated information vector into a conversion vector with the same dimension as the text embedding vector according to the first parameter matrix by an initial answer evaluation model in the initial question-answer model.
In this embodiment, the first parameter matrix may be used to perform linear transformation on the associated information vector; the element values in the first parameter matrix may be preset values or randomly generated values. Specifically, the associated information vector is subjected to linear transformation through the first parameter matrix to obtain an associated information vector with the same dimension as the text embedded vector, and the associated information vector with the same dimension as the text embedded vector is used as a conversion vector.
In an alternative embodiment, if the associated information vector is an m-dimensional line vector and the text embedding vector is an n-dimensional line vector, the first parameter matrix is an n-row m-column matrix.
S305, determining the prediction matching degree of the target round questions and answers in the sample question and answer event according to the second parameter matrix, the conversion vector and the text embedding vector through an initial answer evaluation model in the initial question and answer model.
In this embodiment, the second parameter matrix is used to perform linear transformation of the one-dimensional vector. The element values in the second parameter matrix may be preset values or randomly generated values. Specifically, a certain algorithm is adopted, and the prediction matching degree of the target round questions and answers in the sample question and answer event is determined according to the second parameter matrix, the conversion vector and the text embedding vector.
Optionally, determining the predicted matching degree of the target round questions and answers in the sample question and answer event according to the second parameter matrix, the conversion vector and the text embedding vector includes: adding the conversion vector and the text embedding vector to obtain a target vector; and determining the prediction matching degree of the target round questions and answers in the sample question and answer event according to the second parameter matrix and the target vector.
Specifically, adding the conversion vector and the text embedding vector to obtain a target vector; converting the target vector into a one-dimensional row vector through a second parameter matrix; and determining the element value of the one-dimensional row vector as the predicted matching degree of the target round questions and answers in the sample question and answer event.
In an alternative embodiment, if the text embedding vector is an n-dimensional line vector, the target vector is also an n-dimensional line vector, and the second parameter matrix may be a 1-row n-column matrix.
It can be appreciated that by adopting the above technical scheme, the conversion vector and the text embedding vector are added to obtain the target vector; according to the second parameter matrix and the target vector, the prediction matching degree of the target round questions and answers in the sample question and answer event is determined, the lower complexity of a determination flow of the prediction matching degree can be ensured under the condition that the accuracy of the prediction matching degree is ensured, the determination efficiency of the prediction matching degree is further improved, and the training efficiency of the initial question and answer model is further improved.
S306, training a first natural language processing model and an initial answer evaluation model in the initial question-answer model according to the prediction matching degree and the annotation matching degree to obtain a target question-answer model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model.
Specifically, a loss function is constructed according to the predicted matching degree and the labeled matching degree, and model parameters of a first natural language processing model, model parameters of an initial answer evaluation model, a first parameter matrix and a second parameter matrix in the initial question-answer model are updated by adopting the loss function, so that a target question-answer model is obtained.
According to the technical scheme, the associated information vector is converted into the conversion vector with the same dimension as the text embedding vector, and then the prediction matching degree of the target round questions in the sample question and answer event is determined according to the conversion vector and the text embedding vector, so that the determination flow of the prediction matching degree can be ensured to have lower complexity under the condition that the accuracy of the prediction matching degree is ensured, the determination efficiency of the prediction matching degree is further improved, and the training efficiency of the initial question and answer model is further improved.
Example IV
Fig. 4 is a flowchart of a method for determining answers to questions provided in a fourth embodiment of the present invention, where the method may be performed by an answer determining device for questions, which may be implemented in hardware and/or software, and specifically configured in an electronic device, such as a server, for example.
Referring to the answer determining method of the question shown in fig. 4, the answer determining method includes:
s401, acquiring at least one preset answer in a history round question and answer library and associated information vectors of all preset answers in a target question and answer event, wherein the target question is input by a user in the target question and answer event, user information of the user, scene information of the target question and answer event, and history round questions and answers in the target question and answer event; wherein the turns of the historical turn questions precede the turns of the target questions.
In this embodiment, the question-answer event may be an event for the user to perform a question consultation; the target question-answer event may be a question-answer event for which an answer is to be provided. The target question may be a question to be provided with a corresponding answer. The user information may include, but is not limited to, the user's gender, age, medical history, and records of purchased products, etc. It should be noted that, in the embodiment of the present invention, the user information is legal information obtained by authorization of the user. The scene information may be information of a scene to which the target question-answer event belongs; the scene information may include, but is not limited to, information of a store to which the target question-answer event belongs, channel information of the store to which the target question-answer event belongs, product information in the store to which the target question-answer event belongs, and the like; the store information can be used for representing stores where a user initiates a target question-answer event; the channel information may be used to characterize a channel corresponding to the affiliated store, for example, the channel may be an off-line channel or an internet channel, etc. A historical round question and a historical round answer corresponding to the historical round question may be included in a historical round question. The preset answer can be set by the skilled person according to the actual requirement or practical experience, and the invention is not limited to this. The association information vector may be a vector of association information for characterizing a preset answer; the element values in the association information vector may be used to characterize the association information of the preset answer. The associated information may include, but is not limited to, store information to which the preset answer belongs, channel information of a store to which the preset answer belongs, product information included in the preset answer, specification information of a product in the preset answer, applicable crowd of the product in the preset answer, and the like.
In an alternative embodiment, if the round of the target question is the first round in the target question-answer event, then the historical round of questions is determined to be empty.
S402, fusing user information, scene information, target questions, preset answers and historical round questions and answers aiming at each preset answer to obtain a target text.
In this embodiment, the user information, the scene information, the target questions, the preset answers and the historical round questions and answers may be represented in text form. The target text may be a result of fusing user information, scene information, target questions, preset answers, and historical round questions and answers.
Specifically, for each preset answer, user information, scene information, a target question, the preset answer and a historical round question and answer are fused to obtain a target text corresponding to the preset answer.
S403, performing text embedding processing on the target text through a target natural language processing model in the target question-answering model to obtain a text embedding vector.
In this embodiment, the target question-answering model may be a question-answering model that is trained to provide answers to users; the target natural language processing model may be a trained natural language processing model for performing text embedding processing on the text. The text embedding vector may be a feature expression vector obtained by performing text embedding processing on the target text.
Specifically, for each target text corresponding to a preset answer, text embedding processing is performed on the target text corresponding to the preset answer through a target natural language processing model in a target question-answer model, so as to obtain a text embedding vector corresponding to the preset answer.
In an alternative embodiment, the target natural language processing model may be a first natural language processing model that is trained; the first natural language processing model may also be pre-trained prior to training by: obtaining a sample question-answer pair; the sample question-answer pair comprises a sample question and a sample answer corresponding to the sample question; inquiring similar questions of the sample questions in the sample question-answering pair, and taking answers corresponding to the similar questions as auxiliary answers; constructing auxiliary question-answer pairs according to the sample questions and the auxiliary answers; determining a text embedded vector of the sample question-answer pair and a text embedded vector of the auxiliary question-answer pair through a second natural language processing model; determining the sample matching degree of the sample question-answer pair according to the text embedded vector of the sample question-answer pair and determining the auxiliary matching degree of the auxiliary question-answer pair according to the text embedded vector of the auxiliary question-answer pair through a second natural language processing model; and training the second natural language processing model according to the sample matching degree and the auxiliary matching degree to obtain a first natural language processing model trained in advance.
In an alternative embodiment, before querying the similar questions of the sample questions in the sample question-answering pair and using the answers corresponding to the similar questions as auxiliary answers, the method further comprises: splicing the sample questions and the sample answers in the sample question-answer pair into sample question-answer texts; replacing at least one sample word in the sample question-answering text with a marked word through an initial natural language processing model to obtain a sample marked text, and performing text embedding on the sample marked text to obtain a text embedding vector of the sample marked text; determining the confidence coefficient of each marked word corresponding to each preset word according to the text embedded vector of the sample marked text; training the initial natural language processing model according to the confidence coefficient of each marked word corresponding to each preset word to obtain a third natural language processing model; performing text embedding on the sample problem text through a third natural language processing model to obtain a text embedding vector of the sample problem text; and generating a predicted answer text according to the text embedding vector of the sample question text, and training the third natural language processing model according to the sample answer and the predicted answer text to obtain a second natural language processing model.
In an alternative embodiment, obtaining a sample question-answer pair includes: acquiring original question-answer pairs; the original question-answer pair comprises an original question and an original answer corresponding to the original question; checking whether the length of the original answer is greater than or equal to a preset length; if the length of the original answer is smaller than the preset length, determining the original question-answer pair as a sample question-answer pair; if the length of the original answer is greater than or equal to the preset length, word segmentation is carried out on the original answer, and at least one word segmentation vocabulary is obtained; selecting a replacement vocabulary from each word segmentation vocabulary, and updating the replacement vocabulary into synonyms of the replacement vocabulary; and fusing each word segmentation vocabulary and the replacement vocabulary to obtain a fused answer, and taking a question-answer pair consisting of the original question and the fused answer as a sample question-answer pair.
S404, determining the matching degree between the preset answer and the target question according to the associated information vector and the text embedding vector through a target answer evaluation model in the target question-answer model.
In this embodiment, the target answer evaluation model may be a trained answer evaluation model for determining the matching degree between the answer and the question. Specifically, for the text embedded vector corresponding to each preset answer, determining the matching degree between the preset answer and the target question by adopting a certain algorithm through a target natural language processing model in a target question-answering model according to the associated information vector of the preset answer and the text embedded vector corresponding to the preset answer.
In an alternative embodiment, according to the first parameter matrix after training, the associated information vector of the preset answer is converted into a conversion vector with the same dimension as the text embedding vector; and determining the matching degree between the preset answer and the target question according to the trained second parameter matrix, the transformation vector and the text embedding vector.
In an alternative embodiment, the conversion vector is added to the text embedding vector to obtain the target vector; and determining the matching degree between the preset answer and the target question according to the second parameter matrix and the target vector.
S405, selecting a target answer from all preset answers according to the matching degree between all preset answers and the target questions, and providing the target answer for a user.
In this embodiment, the target answer may be a preset answer that is finally provided to the user. Specifically, the preset answers are ordered according to the matching degree; and taking the preset answers with higher matching degree as target answers, and displaying the target answers to the user according to the sequence of the matching degree from high to low. It should be noted that the preset answer number may be set by the skilled person according to the actual requirement or practical experience, which is not limited in the present invention.
In an alternative embodiment, anomaly detection may also be performed on the target question-answer model. Specifically, the abnormality detection can be performed on the target question-answer model by: the target questions are sent to technicians, so that the technicians feed back labeling answers of the target questions; word segmentation is carried out on the marked answers according to the preset number of characters to obtain at least one marked word, and the number of the marked words is determined; the number of characters in each marked word is the preset number of characters; aiming at each target answer, word segmentation is carried out on the target answer, and at least one auxiliary vocabulary of the target answer is obtained; wherein the number of characters in the auxiliary vocabulary is the same as the number of characters in the labeling vocabulary; determining whether the same labeling vocabulary exists as the auxiliary vocabulary aiming at each auxiliary vocabulary of the target answer; if so, determining the auxiliary vocabulary as an alternative vocabulary; determining the number of alternative words; determining the ratio of the number of candidate words to the number of marked words as the correlation score between the target answer and the target question; and grading the relevant scores of the target answers according to the relevant score threshold value of the preset grade and the relevant scores between the target answers and the target questions.
Illustratively, the preset levels include a first level, a second level, and a third level. Wherein, the first level indicates that the target answer is not related to the target question; the second level represents that the correlation between the target answer and the target question is general; three-level representation is strong in correlation between the target answers and the target questions; the correlation score threshold of the three stages is 0.7; the correlation score threshold for the second level is 0.3; if the correlation score of the target answer is greater than or equal to 0.7, the target answer is a three-level answer; if the correlation score of the target answer is smaller than 0.7 and larger than or equal to 0.3, the target answer is a secondary answer; if the correlation score of the target answer is less than 0.3, the target answer is a first-level answer.
Determining the total correlation degree between each target answer and the target question according to the corresponding grade score of each preset grade and the matching degree of each target answer; illustratively, the tertiary corresponding rank score may be 2; the grade score corresponding to the second grade may be 1; the rank score for a level may be 0; by way of example, the total degree of correlation may be determined by the following formula:
wherein D represents the total degree of correlation; k represents the number of target answers; i represents an i-th target answer in the case where the degree of matching is ranked from top to bottom; r (i) represents the rank score of the i-th target answer.
The target answers are sent to technicians, so that the technicians can determine and feed back the labeling level and the labeling matching degree of each target answer; determining the total annotation correlation degree between each target answer and the target questions according to the grade score corresponding to the annotation grade and the annotation matching degree of each target answer; determining the ratio between the total correlation degree and the total labeling correlation degree as the abnormality degree of the target question-answer model; if the abnormality degree is greater than the preset abnormality threshold, an abnormality message of the target question-answer model is sent to the technician, so that the technician can perform corresponding processing. It should be noted that, the process of determining the total mark correlation degree is similar to the process of determining the total mark correlation degree, and will not be repeated here.
In an optional embodiment, the anomaly detection can be performed on the target question-answer model by counting the user click rate of the target answer; if the ratio of the answer with lower click rate in the target answer exceeds the preset ratio threshold, an abnormal message of the target question-answer model is sent to the technician, so that the technician can perform corresponding processing.
According to the technical scheme, aiming at each preset answer, user information, scene information, target questions, preset answers and historical round questions and answers are fused to obtain a target text corresponding to the preset answer; and determining the matching degree between the preset answer and the target question according to the associated information vector and the text embedded vector, and determining the target answer through the associated information vector of the target question, the user information, the scene information, the historical round questions and the preset answer compared with the method for providing the answer according to the question in the prior art, so that the accuracy of providing the answer by the model is improved.
Example five
Fig. 5 is a schematic structural diagram of a training device for question-answering model according to a fifth embodiment of the present invention. The method and the device can be suitable for the condition of training the question-answering model, the device can execute a training method of the question-answering model, the training device of the question-answering model can be realized in a form of hardware and/or software, and the device can be configured in electronic equipment, such as a server.
Referring to the training apparatus of the question-answering model shown in fig. 5, comprising: an event acquisition module 501, a text determination module 502, a first vector determination module 503, a degree of match prediction module 504, and a question-answer model training module 505, wherein,
the event acquisition module 501 is configured to acquire a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information to which the sample question-answer event belongs, a degree of matching labels of target round questions and answers in the sample question-answer event, and an associated information vector of a preset answer corresponding to the target round answer in the sample question-answer event in the answer library;
the text determining module 502 is configured to fuse user information, scene information, a target round question and answer, and a history round question and answer in a sample question and answer event, so as to obtain a sample text; wherein the turns of the historical turn questions precede the turns of the target turn questions;
A first vector determining module 503, configured to perform text embedding processing on the sample text through a first natural language processing model trained in advance in the initial question-answering model, so as to obtain a text embedding vector;
the matching degree prediction module 504 is configured to determine, according to the association information vector and the text embedding vector, a predicted matching degree of the target round questions in the sample question-answer event by using an initial answer evaluation model in the initial question-answer model;
the question-answering model training module 505 is configured to train a first natural language processing model and an initial answer evaluation model in the initial question-answering model according to the prediction matching degree and the annotation matching degree, so as to obtain a target question-answering model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model.
According to the embodiment of the invention, a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, marking matching degree of target round questions and answers in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library are acquired through an event acquisition module; fusing user information, scene information, target round questions and answers and historical round questions and answers in a sample question and answer event through a text determining module to obtain a sample text; wherein the turns of the historical turn questions precede the turns of the target turn questions; through a first vector determining module, text embedding processing is carried out on the sample text through a first natural language processing model trained in advance in the initial question-answering model, and a text embedding vector is obtained; determining the predicted matching degree of target round questions and answers in a sample question and answer event according to the associated information vector and the text embedded vector by using a matching degree prediction module and an initial answer evaluation module in an initial question and answer model; training a first natural language processing model and an initial answer evaluation model in an initial question-answer model according to the prediction matching degree and the marking matching degree by a question-answer model training module to obtain a target question-answer model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model. According to the technical scheme, user information, scene information, target round questions and answers and historical round questions and answers are fused, and a sample text is obtained; and training the initial question-answer model according to the predicted matching degree determined by the text embedded vector of the sample text and the associated information vector and the labeled matching degree to obtain a trained target question-answer model, and compared with the method for training the model by the questions and the answers in the prior art, the method enriches the background information of the questions and the answers, and further improves the accuracy of providing the answers by the model.
Optionally, the apparatus further comprises:
the sample question-answer pair acquisition module is used for acquiring a sample question-answer pair; the sample question-answer pair comprises a sample question and a sample answer corresponding to the sample question;
the auxiliary answer determining module is used for inquiring similar questions of the sample questions in the sample question-answering pair and taking answers corresponding to the similar questions as auxiliary answers;
the auxiliary question-answer pair determining module is used for constructing auxiliary question-answer pairs according to the sample questions and the auxiliary answers;
the second vector determining module is used for determining a text embedded vector of the sample question-answer pair and a text embedded vector of the auxiliary question-answer pair through a second natural language processing model;
the matching degree determining module is used for determining the sample matching degree of the sample question-answer pair according to the text embedded vector of the sample question-answer pair and determining the auxiliary matching degree of the auxiliary question-answer pair according to the text embedded vector of the auxiliary question-answer pair through the second natural language processing model;
the first model training module is used for training the second natural language processing model according to the sample matching degree and the auxiliary matching degree to obtain a pre-trained first natural language processing model.
Optionally, the apparatus further comprises:
The text splicing module is used for splicing the sample questions and the sample answers in the sample question-answer pair into sample question-answer texts;
the vocabulary replacement module is used for replacing at least one sample vocabulary in the sample question-answering text with a marked vocabulary through the initial natural language processing model to obtain a sample marked text, and performing text embedding on the sample marked text to obtain a text embedding vector of the sample marked text;
the predicted vocabulary determining module is used for determining the confidence coefficient of each marked vocabulary corresponding to each preset vocabulary according to the text embedded vector of the sample marked text;
the third model training module is used for training the initial natural language processing model according to the confidence degrees of the corresponding preset vocabularies of the marked vocabularies to obtain a third natural language processing model;
the third vector determining module is used for carrying out text embedding on the sample problem text through a third natural language processing model to obtain a text embedding vector of the sample problem text;
and the second model training module is used for generating a predicted answer text according to the text embedded vector of the sample question text, and training the third natural language processing model according to the sample answer and the predicted answer text to obtain a second natural language processing model.
Optionally, the sample question-answer pair acquisition module includes:
the original question-answer pair acquisition unit is used for acquiring an original question-answer pair; the original question-answer pair comprises an original question and an original answer corresponding to the original question;
the length checking unit is used for checking whether the length of the original answer is greater than or equal to a preset length;
the first sample question-answer pair determining unit is used for determining the original question-answer pair as a sample question-answer pair if the length of the original answer is smaller than the preset length;
the answer word segmentation unit is used for segmenting the original answer to obtain at least one word segmentation vocabulary if the length of the original answer is greater than or equal to the preset length;
the vocabulary replacement unit is used for selecting a replacement vocabulary from the word segmentation vocabularies and updating the replacement vocabulary into synonyms of the replacement vocabulary;
and the second sample question-answer determining pair determining unit is used for fusing each word segmentation vocabulary and each replacement vocabulary to obtain a fused answer, and taking a question-answer pair formed by the original question and the fused answer as a sample question-answer pair.
Optionally, the matching degree prediction module 504 includes:
a conversion vector determining unit, configured to convert the associated information vector into a conversion vector with the same dimension as the text embedding vector according to the first parameter matrix;
And the matching degree prediction unit is used for determining the prediction matching degree of the target round questions and answers in the sample question and answer event according to the conversion vector and the text embedding vector.
Optionally, the matching degree prediction unit is specifically configured to:
adding the conversion vector and the text embedding vector to obtain a target vector;
and determining the predicted matching degree of the target round questions and answers in the sample question and answer event according to the second parameter matrix and the target vector.
The training device for the question-answering model provided by the embodiment of the invention can execute the training method for the question-answering model provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the training method for the question-answering model.
Example six
Fig. 6 is a schematic structural diagram of an answer determining device for a question according to a sixth embodiment of the present invention. The embodiment of the invention is applicable to the situation of providing answers to users, the device can execute the answer determining method of the questions, the answer determining device of the questions can be realized in the form of hardware and/or software, and the device can be configured in electronic equipment, such as a server.
Referring to the answer determining means of the question shown in fig. 6, comprising: an event acquisition module 601, a text determination module 602, a vector determination module 603, a degree of match determination module 604, and an answer provision module 605, wherein,
The event obtaining module 601 is configured to obtain a target question input by a user in a target question-answer event, user information of the user, scene information to which the target question-answer event belongs, at least one preset answer in a history round question-answer and answer library in the target question-answer event, and an associated information vector of each preset answer; wherein the turns of the historical turn questions precede the turns of the target questions;
the text determining module 602 is configured to fuse, for each preset answer, user information, scene information, a target question, a preset answer, and a historical round of questions and answers, to obtain a target text;
the vector determining module 603 is configured to perform text embedding processing on the target text through a target natural language processing model in the target question-answering model to obtain a text embedding vector;
the matching degree determining module 604 is configured to determine, according to the association information vector and the text embedding vector, a matching degree between the preset answer and the target question through a target answer evaluation model in the target question-answer model;
the answer providing module 605 is configured to select a target answer from the preset answers according to the matching degree between the preset answers and the target questions, and provide the target answer to the user.
According to the embodiment of the invention, the event acquisition module is used for acquiring at least one preset answer in a history round question and answer library and associated information vectors of all preset answers, wherein the target question is input by a user in a target question and answer event, the user information of the user, scene information of the target question and answer event, and the history round question and answer in the target question and answer event; wherein the turns of the historical turn questions precede the turns of the target questions; the text determining module is used for fusing the user information, the scene information, the target questions, the preset answers and the historical round questions and answers aiming at each preset answer to obtain a target text; the vector determining module is used for carrying out text embedding processing on the target text through a target natural language processing model in the target question-answering model to obtain a text embedding vector; the matching degree determining module is used for determining the matching degree between the preset answer and the target question according to the associated information vector and the text embedding vector through a target answer evaluation model in the target question-answer model; and the answer providing module is used for selecting a target answer from the preset answers according to the matching degree between the preset answers and the target questions and providing the target answer for the user. According to the technical scheme, aiming at each preset answer, user information, scene information, target questions, preset answers and historical round questions and answers are fused to obtain a target text corresponding to the preset answer; and determining the matching degree between the preset answer and the target question according to the associated information vector and the text embedded vector, and determining the target answer through the associated information vector of the target question, the user information, the scene information, the historical round questions and the preset answer compared with the method for providing the answer according to the question in the prior art, so that the accuracy of providing the answer by the model is improved.
Example seven
Fig. 7 shows a schematic diagram of an electronic device 700 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 7, the electronic device 700 includes at least one processor 701, and a memory, such as a Read Only Memory (ROM) 702, a Random Access Memory (RAM) 703, etc., communicatively connected to the at least one processor 701, in which the memory stores a computer program executable by the at least one processor, and the processor 701 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 702 or the computer program loaded from the storage unit 708 into the Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 may also be stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the electronic device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunication networks.
The processor 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 701 performs the respective methods and processes described above, for example, a training method of a question-answering model or an answer determining method of a question.
In some embodiments, the training method of the question-answering model or the answer determination method of the question may be implemented as a computer program, which is tangibly embodied in a computer-readable storage medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 700 via the ROM 702 and/or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the processor 701, one or more steps of the training method of the question-answering model or the answer determining method of the question described above may be performed. Alternatively, in other embodiments, the processor 701 may be configured by any other suitable means (e.g., by means of firmware) to perform a training method of a question-answering model or an answer determination method of a question.
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable question and answer model training apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS (Virtual Private Server ) service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method for training a question-answering model, the method comprising:
acquiring a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, annotation matching degree of target round questions and answers in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library;
Fusing the user information, the scene information, the target round questions and answers and the historical round questions and answers in the sample question and answer event to obtain a sample text; wherein the turns of the historical turn questions and answers precede the turns of the target turn questions and answers;
performing text embedding processing on the sample text through a first natural language processing model pre-trained in an initial question-answering model to obtain a text embedding vector;
determining the prediction matching degree of target round questions and answers in the sample question and answer event according to the associated information vector and the text embedded vector by an initial answer evaluation model in an initial question and answer model;
training a first natural language processing model and an initial answer evaluation model in the initial question-answer model according to the prediction matching degree and the annotation matching degree to obtain a target question-answer model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model.
2. The method according to claim 1, further comprising, before obtaining a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information to which the sample question-answer event belongs, a degree of matching of labels of target round questions in the sample question-answer event, and an associated information vector of preset answers corresponding to target round answers in the sample question-answer event in an answer library:
Obtaining a sample question-answer pair; the sample question-answer pair comprises a sample question and a sample answer corresponding to the sample question;
inquiring similar questions of the sample questions in the sample question-answering pair, and taking answers corresponding to the similar questions as auxiliary answers;
constructing auxiliary question-answer pairs according to the sample questions and the auxiliary answers;
determining a text embedded vector of the sample question-answer pair and a text embedded vector of the auxiliary question-answer pair through a second natural language processing model;
determining the sample matching degree of the sample question-answer pair according to the text embedded vector of the sample question-answer pair and determining the auxiliary matching degree of the auxiliary question-answer pair according to the text embedded vector of the auxiliary question-answer pair through the second natural language processing model;
and training the second natural language processing model according to the sample matching degree and the auxiliary matching degree to obtain a pre-trained first natural language processing model.
3. The method of claim 2, further comprising, prior to querying similar questions of the sample questions in the sample question-answer pair and taking answers corresponding to the similar questions as auxiliary answers:
Splicing the sample questions and the sample answers in the sample question-answer pair into sample question-answer texts;
replacing at least one sample word in the sample question-answering text with a marked word through an initial natural language processing model to obtain a sample marked text, and performing text embedding on the sample marked text to obtain a text embedding vector of the sample marked text;
determining the confidence coefficient of each marked word corresponding to each preset word according to the text embedded vector of the sample marked text;
training the initial natural language processing model according to the confidence coefficient of each marked word corresponding to each preset word to obtain a third natural language processing model;
performing text embedding on the sample question text through the third natural language processing model to obtain a text embedding vector of the sample question text;
generating a predicted answer text according to the text embedding vector of the sample question text, and training the third natural language processing model according to the sample answer and the predicted answer text to obtain a second natural language processing model.
4. The method of claim 2, wherein the obtaining a sample question-answer pair comprises:
Acquiring original question-answer pairs; the original question-answer pair comprises an original question and an original answer corresponding to the original question;
checking whether the length of the original answer is greater than or equal to a preset length;
if the length of the original answer is smaller than the preset length, determining the original question-answer pair as a sample question-answer pair;
if the length of the original answer is greater than or equal to the preset length, word segmentation is carried out on the original answer to obtain at least one word segmentation vocabulary;
selecting a replacement vocabulary from each word segmentation vocabulary, and updating the replacement vocabulary into synonyms of the replacement vocabulary;
and fusing each word segmentation vocabulary and the replacement vocabulary to obtain a fused answer, and taking a question-answer pair consisting of the original question and the fused answer as a sample question-answer pair.
5. The method of claim 1, wherein determining a predicted match of a target round of questions and answers in the sample question and answer event based on the association information vector and the text embedding vector comprises:
according to a first parameter matrix, converting the associated information vector into a conversion vector with the same dimension as the text embedding vector;
And determining the prediction matching degree of the target round questions and answers in the sample question and answer event according to the second parameter matrix, the conversion vector and the text embedding vector.
6. The method of claim 5, wherein determining a predicted match of a target round of questions and answers in the sample question and answer event based on the transformation vector and the text embedding vector comprises:
adding the conversion vector and the text embedding vector to obtain a target vector;
and determining the predicted matching degree of the target round questions and answers in the sample question and answer event according to the second parameter matrix and the target vector.
7. A method for determining answers to questions, the method comprising:
acquiring a target question input by a user in a target question-answer event, user information of the user, scene information of the target question-answer event, at least one preset answer in a history round question-answer and answer library in the target question-answer event and associated information vectors of all the preset answers; wherein the turns of the historical turn questions and answers precede the turns of the target questions;
fusing the user information, the scene information, the target questions, the preset answers and the historical round questions and answers aiming at each preset answer to obtain a target text;
Performing text embedding processing on the target text through a target natural language processing model in a target question-answering model to obtain a text embedding vector;
determining the matching degree between the preset answer and the target question according to the associated information vector and the text embedding vector through a target answer evaluation model in a target question-answer model;
and selecting a target answer from the preset answers according to the matching degree between the preset answers and the target questions, and providing the target answer for the user.
8. A training device for a question-answering model, the device comprising:
the event acquisition module is used for acquiring a sample question-answer event, user information of an initiating user of the sample question-answer event, scene information of the sample question-answer event, mark matching degree of target round questions and answers in the sample question-answer event and associated information vectors of corresponding preset answers of the target round answers in the sample question-answer event in an answer library;
the text determining module is used for fusing the user information, the scene information, the target round questions and answers and the historical round questions and answers in the sample question and answer event to obtain a sample text; wherein the turns of the historical turn questions and answers precede the turns of the target turn questions and answers;
The first vector determining module is used for performing text embedding processing on the sample text through a first natural language processing model trained in advance in the initial question-answering model to obtain a text embedding vector;
the matching degree prediction module is used for determining the prediction matching degree of target round questions and answers in the sample question and answer event according to the associated information vector and the text embedding vector through an initial answer evaluation model in an initial question and answer model;
the question-answering model training module is used for training a first natural language processing model and an initial answer evaluation model in the initial question-answering model according to the prediction matching degree and the annotation matching degree to obtain a target question-answering model; the target question-answer model comprises a target natural language processing model and a target answer evaluation model.
9. An answer to a question determining apparatus, the apparatus comprising:
the event acquisition module is used for acquiring at least one preset answer in a history round question and answer library in the target question and answer event and associated information vectors of the preset answers, wherein the target question is input by a user in the target question and answer event, the user information of the user, scene information of the target question and answer event, and the scene information of the target question and answer event; wherein the turns of the historical turn questions and answers precede the turns of the target questions;
The text determining module is used for fusing the user information, the scene information, the target questions, the preset answers and the historical round questions and answers aiming at each preset answer to obtain a target text;
the vector determining module is used for carrying out text embedding processing on the target text through a target natural language processing model in the target question-answering model to obtain a text embedding vector;
the matching degree determining module is used for determining the matching degree between the preset answer and the target question according to the associated information vector and the text embedding vector through a target answer evaluation model in a target question-answer model;
and the answer providing module is used for selecting a target answer from the preset answers according to the matching degree between the preset answers and the target questions and providing the target answer for the user.
10. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to implement the method of training the question-answering model according to any one of claims 1-7, and/or the method of answer determination of a question according to claim 8.
11. A computer readable storage medium storing computer instructions for causing a processor to perform the method of training the question-answering model of any one of claims 1-7, and/or the method of answer determination of a question of claim 8 when executed.
CN202311786658.5A 2023-12-22 2023-12-22 Question-answer model training and answer determining method, device, equipment and medium Pending CN117610666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311786658.5A CN117610666A (en) 2023-12-22 2023-12-22 Question-answer model training and answer determining method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311786658.5A CN117610666A (en) 2023-12-22 2023-12-22 Question-answer model training and answer determining method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117610666A true CN117610666A (en) 2024-02-27

Family

ID=89953597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311786658.5A Pending CN117610666A (en) 2023-12-22 2023-12-22 Question-answer model training and answer determining method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117610666A (en)

Similar Documents

Publication Publication Date Title
CN110737801B (en) Content classification method, apparatus, computer device, and storage medium
CN108829822B (en) Media content recommendation method and device, storage medium and electronic device
CN111444340A (en) Text classification and recommendation method, device, equipment and storage medium
CN113722493B (en) Text classification data processing method, apparatus and storage medium
CN111339260A (en) BERT and QA thought-based fine-grained emotion analysis method
CN110968725B (en) Image content description information generation method, electronic device and storage medium
CN112926308B (en) Method, device, equipment, storage medium and program product for matching text
CN113707299A (en) Auxiliary diagnosis method and device based on inquiry session and computer equipment
CN110377733A (en) A kind of text based Emotion identification method, terminal device and medium
CN115146068B (en) Method, device, equipment and storage medium for extracting relation triples
CN115470313A (en) Information retrieval and model training method, device, equipment and storage medium
CN111368066B (en) Method, apparatus and computer readable storage medium for obtaining dialogue abstract
CN110362828B (en) Network information risk identification method and system
CN112434953A (en) Customer service personnel assessment method and device based on computer data processing
WO2023000725A1 (en) Named entity identification method and apparatus for electric power measurement, and computer device
CN116049370A (en) Information query method and training method and device of information generation model
JP6026036B1 (en) DATA ANALYSIS SYSTEM, ITS CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM
CN117610666A (en) Question-answer model training and answer determining method, device, equipment and medium
CN111582404B (en) Content classification method, device and readable storage medium
CN113806541A (en) Emotion classification method and emotion classification model training method and device
CN116012656B (en) Sample image generation method and image processing model training method and device
CN113378781B (en) Training method and device of video feature extraction model and electronic equipment
CN116628179B (en) User operation data visualization and man-machine interaction recommendation method
CN118013973A (en) BiLSTM-CRF model-based entity identification method and system
CN115129963A (en) Search processing method and device

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