Artificial intelligence-based conversational question answering method and apparatus, computer device, and medium

By utilizing multiple pre-trained evidence extraction and editing/rewriting models in multi-turn dialogue question answering, the location of evidence fragments is determined and answers are generated, solving the problem of low answer accuracy in existing technologies and improving the service efficiency and quality of financial services.

CN116680385BActive Publication Date: 2025-11-07PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310709661.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2025-11-07
Estimated Expiration
2043-06-15

AI Technical Summary

Technical Problem

Existing multi-turn dialogue question answering methods have low accuracy in generating answers in the fintech field and cannot generate natural answers that closely match the questions.

Method used

By acquiring the current question, historical questions, historical answers, and target-related fragments, N pre-trained evidence extraction models are used for classification. The average probability of each position is calculated to determine the start and end positions of the evidence fragments. These are then combined with a pre-trained editing and rewriting model to generate the target answer.

Benefits of technology

This improved the accuracy of evidence extraction and target answer accuracy, enhanced the accuracy of customer service robot dialogue in the fintech field, and thus improved the service efficiency and quality of financial services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116680385B_ABST
    Figure CN116680385B_ABST
Patent Text Reader

Abstract

The application is suitable for the field of financial technology, and particularly relates to a dialogue question and answer method and device based on artificial intelligence, a computer device and a medium. The application splices a current question, a historical question, a historical answer and a target associated segment and respectively inputs them into N evidence extraction models to obtain corresponding extraction results, extracts evidence segments from the target associated segment according to the extraction results, splices the current question, the historical question, the historical answer and the evidence segments and inputs them into an editing and rewriting model to obtain a target answer, obtains the extraction results of the multiple evidence extraction models, reduces the influence of possible errors of a single evidence extraction model, improves the accuracy of the evidence segments, takes the evidence segments with higher relevance to the current question as the rewriting basis of the target answer, improves the accuracy of the target answer, improves the dialogue question and answer accuracy of the customer service robot in the field of financial technology, and further improves the service efficiency and quality of the financial business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention is applicable to the field of financial technology, and in particular relates to an artificial intelligence-based dialogue question-and-answer method, device, computer equipment, and medium. Background Technology

[0002] The goal of multi-turn dialogue question-answering tasks is to create a machine capable of memorizing and understanding past questions and answers, understanding the current question, and generating corresponding answers based on relevant text segments. With the development of artificial intelligence technology, dialogue question-answering models are increasingly used in virtual assistants, smart speakers, and casual conversations. For example, in the financial sector, virtual customer service robots can communicate with customers based on dialogue question-answering models, making significant contributions to resolving customer inquiries, guiding transactions, and providing after-sales service, effectively improving service efficiency in the financial field.

[0003] Existing dialogue question-answering methods often focus on the historical modeling of multi-turn dialogues, i.e., how to better understand the current question by remembering and understanding the historical question-answering process, thereby extracting more accurate answers. However, the above methods can only generate fixed text descriptions of answers, ignoring the naturalness of the answers in the text. This results in the inability to generate answers that are closer to the naturalness of the question, greatly reducing the accuracy of the answers.

[0004] Therefore, in the context of dialogue and question answering in the fintech field, improving the accuracy of generated answers in multi-turn dialogue and question answering has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide an artificial intelligence-based dialogue question-answering method, apparatus, computer device, and medium to solve the problem of low accuracy in generating answers in existing multi-turn dialogue question-answering methods.

[0006] In a first aspect, embodiments of the present invention provide an artificial intelligence-based dialogue question-answering method, the dialogue question-answering method comprising:

[0007] Obtain the current question, historical questions, historical answers to the historical questions, and corresponding target-related fragments; concatenate the current question, the historical questions, the historical answers, and the target-related fragments to obtain the first input data;

[0008] Obtain N pre-trained evidence extraction models, input the first input data into the N pre-trained evidence extraction models respectively for classification, and output the extraction results of the corresponding evidence extraction models. The extraction results include a first probability that each position in the target associated segment is the start position of the evidence segment, and a second probability that it is the end position of the evidence segment. N is an integer greater than 0.

[0009] averaging all the first probabilities and all the second probabilities of each position in the target associated segment to obtain a first average probability and a second average probability of the corresponding position, determining that the position corresponding to the maximum first average probability is the target start position, determining that the position corresponding to the maximum second average probability is the target end position, and determining the segment between the target start position and the target end position in the target associated segment as the evidence segment;

[0010] splicing the current question, the historical question, the historical answer and the evidence segment to obtain second input data, inputting the second input data into the pre-trained editing and rewriting model for rewriting, and outputting a rewriting result as a target answer of the current question.

[0011] In a second aspect, an embodiment of the present application provides a dialogue question answering device based on artificial intelligence, which comprises:

[0012] The data acquisition module is configured to acquire a current question, a historical question, a historical answer of the historical question and a corresponding target associated segment, splice the current question, the historical question, the historical answer and the target associated segment to obtain first input data.

[0013] The evidence extraction module is configured to acquire N pre-trained evidence extraction models, input the first input data into the N pre-trained evidence extraction models respectively for classification, output an extraction result of the corresponding evidence extraction model, the extraction result comprising a first probability of each position in the target associated segment as a start position of an evidence segment and a second probability as an end position of the evidence segment, and N is an integer greater than 0.

[0014] The evidence determination module is configured to average all the first probabilities and all the second probabilities of each position in the target associated segment to obtain a first average probability and a second average probability of the corresponding position, determine that the position corresponding to the maximum first average probability is the target start position, determine that the position corresponding to the maximum second average probability is the target end position, and determine the segment between the target start position and the target end position in the target associated segment as the evidence segment.

[0015] The answer rewriting module is configured to splice the current question, the historical question, the historical answer and the evidence segment to obtain second input data, input the second input data into the pre-trained editing and rewriting model for rewriting, and output a rewriting result as a target answer of the current question.

[0016] In a third aspect, an embodiment of the present application provides a computer device, which comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the dialogue question and answer method according to the first aspect when executing the computer program.

[0017] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the dialogue question and answer method according to the first aspect.

[0018] Compared with the prior art, the embodiment of the present application has the beneficial effects that: the first input data is obtained by splicing the current question, the historical question, the historical answer and the target associated segment, the first input data is input into the N pre-trained evidence extraction models respectively for classification, the extraction results of the corresponding evidence extraction models are output, the extraction results include the first probability of each position in the target associated segment as the start position of the evidence segment and the second probability as the end position of the evidence segment, the first probability and the second probability of each position in the target associated segment are averaged respectively to obtain the first average probability and the second average probability of the corresponding position, the position corresponding to the maximum first average probability is determined as the target start position, the position corresponding to the maximum second average probability is determined as the target end position, the segment between the target start position and the target end position in the target associated segment is determined as the evidence segment, the current question, the historical question, the historical answer and the evidence segment are spliced to obtain the second input data, the second input data is input into the pre-trained editing and rewriting model for rewriting, and the rewriting result is output as the target answer of the current question, the extraction results of the plurality of pre-trained evidence extraction models are used as the extraction basis of the evidence segment, the influence caused by the error of a single evidence extraction model is reduced, the extraction accuracy of the evidence segment is improved, the evidence segment with higher relevance to the current question is used as the rewriting basis of the target answer, the accuracy of the target answer is improved, the dialogue question and answer accuracy of the customer service robot in the field of financial technology is improved, and the service efficiency and quality of the financial business are improved. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0020] Figure 1 is an application environment schematic diagram of a dialogue question and answer method based on artificial intelligence provided by an embodiment of the present application;

[0021] Figure 2 is a flow diagram of a dialogue question answering method based on artificial intelligence provided by an embodiment of the present application;

[0022] Figure 3 is a structural diagram of a dialogue question answering device based on artificial intelligence provided by an embodiment of the present application;

[0023] Figure 4 is a structural diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0024] In the following description, for the purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc., in order to provide a thorough understanding of the embodiments of the application. However, it will be apparent to those skilled in the art that the application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the application with unnecessary detail.

[0025] It should be understood that the term "comprises" when used in this specification and the appended claims indicates the presence of the described features, integers, steps, operations, elements, and / or components but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0026] It should also be understood that the term "and / or" when used in this specification and the appended claims indicates that the associated listed items can be present one or more of the associated listed items, and that the items are not limited to only one of the associated listed items.

[0027] As used in this specification and the appended claims, the term "if" can be construed to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be construed to mean "upon determining" or "in response to determining" or "upon [the described condition or event] being detected" or "in response to [the described condition or event] being detected," depending on the context.

[0028] In addition, the terms "first", "second", "third", etc. are used herein only to distinguish one element from another, and do not imply or suggest a relative importance of the elements so designated.

[0029] Reference within the specification of this document to "one embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase "in one embodiment" or "in some embodiments" in various places within specified descriptions in this specification are not necessarily all referring to the same embodiment, however, but can refer to one or more but not all embodiments. The terms "including," "comprising," "featuring," and variations thereof are meant to encompass the items listed thereafter and equivalents thereof as well as additional items. Unless otherwise noted, the terms "including" and "comprising" are used in an inclusive sense, and should be interpreted as meaning "including, but not limited to."

[0030] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. Artificial intelligence (AI) is a theory, method, technology and application system for simulating, extending and expanding human intelligence by using a digital computer or a machine controlled by a digital computer to perceive the environment, acquire knowledge and use the knowledge to obtain the best results.

[0031] The basic technology of artificial intelligence generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The software technology of artificial intelligence mainly includes computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.

[0032] It should be understood that the size of the serial number of each step in the following embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0033] In order to illustrate the technical solutions of the present application, the following will be described by specific embodiments.

[0034] The dialogue question and answer method based on artificial intelligence provided by the embodiment of the present application can be applied in application environments such as Figure 1 The client includes but is not limited to a palm computer, a desktop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud computer device, a personal digital assistant (PDA), etc. The server can be implemented by an independent server or a server cluster composed of multiple servers.

[0035] The dialogue question and answer method can be widely applied in the fields of financial technology, Internet technology, digital medical treatment, education and the like. For example, a customer service robot in the field of financial technology can communicate with a customer according to the dialogue question and answer method, complete the work of solving customer questions, guiding customer transactions and providing after-sales services, and thus improve the service efficiency in the financial field.

[0036] Referring to Figure 2 is a flowchart of a dialogue question and answer method based on artificial intelligence provided by an embodiment of the present application. The dialogue question and answer method can be applied to a client in Figure 1 , and the dialogue question and answer method can include the following steps.

[0037] In step S201, a current question, a historical question, a historical answer of the historical question and a corresponding target associated segment are obtained, and the current question, the historical question, the historical answer and the target associated segment are spliced to obtain first input data.

[0038] The target of the dialogue question and answer task is to understand the historical question and answer by memory, understand the current question and generate an answer corresponding to the current question based on the relevant text segment.

[0039] In this embodiment, the target associated segment can be a text segment composed of multiple rounds of dialogue, and the historical answer of the historical question can be obtained based on the memory understanding of the target associated segment. In this embodiment, the current question, the historical question, the historical answer and the target associated segment are spliced to obtain first input data as the input of the model, so as to understand and analyze the current question, the historical question, the historical answer and the target associated segment by the model, and obtain an answer corresponding to the current question.

[0040] Correspondingly, for a customer service robot in the financial field, the current question can be a question input by a user at the current time, the historical question can be a question input by the user and other users before the current time in the dialogue process with the customer service robot, the historical answer can be an answer to the corresponding historical question recognized by the user, and the target associated segment can be a text segment related to financial business, used to guide the customer service robot to answer questions related to financial business. Then, the current question, the historical question, the historical answer of the historical question and the corresponding target associated segment can be used to guide the customer service robot to accurately answer the current question, so as to complete the work of solving customer questions, guiding customer transactions and providing after-sales services, and thus improve the service efficiency in the financial field.

[0041] The step of obtaining the current question, the historical question, the historical answer of the historical question, and the target associated segment, splicing the current question, the historical question, the historical answer, and the target associated segment, and obtaining the first input data, takes the current question, the historical question, the historical answer, and the target associated segment as the basis for analysis and understanding of the dialogue content, so as to generate the answer corresponding to the current question, and improves the rationality of the answer.

[0042] In step S202, the N pre-trained evidence extraction models are obtained, the first input data is input into the N pre-trained evidence extraction models for classification, and the extraction result corresponding to the evidence extraction model is output. The extraction result includes the first probability of each position in the target associated segment as the start position of the evidence segment and the second probability as the end position of the evidence segment.

[0043] The target associated segment includes the evidence segment corresponding to the current question, therefore, the first input data is input into the pre-trained evidence extraction model for classification, and the extraction result corresponding to the evidence extraction model is output. The extraction result includes the first probability of each position in the target associated segment as the start position of the evidence segment and the second probability as the end position of the evidence segment.

[0044] The first probability and the second probability can be used as the basis for judging the start position and the end position of the evidence segment, so as to extract the evidence segment of the current question from the target associated segment as the basis for generating the answer of the current question. The evidence segment is more relevant to the current question and the answer corresponding to the current question, and avoids the interference of other segments in the target associated segment, thereby improving the accuracy of the generated answer.

[0045] In the embodiment, in order to improve the accuracy of the obtained evidence segment, the N pre-trained evidence extraction models are used to classify the first input data respectively, N is an integer greater than 0, the extraction result corresponding to each evidence extraction model is output respectively, and all extraction results are used as the extraction basis of the evidence segment, so as to reduce the influence caused by the error of a single evidence extraction model or the low accuracy of a single evidence extraction model, and improve the accuracy of the evidence segment.

[0046] Optionally, the N pre-trained evidence extraction models include a pre-trained first evidence extraction model, the first evidence extraction model includes a first encoder, a first classifier, and a second classifier, and the training process of the first evidence extraction model includes:

[0047] The current question sample, the historical question sample, the historical answer sample of the historical question sample, and the corresponding target association fragment sample are obtained, the current question sample, the historical question sample, the historical answer sample, and the target association fragment sample are spliced and input into a first encoder for feature extraction, and a first sample feature vector is output;

[0048] The first sample feature vector is input into a first classifier for classification, and a first sample extraction result is output, the first sample extraction result including a first sample probability of each position in the target association fragment sample as a start position of the first evidence fragment sample;

[0049] The first sample feature vector is input into a second classifier for classification, and a second sample extraction result is output, the second sample extraction result including a second sample probability of each position in the target association fragment sample as an end position of the first evidence fragment sample;

[0050] The start position and the end position of the actual evidence fragment are obtained, and the first true probability and the second true probability of each position in the target association fragment sample are determined according to the start position and the end position;

[0051] The first model loss is calculated according to the first sample probability, the second sample probability, the first true probability, and the second true probability of all positions, the parameters of the first evidence extraction model are corrected in reverse according to the gradient descent method, until the first model loss converges, and a pre-trained first evidence extraction model is obtained;

[0052] Correspondingly, the first input data are input into the pre-trained N evidence extraction models for classification, and the extraction results of the corresponding evidence extraction models include:

[0053] The first input data are input into the pre-trained first evidence extraction model for classification, and the first extraction result of the pre-trained first evidence extraction model is output.

[0054] Among the N pre-trained evidence extraction models, the pre-trained first evidence extraction model is included, in order to improve the accuracy of the first evidence extraction model, the current question sample, the historical question sample, the historical answer sample of the historical question sample, and the corresponding target association fragment sample are taken as training samples, the start position and the end position of the actual evidence fragment are taken as training labels, and the first evidence extraction model is trained to obtain the pre-trained first evidence extraction model.

[0055] Specifically, the first evidence extraction model comprises a first encoder, a first classifier and a second classifier, the first encoder is configured to perform feature extraction on spliced data of the current question sample, the historical question sample, the historical answer sample and the target related segment sample, and output a first sample feature vector, and the first classifier and the second classifier are configured to classify the first sample feature vector, and output a first sample extraction result and a second sample extraction result respectively.

[0056] The first real probability and the second real probability of each position in the target related segment sample are determined according to the start position and the end position of the actual evidence segment, the first sample probability and the second sample probability of all positions are combined to calculate the first model loss, the parameters of the first evidence extraction model are corrected in reverse according to the gradient descent method until the first model loss converges, and a pre-trained first evidence extraction model is obtained.

[0057] In an embodiment, when the number of positions of the target related segment sample is M, the start position of the actual evidence segment is i, and the end position is j, where i, j = 1, 2, …, M, i≤j. The first real probability of the i-th position in the target related segment sample is 1, and the first real probability of other positions is 0. The second real probability of the j-th position is 1, and the second real probability of other positions is 0.

[0058] The embodiment trains the first evidence extraction model to obtain a pre-trained first evidence extraction model, which is used to classify the first input data to obtain an extraction result comprising a first probability and a second probability, thereby improving the accuracy of the extraction result.

[0059] Optionally, calculating the first model loss according to the first sample probability, the second sample probability, the first real probability and the second real probability of all positions comprises:

[0060] calculating a first similarity according to the first sample probability and the first real probability of all positions;

[0061] calculating a second similarity according to the second sample probability and the second real probability of all positions;

[0062] calculating a sum of the first similarity and the second similarity, and determining the sum as the first model loss.

[0063] The higher the similarity between the first sample probability and the first real probability of the corresponding position, and the higher the similarity between the second sample probability and the second real probability, the higher the accuracy of the first evidence extraction model.

[0064] Therefore, the embodiment calculates a first difference value between the first sample probability and the first true probability of each position, takes the sum of the first difference values of all positions as the first similarity, and calculates a second difference value between the second sample probability and the second true probability of each position, takes the sum of the second difference values of all positions as the second similarity, and then determines the sum of the first similarity and the second similarity as the first model loss, which is used as the basis for modifying the parameters of the first evidence extraction model.

[0065] The embodiment calculates the first similarity according to the first sample probability and the first true probability of all positions, calculates the second similarity according to the second sample probability and the second true probability of all positions, and determines the sum of the first similarity and the second similarity as the first model loss. The first evidence extraction model is trained using the first model loss, which improves the accuracy of the first evidence extraction model.

[0066] Optionally, the N pre-trained evidence extraction models further include a pre-trained second evidence extraction model, and the pre-trained second evidence extraction model is obtained by:

[0067] During the training of the first evidence extraction model, the first model loss after each modification and the corresponding modification number are obtained.

[0068] The first model loss and the preset model loss range are judged to obtain a first judgment result, and the modification number and the preset modification number range are judged to obtain a second judgment result.

[0069] If the first judgment result is that the first model loss is within the preset model loss range, and the second judgment result is that the modification number is within the preset modification number range, the first evidence extraction model corresponding to the modification number in the training process is determined as the pre-trained second evidence extraction model.

[0070] Correspondingly, the first input data are input into the pre-trained N evidence extraction models for classification, and the extraction results of the corresponding evidence extraction models are output, including:

[0071] The first input data are input into the pre-trained first evidence extraction model for classification, and the first extraction result of the corresponding pre-trained first evidence extraction model is output.

[0072] The first input data are input into the pre-trained second evidence extraction model for classification, and the second extraction result of the corresponding pre-trained second evidence extraction model is output.

[0073] In the training process of the first evidence extraction model, as the number of parameter modifications increases, the fitting degree of the first evidence extraction model is different, and the depth of the learned information is also different. In order to improve the diversity of the evidence extraction model, the first evidence extraction model in the training process is selected as the pre-trained second evidence extraction model.

[0074] Specifically, the first model loss after each modification and the corresponding modification number are selected as the corresponding parameters for selecting the pre-trained second evidence extraction model. When the first model loss after each modification is within the pre-set model loss range and the modification number is within the pre-set modification number range, the corresponding first evidence extraction model in the training process is determined as the pre-trained second evidence extraction model.

[0075] Based on the first model loss after each modification and the corresponding modification number, the first evidence extraction model in the training process that meets the model loss range requirement and the modification number range requirement is selected as the pre-trained second evidence extraction model, which improves the diversity of the evidence extraction model and further improves the accuracy of the extracted evidence segments.

[0076] Optionally, the N pre-trained evidence extraction models further include a pre-trained third evidence extraction model, the third evidence extraction model including a second encoder, a third classifier and a fourth classifier, and the training process of the third evidence extraction model including:

[0077] Obtaining the number of dialogue rounds of the target correlation segment sample, sorting all target correlation segment samples in descending order of the number of dialogue rounds to obtain a sorting result;

[0078] According to the order of each target correlation segment sample in the sorting result, each target correlation segment sample and the corresponding current question sample, historical question sample and historical answer sample are spliced and input into the second encoder for feature extraction, and a second sample feature vector is output;

[0079] The second sample feature vector is input into the third classifier for classification, and a third sample extraction result is output, the third sample extraction result including a third sample probability that each position in the target correlation segment sample is the start position of the second evidence segment sample;

[0080] The second sample feature vector is input into the fourth classifier for classification, and a fourth sample extraction result is output, the fourth sample extraction result including a fourth sample probability that each position in the target correlation segment sample is the end position of the second evidence segment sample;

[0081] The second model loss is calculated according to the third sample probability, the fourth sample probability, the first real probability and the second real probability of all positions, the parameters of the third evidence extraction model are corrected in reverse according to the gradient descent method until the second model loss converges, and a pre-trained third evidence extraction model is obtained.

[0082] Wherein, when the target related fragment sample is a text segment composed of multiple dialogue rounds, the more the number of dialogue rounds in the target related fragment sample, the more the number of short dialogues, and the higher the difficulty of dialogue analysis. In this embodiment, the target related fragment sample is sorted according to the number of dialogue rounds in the target related fragment sample to determine the priority of inputting the target related fragment sample and the corresponding current question sample, historical question sample and historical answer sample to the third evidence extraction model, thereby obtaining a third evidence extraction model that focuses on short dialogues, improving the diversity of the evidence extraction model and the rationality of the extraction of evidence fragments.

[0083] Specifically, the starting position and ending position of the actual evidence fragment are used as training labels, and the corresponding current question sample, historical question sample, historical answer sample and target related fragment sample are input into the third evidence extraction model in the order of each target related fragment sample in the sorting result for model training, and a pre-trained third evidence extraction model is obtained.

[0084] In this embodiment, the target related fragment sample is sorted according to the number of dialogue rounds in the target related fragment sample to determine the priority of inputting the target related fragment sample and the corresponding current question sample, historical question sample and historical answer sample to the third evidence extraction model, thereby obtaining a third evidence extraction model that focuses on short dialogues, improving the diversity of the evidence extraction model and the rationality of the extraction of evidence fragments.

[0085] The above step of obtaining N pre-trained evidence extraction models, inputting the first input data into the N pre-trained evidence extraction models for classification, and outputting the extraction results of the corresponding evidence extraction model, including the first probability of each position in the target related fragment as the starting position of the evidence fragment and the second probability as the ending position of the evidence fragment, takes the extraction results of multiple pre-trained evidence extraction models as the basis for extracting evidence fragments, reduces the error influence caused by a single evidence extraction model or a single evidence extraction model with low accuracy, improves the extraction accuracy of evidence fragments, and takes the evidence fragments with higher relevance to the current question as the basis for generating answers, improving the accuracy of the generated answers.

[0086] In step S203, the first probability and the second probability of each position in the target associated segment are averaged respectively to obtain the first average probability and the second average probability of the corresponding position, the position corresponding to the maximum first average probability is determined as the target start position, the position corresponding to the maximum second average probability is determined as the target end position, and the segment between the target start position and the target end position in the target associated segment is determined as the evidence segment.

[0087] The first average probability can represent the possibility of the corresponding position being determined as the start position of the evidence segment, and the second average probability can represent the possibility of the corresponding position being determined as the end position of the evidence segment. In order to improve the accuracy of the evidence segment, the position corresponding to the maximum first average probability is determined as the target start position, the position corresponding to the maximum second average probability is determined as the target end position, and the segment between the target start position and the target end position in the target associated segment is determined as the evidence segment with strong association with the answer to the current question.

[0088] The step of averaging the first probability and the second probability of each position in the target associated segment to obtain the first average probability and the second average probability of the corresponding position, determining the position corresponding to the maximum first average probability as the target start position, determining the position corresponding to the maximum second average probability as the target end position, and determining the segment between the target start position and the target end position in the target associated segment as the evidence segment, judges the target start position and the target end position according to the first average probability and the second average probability, and then extracts the evidence segment from the target associated segment, thereby improving the accuracy of the evidence segment.

[0089] In step S204, the current question, the historical question, the historical answer and the evidence segment are spliced to obtain second input data, the second input data is input into the pre-trained editing and rewriting model for rewriting, and the rewriting result is output as the target answer of the current question.

[0090] The evidence segment is a text segment with stronger association with the current question and the answer corresponding to the current question than the corresponding target associated segment, and therefore, in the embodiment, the current question, the historical question, the historical answer and the evidence segment are spliced to obtain second input data, and the second input data is input into the pre-trained editing and rewriting model for rewriting, and the rewriting result is output as the target answer of the current question, so as to improve the naturalness and accuracy of the target answer.

[0091] Optionally, the pre-trained editing and rewriting model comprises a third encoder and a decoder, and the training process of the editing and rewriting model comprises:

[0092] The current question sample, the historical question sample, the historical answer sample of the historical question sample, and the corresponding evidence fragment sample are obtained, the current question sample, the historical question sample, the historical answer sample, and the evidence fragment sample are spliced and input into a third encoder for feature extraction, and a third sample feature vector is output;

[0093] The third sample feature vector is input into a decoder for decoding, and a current predicted answer is output.

[0094] The current actual answer is obtained, the third model loss is calculated according to the current predicted answer and the current actual answer, the parameters of the editing and rewriting model are corrected in reverse according to the gradient descent method, and the pre-trained editing and rewriting model is obtained until the third model loss converges.

[0095] In order to improve the accuracy of the editing and rewriting model, the current question sample, the historical question sample, the historical answer sample, and the evidence fragment sample are used as training samples, the current actual answer is used as a training label, and the editing and rewriting model is trained to obtain the pre-trained editing and rewriting model.

[0096] Specifically, the editing and rewriting model includes a third encoder and a decoder, the third encoder is used for feature extraction of spliced data of the current question sample, the historical question sample, the historical answer sample, and the evidence fragment sample, and outputs a third sample feature vector, the decoder is used for decoding the third sample feature vector, and outputs a current predicted answer. The third model loss is calculated according to the current predicted answer and the current actual answer, the parameters of the editing and rewriting model are corrected in reverse according to the gradient descent method, and the pre-trained editing and rewriting model is obtained until the third model loss converges.

[0097] The editing and rewriting model is trained to obtain the pre-trained editing and rewriting model, which is used for rewriting the second input data to obtain the current predicted answer corresponding to the current question sample, and the accuracy of the editing and rewriting model is improved.

[0098] Optionally, the third model loss is calculated according to the current predicted answer and the current actual answer, which includes:

[0099] The current predicted answer is converted into a current predicted answer vector according to the word vector technology, and the current actual answer is converted into a current actual answer vector according to the word vector technology.

[0100] The third similarity between the current predicted answer vector and the current actual answer vector is calculated, and the third similarity is determined as the third model loss.

[0101] The current predicted answer and the current actual answer are both in text form, in order to facilitate calculation of the third model loss, the current predicted answer is converted into a current predicted answer vector and the current actual answer is converted into a current actual answer vector according to a word vector technology, so as to determine the third similarity between the current predicted answer vector and the current actual answer vector as the third model loss.

[0102] The current predicted answer and the current actual answer in text form are converted into the current predicted answer vector and the current actual answer vector in vector form to calculate the third model loss, and the calculation accuracy of the third model loss is improved.

[0103] The above-mentioned step of splicing the current question, the historical question, the historical answer and the evidence segment to obtain the second input data, inputting the second input data into the pre-trained editing and rewriting model to perform rewriting, and outputting the rewriting result as the target answer of the current question, improves the naturalness and accuracy of the generated target answer.

[0104] The embodiment of the application splices the current question, the historical question, the historical answer and the target associated segment to obtain the first input data, inputs the first input data into N pre-trained evidence extraction models respectively to perform classification, outputs the extraction result of the corresponding evidence extraction model, the extraction result includes the first probability of each position in the target associated segment as the start position of the evidence segment and the second probability as the end position of the evidence segment, respectively calculates the average value of all first probabilities and all second probabilities of each position in the target associated segment to obtain the first average probability and the second average probability of the corresponding position, determines the position corresponding to the maximum first average probability as the target start position, determines the position corresponding to the maximum second average probability as the target end position, determines the segment between the target start position and the target end position in the target associated segment as the evidence segment, splices the current question, the historical question, the historical answer and the evidence segment to obtain the second input data, inputs the second input data into the pre-trained editing and rewriting model to perform rewriting, and outputs the rewriting result as the target answer of the current question, uses the extraction results of the plurality of pre-trained evidence extraction models as the extraction basis of the evidence segment, reduces the impact caused by errors of a single evidence extraction model, improves the extraction accuracy of the evidence segment, and uses the evidence segment with higher relevance to the current question as the rewriting basis of the target answer, improves the accuracy of the target answer, improves the dialogue question and answer accuracy of the customer service robot in the field of financial technology, and further improves the service efficiency and quality of the financial business.

[0105] Corresponding to the dialogue question and answer method of the above embodiment,Figure 3 A structural block diagram of the dialogue question and answer device based on artificial intelligence provided by the second embodiment of the present application is given, and only parts related to the embodiments of the present application are shown for ease of illustration.

[0106] Referring to Figure 3 The dialogue question and answer device comprises:

[0107] The data acquisition module 31 is configured to acquire the current question, the historical question, the historical answer of the historical question, and the corresponding target association segment, splice the current question, the historical question, the historical answer, and the target association segment to obtain first input data;

[0108] The evidence extraction module 32 is configured to acquire N pre-trained evidence extraction models, input the first input data into the N pre-trained evidence extraction models respectively for classification, and output extraction results of the corresponding evidence extraction models, wherein the extraction results comprise a first probability that each position in the target association segment is a start position of an evidence segment and a second probability that each position in the target association segment is an end position of the evidence segment, and N is an integer greater than 0;

[0109] The evidence determination module 33 is configured to average all first probabilities and all second probabilities of each position in the target association segment respectively to obtain a first average probability and a second average probability of the corresponding position, determine a position corresponding to a maximum first average probability as a target start position, determine a position corresponding to a maximum second average probability as a target end position, and determine a segment between the target start position and the target end position in the target association segment as an evidence segment;

[0110] The answer rewriting module 34 is configured to splice the current question, the historical question, the historical answer, and the evidence segment to obtain second input data, input the second input data into a pre-trained editing and rewriting model for rewriting, and output a rewriting result as a target answer of the current question.

[0111] Optionally, the N pre-trained evidence extraction models comprise a pre-trained first evidence extraction model, the first evidence extraction model comprises a first encoder, a first classifier, and a second classifier, and the dialogue question and answer device further comprises:

[0112] The first feature extraction module is configured to acquire a current question sample, a historical question sample, a historical answer sample of the historical question sample, and a corresponding target association segment sample, input the current question sample, the historical question sample, the historical answer sample, and the target association segment sample after splicing into the first encoder for feature extraction, and output a first sample feature vector;

[0113] The first classification module is configured to input the first sample feature vector into a first classifier to perform classification, and output a first sample extraction result. The first sample extraction result includes a first sample probability of each position in the target correlation segment sample as a start position of the first evidence segment sample.

[0114] The second classification module is configured to input the first sample feature vector into a second classifier to perform classification, and output a second sample extraction result. The second sample extraction result includes a second sample probability of each position in the target correlation segment sample as an end position of the first evidence segment sample.

[0115] The first probability determination module is configured to obtain a start position and an end position of an actual evidence segment, and determine a first real probability and a second real probability of each position in the target correlation segment sample according to the start position and the end position.

[0116] The first parameter correction module is configured to calculate a first model loss according to the first sample probability, the second sample probability, the first real probability and the second real probability of all positions, and correct parameters of the first evidence extraction model in a reverse direction according to a gradient descent method until the first model loss converges, so as to obtain a pre-trained first evidence extraction model.

[0117] Correspondingly, the evidence extraction module 32 includes:

[0118] The first evidence extraction submodule is configured to input the first input data into the pre-trained first evidence extraction model to perform classification, and output a first extraction result corresponding to the pre-trained first evidence extraction model.

[0119] Optionally, the first probability determination module includes:

[0120] The first similarity calculation submodule is configured to calculate a first similarity according to the first sample probability and the first real probability of all positions.

[0121] The second similarity calculation submodule is configured to calculate a second similarity according to the second sample probability and the second real probability of all positions.

[0122] The first model loss calculation submodule is configured to calculate a sum of the first similarity and the second similarity, and determine the sum as the first model loss.

[0123] Optionally, the N pre-trained evidence extraction models further include a pre-trained second evidence extraction model, and the dialogue question and answer device further includes:

[0124] The training data acquisition module is configured to obtain a first model loss after each correction and a corresponding correction number in a training process of the first evidence extraction model.

[0125] The training data comparison module is configured to compare the first model loss with a preset model loss range to obtain a first comparison result, and compare the number of corrections with a preset number of correction range to obtain a second comparison result.

[0126] The second evidence extraction module is configured to, if the first comparison result is that the first model loss is within the preset model loss range, and the second comparison result is that the number of corrections is within the preset number of correction range, determine the first evidence extraction model corresponding to the number of corrections in the training process as the pre-trained second evidence extraction model.

[0127] Correspondingly, the evidence extraction module 32 includes:

[0128] The first evidence extraction submodule is configured to input the first input data into the pre-trained first evidence extraction model for classification, and output a first extraction result corresponding to the pre-trained first evidence extraction model.

[0129] The second evidence extraction submodule is configured to input the first input data into the pre-trained second evidence extraction model for classification, and output a second extraction result corresponding to the pre-trained second evidence extraction model.

[0130] Optionally, the N pre-trained evidence extraction models further include a pre-trained third evidence extraction model, and the third evidence extraction model includes a second encoder, a third classifier and a fourth classifier. The dialogue question and answer device further includes:

[0131] The sample sorting module is configured to obtain the number of dialogue rounds of the target associated segment sample, sort all target associated segment samples in descending order of the number of dialogue rounds, and obtain a sorting result.

[0132] The second feature extraction module is configured to input each target associated segment sample and the corresponding current question sample, historical question sample and historical answer sample into the second encoder for feature extraction in the order of each target associated segment sample in the sorting result, and output a second sample feature vector.

[0133] The third classification module is configured to input the second sample feature vector into the third classifier for classification, and output a third sample extraction result. The third sample extraction result includes a third sample probability that each position in the target associated segment sample is a start position of a second evidence segment sample.

[0134] The fourth classification module is configured to input the second sample feature vector into the fourth classifier for classification, and output a fourth sample extraction result. The fourth sample extraction result includes a fourth sample probability that each position in the target associated segment sample is an end position of a second evidence segment sample.

[0135] The second parameter correction module is used to calculate the second model loss based on the third sample probability, fourth sample probability, first true probability and second true probability at all positions, and to correct the parameters of the third evidence extraction model in reverse according to the gradient descent method until the second model loss converges, thus obtaining the pre-trained third evidence extraction model.

[0136] Optionally, the pre-trained edit-rewrite model includes a third encoder and decoder, and the dialogue question-answering device also includes:

[0137] The third feature extraction module is used to obtain the current question sample, historical question sample, historical answer sample of historical question sample and corresponding evidence fragment sample. The current question sample, historical question sample, historical answer sample and evidence fragment sample are concatenated and then input into the third encoder for feature extraction, and the third sample feature vector is output.

[0138] The feature decoding module is used to input the feature vector of the third sample into the decoder for decoding and output the current predicted answer;

[0139] The third parameter correction module is used to obtain the current actual answer, calculate the third model loss based on the current predicted answer and the current actual answer, and correct the parameters of the edit and rewrite model in reverse according to the gradient descent method until the third model loss converges, thus obtaining the pre-trained edit and rewrite model.

[0140] Optionally, the aforementioned third parameter correction module includes:

[0141] The vector transformation submodule is used to convert the current predicted answer into a current predicted answer vector and the current actual answer into a current actual answer vector using word vector technology.

[0142] The third model loss calculation submodule is used to calculate the third similarity between the current predicted answer vector and the current actual answer vector, and to determine the third similarity as the third model loss.

[0143] It should be noted that the information interaction and execution process between the above modules are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0144] Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 4 As shown, the computer device of this embodiment includes: at least one processor ( Figure 4 Only one is shown in the diagram), a memory, and a computer program stored in the memory and executable on at least one processor, which, when executed by the processor, implements the steps in any of the above-described dialogue question-and-answer method embodiments.

[0145] The computer device can include, but not limited to, a processor, a memory. Those skilled in the art can understand that, Figure 4 The computer device is only an example and does not constitute a limitation on the computer device. The computer device can include more or less components than the illustration, or combine certain components, or different components, for example, it can also include a network interface, a display screen, an input device, etc.

[0146] The processor can be a CPU. The processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0147] The memory includes a readable storage medium, an internal memory, etc. The internal memory can be the memory of the computer device, and the internal memory provides an environment for the operation of the operating system and the computer readable instructions in the readable storage medium. The readable storage medium can be the hard disk of the computer device, and in other embodiments, it can also be the external storage device of the computer device, for example, the plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Further, the memory can include both the internal storage unit of the computer device and the external storage device. The memory is used to store the operating system, application programs, boot loader, data, and other programs, such as program codes of computer programs, etc. The memory can also be used to temporarily store data that has been output or will be output.

[0148] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the above device can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here. If the integrated unit is realized in the form of software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the present application realizes all or part of the processes in the above-mentioned embodiment methods, which can be completed by a computer program to instruct related hardware. The computer program can be stored in a computer readable storage medium, and when the processor executes the computer program, the steps of the above-mentioned method embodiment can be realized. The computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form, etc. The computer readable medium can at least include any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0149] The present application realizes all or part of the processes in the above-mentioned embodiment methods, which can also be completed by a computer program product. When the computer program product runs on the computer device, it makes the computer device execute the steps that can realize the above-mentioned method embodiments.

[0150] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.

[0151] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0152] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / computer device and method can be implemented in other ways. For example, the embodiments of the apparatus / computer device described above are merely schematic, and the division of the modules or units is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0153] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0154] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit it; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. An artificial intelligence-based dialogue question and answer method, characterized by, The dialogue question and answer method comprises: obtaining a current question, a historical question, a historical answer of the historical question and a corresponding target association segment, splicing the current question, the historical question, the historical answer and the target association segment to obtain first input data; obtaining N pre-trained evidence extraction models, inputting the first input data into the N pre-trained evidence extraction models respectively for classification, outputting extraction results of the corresponding evidence extraction models, the extraction results comprising a first probability of each position in the target association segment as a start position of an evidence segment and a second probability as an end position of the evidence segment, N being an integer greater than 0; averaging all first probabilities and all second probabilities of each position in the target association segment respectively to obtain first average probability and second average probability of the corresponding position, determining a position corresponding to the maximum first average probability as a target start position, determining a position corresponding to the maximum second average probability as a target end position, and determining a segment between the target start position and the target end position in the target association segment as an evidence segment; splicing the current question, the historical question, the historical answer and the evidence segment to obtain second input data, inputting the second input data into a pre-trained editing and rewriting model for rewriting, and outputting a rewriting result as a target answer of the current question.

2. The dialog question answering method of claim 1, wherein, The N pre-trained evidence extraction models comprise a pre-trained first evidence extraction model, the first evidence extraction model comprising a first encoder, a first classifier and a second classifier, and a training process of the first evidence extraction model comprising: obtaining a current question sample, a historical question sample, a historical answer sample of the historical question sample and a corresponding target association segment sample, inputting the current question sample, the historical question sample, the historical answer sample and the target association segment sample into the first encoder for feature extraction after splicing, and outputting a first sample feature vector; inputting the first sample feature vector into the first classifier for classification, and outputting a first sample extraction result, the first sample extraction result comprising a first sample probability of each position in the target association segment sample as a start position of a first evidence segment sample; inputting the first sample feature vector into the second classifier for classification, and outputting a second sample extraction result, the second sample extraction result comprising a second sample probability of each position in the target association segment sample as an end position of the first evidence segment sample; obtaining a start position and an end position of an actual evidence segment, and determining a first real probability and a second real probability of each position in the target association segment sample according to the start position and the end position; The first model loss is calculated according to the first sample probability, the second sample probability, the first true probability and the second true probability of all positions, and the parameters of the first evidence extraction model are corrected in reverse according to the gradient descent method until the first model loss converges, so as to obtain a pre-trained first evidence extraction model; Correspondingly, the step of inputting the first input data into the pre-trained N evidence extraction models respectively for classification and outputting extraction results of the corresponding evidence extraction models comprises: inputting the first input data into the pre-trained first evidence extraction model for classification and outputting a first extraction result corresponding to the pre-trained first evidence extraction model.

3. The dialog question answering method of claim 2, wherein, The first model loss is calculated according to the first sample probability, the second sample probability, the first true probability and the second true probability of all positions, and the parameters of the first evidence extraction model are corrected in reverse according to the gradient descent method until the first model loss converges, so as to obtain a pre-trained first evidence extraction model; The first similarity is calculated according to the first sample probability and the first true probability of all positions; The second similarity is calculated according to the second sample probability and the second true probability of all positions; The sum of the first similarity and the second similarity is calculated, and the sum is determined as the first model loss.

4. The dialog question answering method of claim 2, wherein, The N pre-trained evidence extraction models further comprise a pre-trained second evidence extraction model, and the pre-trained second evidence extraction model is obtained by: During the training process of the first evidence extraction model, the first model loss after each correction and the corresponding correction number are obtained; The first model loss is compared with a preset model loss range to obtain a first comparison result, and the correction number is compared with a preset correction number range to obtain a second comparison result; If the first comparison result is that the first model loss is within the preset model loss range, and the second comparison result is that the correction number is within the preset correction number range, the first evidence extraction model corresponding to the correction number in the training process is determined as the pre-trained second evidence extraction model; Correspondingly, the step of inputting the first input data into the pre-trained N evidence extraction models respectively for classification and outputting extraction results of the corresponding evidence extraction models comprises: inputting the first input data into the pre-trained first evidence extraction model for classification and outputting a first extraction result corresponding to the pre-trained first evidence extraction model; inputting the first input data into the pre-trained second evidence extraction model for classification and outputting a second extraction result corresponding to the pre-trained second evidence extraction model.

5. The dialog question answering method of claim 2 or 4, wherein, The N pre-trained evidence extraction models further comprise a pre-trained third evidence extraction model, and the third evidence extraction model comprises a second encoder, a third classifier and a fourth classifier, and the training process of the third evidence extraction model comprises: The number of dialogue rounds of the target correlation segment sample is obtained, and all target correlation segment samples are sorted in descending order of the number of dialogue rounds to obtain a sorting result; According to the order of each target associated fragment sample in the sorting result, the target associated fragment sample and the corresponding current question sample, the historical question sample and the historical answer sample are spliced and input into the second encoder for feature extraction, and a second sample feature vector is output; The second sample feature vector is input into the third classifier for classification, and a third sample extraction result is output, which includes a third sample probability of each position in the target associated fragment sample as a start position of a second evidence fragment sample; The second sample feature vector is input into the fourth classifier for classification, and a fourth sample extraction result is output, which includes a fourth sample probability of each position in the target associated fragment sample as an end position of a second evidence fragment sample; According to the third sample probability, the fourth sample probability, the first true probability and the second true probability of all positions, a second model loss is calculated, and the parameters of the third evidence extraction model are corrected in reverse according to the gradient descent method until the second model loss converges, obtaining a pre-trained third evidence extraction model.

6. The dialog question answering method of claim 1, wherein, The pre-trained editing rewriting model includes a third encoder and a decoder, and the training process of the editing rewriting model includes: Obtaining a current question sample, a historical question sample, a historical answer sample of the historical question sample and a corresponding evidence fragment sample, splicing the current question sample, the historical question sample, the historical answer sample and the evidence fragment sample and inputting them into the third encoder for feature extraction, outputting a third sample feature vector; The third sample feature vector is input into the decoder for decoding, and a current predicted answer is output; Obtaining a current actual answer, calculating a third model loss according to the current predicted answer and the current actual answer, correcting the parameters of the editing rewriting model in reverse according to the gradient descent method until the third model loss converges, obtaining a pre-trained editing rewriting model.

7. The dialog question answering method of claim 6, wherein, The third model loss according to the current predicted answer and the current actual answer includes: According to the word vector technology, the current predicted answer is converted into a current predicted answer vector, and the current actual answer is converted into a current actual answer vector according to the word vector technology; Calculate the third similarity between the current predicted answer vector and the current actual answer vector, and determine the third similarity as the third model loss.

8. An artificial intelligence-based dialogue question answering device, characterized by, The dialog question and answer device includes: A data acquisition module is configured to acquire a current question, a historical question, a historical answer of the historical question and a corresponding target associated fragment, splice the current question, the historical question, the historical answer and the target associated fragment, and obtain first input data; An evidence extraction module is configured to obtain N pre-trained evidence extraction models, input the first input data into the N pre-trained evidence extraction models respectively for classification, and output extraction results of the corresponding evidence extraction models. The extraction results include a first probability that each position in the target correlation segment is a start position of an evidence segment and a second probability that each position in the target correlation segment is an end position of an evidence segment. N is an integer greater than 0. An evidence determination module is configured to obtain a first average probability and a second average probability of each position in the target correlation segment by averaging all first probabilities and all second probabilities of each position in the target correlation segment respectively, determine a position corresponding to a maximum first average probability as a target start position, determine a position corresponding to a maximum second average probability as a target end position, and determine a segment between the target start position and the target end position in the target correlation segment as an evidence segment. An answer rewriting module is configured to splice the current question, the historical question, the historical answer, and the evidence segment to obtain second input data, input the second input data into a pre-trained editing and rewriting model for rewriting, and output a rewriting result as a target answer of the current question.

9. A computer device, comprising: The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the dialog question answering method of any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executable on the processor to implement the dialog question answering method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Inference reading understanding method and system based on serialized evidence extraction

    CN112347756A

  • Knowledge graph dialogue question-answering method and system based on multi-task learning

    CN115658923A