CN115129831A - Data processing method and device, electronic equipment and computer storage medium - Google Patents

Data processing method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN115129831A
CN115129831A CN202110336390.XA CN202110336390A CN115129831A CN 115129831 A CN115129831 A CN 115129831A CN 202110336390 A CN202110336390 A CN 202110336390A CN 115129831 A CN115129831 A CN 115129831A
Authority
CN
China
Prior art keywords
segment
dialog
question
sentence
dialogue
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
CN202110336390.XA
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.)
Alibaba Innovation Co
Original Assignee
Alibaba Singapore Holdings Pte 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 Alibaba Singapore Holdings Pte Ltd filed Critical Alibaba Singapore Holdings Pte Ltd
Priority to CN202110336390.XA priority Critical patent/CN115129831A/en
Publication of CN115129831A publication Critical patent/CN115129831A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Machine Translation (AREA)

Abstract

The embodiment of the application provides a data processing method and device, electronic equipment and a computer storage medium. The data processing method is suitable for automatic dialog generation, and comprises the following steps: acquiring a question dialogue section corresponding to a current question sentence in a dialogue process of carrying out automatic dialogue with an interactive object; screening a plurality of candidate dialogue materials associated with the question dialogue section from a plurality of preset dialogue materials according to the keyword characteristics of the question dialogue section, wherein the candidate dialogue materials comprise a set answer sentence and an associated sentence of the answer sentence; determining semantic matching degree between the question dialog segment and the candidate dialog material according to semantic information of the question dialog segment and semantic information between answer sentences and associated sentences in the candidate dialog material; and determining a target dialogue material from the candidate dialogue materials according to the semantic matching degree, and taking an answer sentence in the target dialogue material as an answer sentence of the current question sentence. The data processing method automatically generates a dialog.

Description

Data processing method and device, electronic equipment and computer storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a data processing method and device, an electronic device and a computer storage medium.
Background
With the advancement of artificial intelligence technology, there are more and more applications of multi-turn conversations with humans through machines, such as voice assistants, conversational self-help queries, self-help ordering, and the like. In the multi-turn dialogue application, a user can input a sentence input, and the machine outputs an answer sentence which feeds back the input sentence, so that the multi-turn dialogue between the machine and a human can be realized. In this process, if the answer sentence is quickly and accurately determined, it is an important factor that affects the quality of the dialogue.
The existing multi-turn dialogue system searches the answer sentences of the input sentences from the preset dialogue text, but the answer sentences of the existing retrieval type dialogue system are single and have insufficient accuracy due to the expression diversity of the language.
Disclosure of Invention
In view of the above, embodiments of the present application provide a data processing scheme to at least partially solve the above problems.
According to a first aspect of embodiments of the present application, there is provided a data processing method, which is suitable for automatic dialog generation, the method including: acquiring a question dialogue section corresponding to a current question sentence in a dialogue process of carrying out automatic dialogue with an interactive object; screening a plurality of candidate dialogue materials associated with a question dialogue section from a plurality of preset dialogue materials according to the keyword characteristics of the question dialogue section, wherein the candidate dialogue materials comprise a set answer sentence and an associated sentence of the answer sentence; determining semantic matching degree between the question dialogue segment and the candidate dialogue material according to semantic information of the question dialogue segment and semantic information between answer sentences and associated sentences in the candidate dialogue material; and determining a target dialogue material from the candidate dialogue materials according to the semantic matching degree, and taking an answer sentence in the target dialogue material as an answer sentence of the current question sentence.
According to a second aspect of embodiments of the present application, there is provided a data processing apparatus adapted for automatic dialog generation, the apparatus comprising: the acquisition module is used for acquiring a question dialogue segment corresponding to a current question sentence in a dialogue process of carrying out automatic dialogue with an interactive object; the system comprises a screening module, a question dialogue section and a question dialogue section, wherein the screening module is used for screening a plurality of candidate dialogue materials related to the question dialogue section from a plurality of preset dialogue materials according to the keyword characteristics of the question dialogue section, and the candidate dialogue materials comprise set answer sentences and related sentences of the answer sentences; the matching module is used for determining the semantic matching degree between the question dialogue segment and the candidate dialogue material according to the semantic information of the question dialogue segment and the semantic information between the answer sentence and the associated sentence in the candidate dialogue material; and the determining module is used for determining a target dialogue material from the candidate dialogue materials according to the semantic matching degree, and taking an answer sentence in the target dialogue material as an answer sentence of the current question sentence.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus, including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the corresponding operation of the data processing method according to the first aspect.
According to a fourth aspect of embodiments of the present application, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the data processing method according to the first aspect.
According to the data processing scheme provided by the embodiment of the application, when the answer sentences are determined, the question dialog sections corresponding to the current question sentences are matched, so that the context semantic information of the question dialog sections is synthesized, the dialog materials not only contain the answer sentences but also contain the associated sentences, so that the dialog materials and the question dialog sections are matched more accurately, candidate dialog materials are matched based on the keyword characteristics of the question dialog sections during matching, and then the target dialog materials are matched according to the semantic information, so that the matching accuracy is ensured, the matching cost is reduced, and the matching accuracy is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a flow chart illustrating steps of a data processing method according to an embodiment of the present application;
FIG. 2A is a flowchart illustrating steps of a data processing method according to a second embodiment of the present application;
FIG. 2B is a diagram of a neural network model in a usage scenario in the embodiment of FIG. 2A;
FIG. 2C is a schematic view of a connecting layer in the embodiment of FIG. 2A;
fig. 3 is a block diagram of a data processing apparatus according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application shall fall within the scope of the protection of the embodiments in the present application.
The following further describes specific implementations of embodiments of the present application with reference to the drawings of the embodiments of the present application.
Example one
Referring to fig. 1, a schematic step flow diagram of a data processing method according to a first embodiment of the present application is shown.
In this embodiment, the method is adapted for automatic dialog generation, comprising the steps of:
step S102: and acquiring a question dialogue section corresponding to the current question statement in the dialogue process of carrying out automatic dialogue with the interactive object.
The automatic dialogue is used for automatically replying to the sentence input by the interactive object. For example, it may be a dialog between an artificial intelligence device and an interactive object. For example, the interactive object queries the express progress, the meal delivery progress, the commodity allowance and the like through the artificial intelligence device. In this embodiment, the method can be applied to a retrieval-type automatic dialogue system to obtain an answer sentence to a current question sentence by retrieving existing dialogue material. Of course, in other embodiments, the method may be applied to other suitable systems, and is not limited thereto.
Taking at least one round of dialog with the interactive object as an example, the current question statement may be the latest question statement input by the interactive object. Its corresponding question dialog segment may be all dialog statements containing the current question statement.
For example, the dialog process is:
question sentence 1: the interactive object is as follows: my packageLetter number.
Answer sentence 1: intelligent customer service: you get good, inquiring that the package has been sent.
Question sentence 2: the interactive object is as follows: which company?
In this example, the current question statement is the latest question statement, namely question statement 2. The corresponding question dialog segment contains question statement 1, answer statement 1 and question statement 2.
Step S104: and screening a plurality of candidate dialogue materials associated with the question dialogue section from a plurality of preset dialogue materials according to the keyword characteristics of the question dialogue section.
The dialog material may be preset, and each dialog material may be divided into an answer sentence and an associated sentence associated with the answer sentence, that is, the screened candidate dialog material includes the set answer sentence and the associated sentence of the answer sentence. The associated statement may be a preceding statement and/or a following statement.
For example, one dialog material containing a preceding sentence, an answer sentence, and a following sentence is:
Figure BDA0002997873950000041
Figure BDA0002997873950000051
alternatively, another conversation material is:
preceding statement 1: the interactive object is as follows: how do there are additional shipping charges for express delivery?
Preceding statement 2: intelligent customer service: none.
Preceding statement 3: the interactive object is as follows: what express you send?
Answering the sentence: intelligent customer service: express delivers your package through company.
In statement 1: the interactive object is as follows: how can i change express companies?
In the later sentence 2: intelligent customer service: which company you need to change to?
In one possible approach, the keyword feature in the question dialog segment may be TF-IDF (term frequency-inverse term frequency), and matched candidate dialog material may be screened from the dialog material by means of TF-IDF. The method for screening the candidate conversation materials has low calculation load and high screening speed. Of course, other suitable ways of determining candidate conversation materials that can ensure the accuracy of the screening and that are fast can be used in other embodiments.
Step S106: and determining the semantic matching degree between the question dialog segment and the candidate dialog material according to the semantic information of the question dialog segment and the semantic information between the answer sentence and the associated sentence in the candidate dialog material.
In a feasible mode, in order to improve the matching accuracy, so that the response of the question and sentence of the interactive object is ensured to be accurate, and the question and sentence are avoided being asked, the semantic information of the question dialogue segment and the semantic information of the answer sentence and the associated sentence in the candidate dialogue material can be extracted through the trained neural network model. Because the candidate dialogue material not only contains answer sentences but also contains associated sentences associated with the answer sentences, the extracted semantic information is more complete, and the accuracy of matching with question dialogue sections is improved.
And matching the question dialog segment with each candidate dialog material based on the identified semantic information, thereby determining the semantic matching degree. For example, the semantic information of the question dialog segment and the semantic information of the candidate dialog material can be represented by vectors, and the semantic matching degree of the question dialog segment and the semantic information of the candidate dialog material can be determined by calculating the included angle between the vectors.
Step S108: and determining a target dialogue material from the candidate dialogue materials according to the semantic matching degree, and taking an answer sentence in the target dialogue material as an answer sentence of the current question sentence.
In a feasible manner, a candidate dialog material with the highest semantic matching degree can be selected as a target dialog material, and an answer sentence in the candidate dialog material is selected as an answer sentence of a current question sentence.
For example, the semantic matching degree of the first candidate dialogue material is lower than that of the second candidate dialogue material, so that the answer sentence in the second candidate dialogue material is selected to answer the current question sentence.
By the method, when determining whether the answer sentence is matched with the question sentence, not only the semantics of the answer sentence are considered, but also sentences before and/or after the answer sentence are associated, and more semantic information is comprehensively considered, so that the retrieved answer sentence is more in line with the context, and the effect of communication with the user is better.
According to the embodiment, the question dialog corresponding to the current question sentence is matched when the answer sentence is determined, so that the context semantic information of the question dialog is synthesized, the dialog material not only contains the answer sentence but also contains the associated sentence, so that the dialog material and the question dialog are matched more accurately, the candidate dialog material is matched based on the keyword characteristics of the question dialog when the matching is performed, and the target dialog material is matched according to the semantic information, so that the matching accuracy is ensured, the matching cost is reduced, and the matching accuracy is ensured.
The data processing method of the present embodiment may be performed by any suitable electronic device having data processing capabilities, including but not limited to: server, mobile terminal (such as mobile phone, PAD, etc.), PC, etc.
Example two
Referring to fig. 2A, a flowchart illustrating steps of a data processing method according to a second embodiment of the present application is shown.
In this embodiment, the method is described by taking a neural network model including an expression layer, a dialogue processing layer, and a connection layer as an example. The data processing method comprises the following steps:
step S202: and acquiring a question dialogue section corresponding to the current question statement in the dialogue process of carrying out automatic dialogue with the interactive object.
The interactive object can be a user, or any other device needing interaction.
The question dialog segment corresponding to the current question statement may be a dialog segment formed by all statements from the beginning of a dialog to the current question statement, or may be a dialog segment formed by N statements closest to the current question statement and the current question statement, and a value of N may be determined according to required matching accuracy and calculation amount, for example, 3, 5, or 10.
Step S204: screening a plurality of candidate dialogue materials related to the question dialogue section from a plurality of preset dialogue materials according to the keyword characteristics of the question dialogue section, wherein the candidate dialogue materials comprise a set answer sentence and a related sentence of the answer sentence.
In one possible approach, step S204 may be implemented as: and determining a plurality of candidate dialogue materials semantically related to the question dialogue section according to the word frequency and the inverse text frequency (namely TF-IDF) corresponding to the keywords in the question dialogue section and the word frequency and the inverse text frequency of the keywords in the dialogue materials.
The word frequency and the inverse text frequency corresponding to the keywords in the question dialog segment can be calculated in any appropriate mode, dialog materials which are obviously irrelevant in semantics can be filtered out by primarily screening the dialog materials through TF-IDF, so that the subsequent calculation amount is reduced, the response speed can be increased in a real-time dialog scene, and the calculation load is reduced.
Of course, in other embodiments, the candidate dialog materials may be determined in other manners, which is not limited by the embodiment.
In this embodiment, the associated sentence includes a preceding sentence located before the answer sentence in conversation timing, the preceding sentence forming a preceding conversation segment, and a following sentence located after the answer sentence in conversation timing, the following sentence forming a following conversation segment.
Both the preceding dialog segment and the following dialog segment may include one or more statements.
Of course, in other embodiments, the association statement may include only the preceding dialog segment or only the following dialog segment.
Step S206: and determining the semantic matching degree between the question dialog segment and the candidate dialog material according to the semantic information of the question dialog segment and the semantic information between the answer sentence and the associated sentence in the candidate dialog material.
In this embodiment, the neural network model is used to extract semantic information for the problem dialog segments and candidate dialog stories.
In order to improve the accuracy of semantic information, the neural network model in the embodiment includes an expression layer, a dialogue processing layer and a connection layer. The expression layer is used for extracting semantic information in a natural language expressed in a text mode into expression in a vector mode. The dialogue processing layer is used for respectively extracting the semantic information in the segments and the global semantic information, and the connection layer is used for fusing the semantic information in the segments and the global semantic information.
The expression layer may be an encoder in a transform model, in which a self-attention layer and a feedforward layer are included in the encoder.
Of course, the expression layer may also be other network structures capable of implementing semantic extraction, such as a part for extracting semantics and features of a sentence in a bert model, which is not limited in this embodiment.
Taking the question dialog segment as an example, a description is given to an implementation manner of obtaining a question dialog segment vector corresponding to the question dialog segment through an expression layer, where the previous dialog segment, the subsequent dialog segment, and the answer sentence are obtained in a similar manner, and thus no further description is given.
The question dialog segment is assumed to include tq question-and-answer sentences (tq is a positive integer), and the characteristic information of each question sentence can be acquired through the expression layer. Taking the ith question sentence in the question dialog as an example, obtaining Word vectors and position vectors of words in the ith question sentence by means of Word embedding and the like, inputting the Word vectors and the position vectors into a self-attention layer of a transform model, processing the output result of the self-attention layer through a feedforward layer, and taking the output of the feedforward layer as characteristic information of the ith question sentence, wherein the characteristic information can be expressed as
Figure BDA0002997873950000081
I.e. a vector expressed in the form of a vector and carrying semantic information of the ith question statement.
Where q denotes that the statement is a statement in the question dialog. U denotes that it is a sentence, i denotes its position in the question dialog, e.g.,
Figure BDA0002997873950000082
representing the 1 st question statement in the question dialog, i.e. the current question statement, similarly
Figure BDA0002997873950000083
Representing the 2 nd question statement in the question dialog, i.e. the current questionOne sentence before the sentence.
The feature information of the question sentence included in the question dialog may be expressed as:
Figure BDA0002997873950000084
tq is the number of question statements that the question dialog segment includes.
Similarly, feature information of the answer sentence can be obtained through the expression layer, and since the answer sentence has only one, it can be expressed as U r ,。
Obtaining the feature information of the previous sentence included in the previous dialog segment through the presentation layer may be expressed as
Figure BDA0002997873950000091
th denotes the number of previous sentences included in the previous dialog segment.
The characteristic information of the following sentence included in the following dialog segment obtained through the presentation layer may be expressed as
Figure BDA0002997873950000092
tf represents the number of subsequent sentences included in the subsequent dialog segment.
By the method, the characteristic information corresponding to each statement can be accurately obtained, so that the semantic information in the segment and the global semantic information can be accurately extracted subsequently. The feature information of the sentence output by the presentation layer can be input into the dialogue processing layer to obtain the intra-segment semantic information and the global semantic information.
In one example, obtaining intra-segment semantic information and global semantic information by the dialog processing layer may be achieved by the sub-steps of:
substep S2061: and forming the question dialog segment, the previous dialog segment, the subsequent dialog segment and the answer sentence into a global reference text.
The global reference text is used for extracting global semantic information, and if only intra-segment semantic information is obtained, this step may not be performed, and steps S2061 to S2063 do not limit a strict timing relationship.
One possible implementation way to form the global reference text is, for example:
the global reference text may be represented as G ═ U q ,U h ,U r ,U f ]。
Wherein, U q Concatenation of characteristic information representing all question statements in a question dialog, which is
Figure BDA0002997873950000093
tq is the number of question statements. Similarly, U h Concatenation of feature information, U, representing all preceding sentences in preceding dialog r Characteristic information representing answer sentences, U f The concatenation of feature information representing all following sentences in the following dialog segment.
Substep S2062: and respectively taking the question dialog segment, the answer sentence, the previous dialog segment and the subsequent dialog segment as target processing objects, performing in-segment processing on the target processing objects to obtain corresponding in-segment semantic information, and determining global semantic information corresponding to the target processing objects according to the target processing objects and the global reference text.
Since the dialog processing layer has similar processing procedures for the question dialog, the answer sentence, the previous dialog and the subsequent dialog, the target processing object is taken as the question dialog as an example for explanation.
In one possible approach, obtaining intra-segment semantic information may be achieved through the following processes a 1-C1.
Procedure a 1: and determining the current sentence from the sentences contained in the target processing object according to the sequence which is gradually far away from the answer sentences in time sequence.
Since the closer the sentence to the answer sentence in the dialog process is, the greater the semantic correlation between the answer sentence is, i.e. the more useful information is contained, and the worse the semantic correlation between the farther the sentence is, i.e. the less useful information is contained, when the useful semantic information in the dialog segment is extracted through the dialog processing layer, the sentences are processed in the order of being gradually distant from the answer sentence in time sequence, i.e. when the question dialog segment is specifically included, the current question sentence is determined as the current sentence for the first time. If the answer sentence is a previous sentence, determining a previous sentence which is closest to the answer sentence as a current sentence for the first time; similarly, for the subsequent dialog segment, the one subsequent sentence closest to the answer sentence is also determined as the current sentence for the first time.
Procedure B1: and processing the feature information of the current statement and the extracted semantic information in the segment by using a first self-attention layer to obtain the retention information in the segment corresponding to the current statement.
The feature information of the current sentence in the question dialog can be written as
Figure BDA0002997873950000101
Indicating that it is the characteristic information of the ith question statement in the question dialog.
If the current sentence is the first sentence, the extracted intra-segment semantic information is an initialized value, and the extracted intra-segment semantic information can be written as
Figure BDA0002997873950000102
Where q denotes that it is a question dialog segment, i-1 denotes semantic information containing the first i-1 question statements, and l denotes intra-segment semantic information.
As shown in fig. 2B, the first self-attention layer is an attention layer, which is used to determine semantic information to be preserved in the current sentence, i.e. intra-segment preservation information (denoted as intra-segment preservation information) by combining feature information of the current sentence and extracted intra-segment semantic information
Figure BDA0002997873950000103
)。
The treatment process can be expressed by the following modes:
Figure BDA0002997873950000111
where dk refers to the dimension of wordempidding used when obtaining the feature information of the current sentence, that is, one in the feature information of the current sentenceThe dimension of the row.
Figure BDA0002997873950000112
To represent
Figure BDA0002997873950000113
The transposing of (1).
By the method, semantic information needing to be reserved in the current sentence can be adjusted through the extracted semantic information in the section, and further, the effect of determining useful information in the current sentence is achieved under the condition of integrating semantic information of the context in the question dialog section.
Procedure C1: and updating the intra-segment retention information of the current statement into the extracted intra-segment semantic information according to the intra-segment retention information of the current statement and the intra-segment adjustment weight of the extracted intra-segment semantic information until the statement contained in the target processing object is processed.
Process C1 may be implemented by processes C11 and C12.
A process C11 of determining the intra-segment adjustment weights based on the intra-segment retention information of the current sentence and the extracted intra-segment semantic information.
In one possible approach, the intra-segment adjustment weight may be denoted as a i . It can be determined according to the following manner:
Figure BDA0002997873950000114
the MLP is a multi-layer perceptron, the structure of which can be determined as required, and the required parameters are obtained through training. a is i Has a value in the range of-1 to 1, since a i Can take a negative value, so that the feature information of the current sentence can be added into the extracted intra-segment semantic information or some irrelevant information can be deleted from the extracted intra-segment semantic information by adjusting the weight in the segment when a i When taking negative value, the content can be deleted from the extracted semantic information in the segment, thereby realizing the correction of the extracted semantic information in the segment.
Procedure C12: and obtaining a product of the intra-segment adjustment weight and the extracted intra-segment semantic information, and updating the intra-segment retention information of the current statement into the extracted intra-segment semantic information by summing the product and the intra-segment retention information of the current statement.
In an example, the manner of updating the intra-segment retention information of the current sentence into the extracted intra-segment semantic information may be represented as:
Figure BDA0002997873950000121
wherein, the updated semantic information in the segment can be written as
Figure BDA0002997873950000122
By the method, the useful information in the current statement is updated to the semantic information in the segment, so that the semantic information in the segment contains the useful information in all the processed problem statements, and the useless information is deleted, thereby being beneficial to improving the accuracy of subsequent matching.
After the intra-segment semantic information corresponding to the current statement is updated, a new current statement can be determined again according to the time sequence, and the processing is carried out on the new current statement until the feature information of all question statements in the question dialogue segment is updated into the intra-segment semantic information.
Because the corresponding in-segment semantic information is obtained for each question statement, the in-segment semantic information corresponding to each question statement can be spliced to obtain the in-segment semantic information corresponding to the question dialog segment. It can be expressed as:
Figure BDA0002997873950000123
in one possible approach, obtaining global semantic information may be accomplished through processes A2-D2.
Procedure a 2: and determining the current sentence from the sentences contained in the target processing object according to the sequence which is gradually far away from the answer sentences in time sequence.
The determination principle of the current sentence is the same as that described in procedure a1, and thus is not described in detail.
Procedure B2: and processing the feature information of the current sentence and the global reference text by using a second self-attention layer to obtain the corresponding extracted semantic information of the current sentence.
The second self-attention layer may be an attention layer, but since it implements a different function, the trained parameters may be different from the first self-attention layer.
As shown in fig. 2B, the feature information of the current sentence and the global reference text (which is in a vector form) may be input into the second self-attention layer, so as to obtain extracted semantic information that is output by the second self-attention layer and that fuses semantic information in the current sentence and the global reference text.
Extracting semantic information notation
Figure BDA0002997873950000124
q denotes that it is a question statement in a question dialog, g denotes information for global semantics, and i denotes the ith question statement.
Extracting semantic information is extracted in the following way:
Figure BDA0002997873950000131
wherein dk is
Figure BDA0002997873950000132
Dimension of the middle row. G denotes a vector representation of the global reference text.
Figure BDA0002997873950000133
Characteristic information representing the current sentence.
Procedure C2: and processing the extracted semantic information and the extracted global semantic information corresponding to the current statement by using a third self-attention layer to obtain global reserved information corresponding to the current statement.
The third self-attention layer may be an attention layer, but since the functions implemented by the third self-attention layer are different, the trained parameters may be different from the first self-attention layer and the second self-attention layer. The extracted semantic information output by the second self-attention layer and the extracted global semantic information are input into a third self-attention layer, so that useful information in the current sentence is determined by the third self-attention layer based on the extracted global semantic information.
The extracted global semantic information can be expressed as
Figure BDA0002997873950000134
Which represents the global semantic information extracted by fusing the semantics of the first i-1 question statements in the question dialog.
The global reservation information corresponding to the current statement may be written as
Figure BDA0002997873950000135
The extraction mode can be expressed by the following modes:
Figure BDA0002997873950000136
wherein dk is
Figure BDA0002997873950000137
Dimension of one row.
Procedure D2: and updating the global retention information of the current statement into the extracted global semantic information according to the global retention information of the current statement and the global adjustment weight of the extracted global semantic information until the statement contained in the target processing object is processed.
The second update weight value may be denoted as a gi . It is determined according to the following manner:
Figure BDA0002997873950000138
the MLP is a multi-layer perceptron, the structure of which can be determined as needed, and the parameters of which can be obtained by training as needed, and it should be noted that the structure and the parameters of the multi-layer perceptron can be the same as or different from those of the aforementioned multi-layer perceptron.
Updating the global retention information of the current statement to the extracted global semantic information may be implemented by:
Figure BDA0002997873950000141
after obtaining the global semantic information corresponding to the current sentence, a new current sentence may be determined, and the above processes a2 to D2 may be repeated until obtaining the global semantic information corresponding to all question sentences in the question dialog.
Based on the global semantic information of each question statement, the global semantic information corresponding to the question dialog segment can be spliced, and can be expressed as
Figure BDA0002997873950000142
Namely, it is
Figure BDA0002997873950000143
Because the dialogue processing layer extracts the semantic information in the segments and the global semantic information between each dialogue segment or each answer sentence and the global reference text, and removes the semantics irrelevant to the dialogue in the sentences, the problems that the semantic information carried by not all sentences is useful for searching the answer sentences, the useful information needs to be extracted, and the interference information needs to be removed are solved.
In the process, because the intra-segment semantic information and the global semantic information of the preceding dialog segment, the following dialog segment and the answer sentence are independently extracted, the dilution of the intra-segment semantic information and the global semantic information of the answer sentence by the information irrelevant to the preceding dialog segment and the following dialog segment is avoided, and the weight of the answer sentence can be independently adjusted, so that the semantic matching degree between the subsequent question dialog segment and the candidate dialog material is more accurate, and the semantic matching degree of the candidate dialog material corresponding to the answer sentence with the semantic matching with the current question sentence is higher.
Substep S2063: and determining semantic matching degree between the question dialog segment and the candidate dialog material according to the in-segment semantic information and the global semantic information corresponding to the question dialog segment, the previous dialog segment, the next dialog segment and the answer sentence respectively.
After obtaining the intra-segment semantic information and the global semantic information, the degree of matching between question statements and answer statements in the question dialog segment can be calculated using the connection layer. In this embodiment, as shown in fig. 2C, the connection layer is used to calculate the semantic matching degree.
In one possible approach, sub-step S2063 may be implemented by processes A3-C3.
Procedure a 3: and calculating cross attention matrixes of the question dialog segment, the previous dialog segment, the subsequent dialog segment and the answer sentence respectively according to the intra-segment semantic information and the global semantic information which respectively correspond to the question dialog segment, the previous dialog segment, the subsequent dialog segment and the answer sentence.
Different data can be input and processed through the connection layer according to different requirements. For example, the processing of the connection layer comprises the following stages:
stage I: a word-level cross-attention matrix is calculated.
Using the question dialog and the previous dialog as examples, the word-level cross attention moment array can be written as
Figure BDA0002997873950000151
Each element in the word-level cross-attention matrix may be written as
Figure BDA0002997873950000152
Figure BDA0002997873950000153
Figure BDA0002997873950000154
The transpose of line a in the word vector concatenation matrix, represented as a question statement in the question dialog. { E q } b Row b in the word vector concatenation matrix of the preceding sentence represented as the preceding dialog.
Accordingly, based on the input question dialog segment and the subsequent dialog segment, a corresponding word-level cross-attention matrix may be obtained, as well as the question dialog segment and the answer sentence.
Stage II: a sentence-level cross-attention matrix is calculated.
The sentence-level cross attention moment array can be recorded as
Figure BDA0002997873950000155
Each element in the matrix can be denoted as
Figure BDA0002997873950000156
Figure BDA0002997873950000157
Figure BDA0002997873950000158
The transpose of the a-th row in the concatenation matrix of the feature information represented as a question statement. { U h } b Row b in the concatenation matrix, represented as the feature information of the previous sentence.
And stage III: an attention cross-attention matrix is calculated.
The cross-attention matrix may be written as
Figure BDA0002997873950000159
Each element in the matrix can be denoted as
Figure BDA00029978739500001510
Figure BDA00029978739500001511
Figure BDA00029978739500001512
The a-th row in the concatenation matrix expressed as the feature information of the question sentence performs transposition of the result of feature extraction by the self-attention layer. { U' h } b And b-th row in the splicing matrix of the feature information expressed as the previous sentence is the result of feature extraction through the self-attention layer.
The self-attention layer may be a one-shot self-attention layer, U ', in a transducer' q Any suitable method may be used for this purpose and will not be described further.
Procedure B3: and splicing the cross attention matrixes of the question dialog segment and the previous dialog segment, the subsequent dialog segment and the answer sentence respectively.
The word-level cross attention matrix, sentence-level cross attention matrix and attention cross attention moment matrix of the previous dialog are spliced to form corresponding splicing results which are recorded as
Figure BDA0002997873950000161
Procedure C3: and inputting the splicing result into a convolutional neural network model to obtain the semantic matching degree between the output question dialog section and the candidate dialog material.
For example, the determined splicing result based on the question dialog and the previous dialog is input into a trained convolutional neural network, and the first matching degree of the output obtained is recorded as
Figure BDA0002997873950000162
Wherein, according to the characteristic information of the question sentence and the characteristic information of the previous sentence of the question dialogue section, and the word vector splicing matrix of the question sentence and the splicing matrix of the word vector of the previous sentence, a first degree of association is determined, which can be written as
Figure BDA0002997873950000163
Where u denotes a sentence correlation degree, and h denotes a sentence correlation degree between the question sentence and the preceding sentence.
With combined reference to figure 2C of the drawings,
Figure BDA0002997873950000164
wherein, U q Is a concatenation matrix of the characteristic information of the question statements, U h A concatenation matrix of the feature information for the preceding sentence, E q Is a word vector concatenation matrix of question sentences E h Is a concatenation matrix of word vectors of previous sentences.
Accordingly, by inputting different data, the connection layer can obtain different matching degrees, such as inputting the word vector splicing matrix E of the question sentence q Word vector splicing matrix E of answer sentences r And a splicing matrix U of the characteristic information of the question sentence h And feature information U of answer sentence r (since the answer sentence has only one sentence, the concatenation matrix is itself), a second matching degree is obtained
Figure BDA0002997873950000165
Word vector splicing matrix E of semantic information and question sentences in input segment q Word vector splicing matrix E of answer sentences r Etc. a third degree of matching, etc. may be obtained.
And inputting different data combinations into the connection layer to obtain corresponding matching degrees, and further processing the output matching degrees by using a multilayer perceptron to finally obtain the semantic matching degrees between the question dialog segments and the candidate dialog materials.
For example, mapping the obtained multiple matching degrees into a final matching confidence may be expressed as:
Figure BDA0002997873950000166
where MLP is a multilayer perceptron, it may be a linear multilayer perceptron.
Figure BDA0002997873950000167
The matching degree of question sentences and previous dialog sections, answer sentences and later dialog sections at the sentence level respectively.
Figure BDA0002997873950000168
The matching degree of question sentence, preceding dialogue section, answer sentence and following dialogue section in the semantic level in the section is obtained in the way
Figure BDA0002997873950000169
Similarly, the difference is that the input data is U q And U h The intra-segment semantic information of the question dialog segment and the intra-segment semantic information of the previous dialog segment are replaced.
Figure BDA0002997873950000171
The matching degree of question sentence and previous dialogue segment, answer sentence and subsequent dialogue segment in global semantic level is obtained
Figure BDA0002997873950000172
Similarly, the difference is that the input data is U q And U h The global semantic information of the question dialog and the global semantic information of the previous dialog are replaced.
Step S208: and determining a target dialogue material from the candidate dialogue materials according to the semantic matching degree, and taking an answer sentence in the target dialogue material as an answer sentence of the current question sentence.
For example, the one with the highest semantic matching degree is selected as the target dialogue material, and the answer sentence in the target dialogue material is selected as the answer sentence of the current question sentence.
By the method, the preceding sentence and the following sentence of the answer sentence are utilized when the answer sentence corresponding to the question sentence is searched, so that semantic information of the preceding sentence and the following sentence is fully utilized, and the searching accuracy is further improved. And respectively processing the previous dialogue, the answer sentence and the subsequent dialogue to obtain the corresponding intra-segment semantic information and the related semantic information, so that the weight of the answer sentence can be more conveniently controlled, better adjustment can be realized, and more accurate retrieval results can be obtained. So as to improve the retrieval accuracy in the multi-turn dialogue system.
By the method, the matching degree between the question sentences and the answer sentences of the candidate materials can be respectively calculated, the answer sentences used for answering the question sentences are further determined according to the matching degree, and the accuracy rate of the reply of the multi-turn dialogue system based on retrieval is ensured.
EXAMPLE III
Referring to fig. 3, a block diagram of a data processing apparatus according to a third embodiment of the present application is shown.
In this embodiment, a data processing apparatus adapted for automatic dialog generation, the apparatus comprising:
an obtaining module 302, configured to obtain a question dialog segment corresponding to a current question statement in a dialog process of performing an automatic dialog with an interactive object;
a screening module 304, configured to screen, according to a keyword feature of a question dialog segment, a plurality of candidate dialog materials associated with the question dialog segment from a plurality of preset dialog materials, where the candidate dialog materials include a set answer sentence and an associated sentence of the answer sentence;
a matching module 306, configured to determine a semantic matching degree between the question dialog and the candidate dialog material according to semantic information of the question dialog and semantic information between an answer sentence and an associated sentence in the candidate dialog material;
a determining module 308, configured to determine a target dialog material from the multiple candidate dialog materials according to the semantic matching degree, and use an answer sentence in the target dialog material as an answer sentence of the current question sentence.
Optionally, the screening module 304 is configured to determine a plurality of candidate dialog materials semantically associated with the question dialog segment according to the word frequency and the inverse text frequency corresponding to the keyword in the question dialog segment and the word frequency and the inverse text frequency of the keyword in the dialog materials.
Optionally, the associated sentence includes a preceding sentence located before the answer sentence in dialog timing, and a following sentence located after the answer sentence in dialog timing, the preceding sentence forming a preceding dialog segment, and the following sentence forming a following dialog segment.
Optionally, the matching module 306 is configured to form the question dialog segment, the previous dialog segment, the next dialog segment, and the answer sentence into a global reference text; respectively taking the question dialog segment, the answer sentence, the previous dialog segment and the subsequent dialog segment as target processing objects, performing in-segment processing on the target processing objects to obtain corresponding in-segment semantic information, and determining global semantic information corresponding to the target processing objects according to the target processing objects and the global reference text; and determining semantic matching degree between the question dialog segment and the candidate dialog material according to the in-segment semantic information and the global semantic information corresponding to the question dialog segment, the previous dialog segment, the next dialog segment and the answer sentence respectively.
Optionally, the matching module 306 is configured to determine a current sentence from the sentences included in the target processing object in an order that is chronologically gradually far from the answer sentence when performing intra-segment processing on the target processing object to obtain corresponding intra-segment semantic information; processing the feature information of the current statement and the extracted semantic information in the segment by using a first self-attention layer to obtain the retention information in the segment corresponding to the current statement; and updating the intra-segment retention information of the current statement into the extracted intra-segment semantic information according to the intra-segment retention information of the current statement and the intra-segment adjustment weight of the extracted intra-segment semantic information until the statement contained in the target processing object is processed.
Optionally, the matching module 306 is configured to determine the intra-segment adjustment weight according to the intra-segment retention information of the current sentence and the intra-segment adjustment weight of the extracted intra-segment semantic information when the intra-segment retention information of the current sentence is updated into the extracted intra-segment semantic information according to the intra-segment retention information of the current sentence and the intra-segment adjustment weight of the extracted intra-segment semantic information; and obtaining the product of the intra-segment adjustment weight and the extracted intra-segment semantic information, and updating the intra-segment retention information of the current statement into the extracted intra-segment semantic information by summing the product and the intra-segment retention information of the current statement.
Optionally, when determining the global semantic information corresponding to the target processing object according to the target processing object and the global reference text, the matching module 306 determines the current sentence from the sentences included in the target processing object according to an order that the answer sentences are gradually separated from each other in time sequence; processing the feature information of the current sentence and the global reference text by using a second self-attention layer to obtain corresponding extracted semantic information of the current sentence; processing the extracted semantic information and the extracted global semantic information corresponding to the current statement by using a third self-attention layer to obtain global reserved information corresponding to the current statement; and updating the global retention information of the current statement into the extracted global semantic information according to the global retention information of the current statement and the global adjustment weight of the extracted global semantic information until the statement contained in the target processing object is processed.
Optionally, the matching module 306 is configured to, when determining the semantic matching degree between the question dialog and the candidate dialog material according to the intra-segment semantic information and the global semantic information corresponding to the question dialog, the previous dialog, the subsequent dialog, and the answer sentence, calculate cross-attention matrices between the question dialog and the previous dialog, the subsequent dialog, and the answer sentence respectively according to the intra-segment semantic information and the global semantic information corresponding to the question dialog, the previous dialog, the subsequent dialog, and the answer sentence respectively; splicing cross attention matrixes of the question dialog segment and the previous dialog segment, the subsequent dialog segment and the answer sentence respectively; and inputting the splicing result into a convolutional neural network model to obtain the semantic matching degree between the output question dialog section and the candidate dialog material.
The data processing apparatus of this embodiment is configured to implement the corresponding data processing method in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again. In addition, the functional implementation of each module in the data processing apparatus of this embodiment can refer to the description of the corresponding part in the foregoing method embodiment, and is not repeated here.
Example four
Referring to fig. 4, a schematic structural diagram of an electronic device according to a fourth embodiment of the present application is shown, and the specific embodiment of the present application does not limit a specific implementation of the electronic device.
As shown in fig. 4, the electronic device may include: a processor (processor)402, a Communications Interface 404, a memory 406, and a Communications bus 408.
Wherein:
the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408.
A communication interface 404 for communicating with other electronic devices or servers.
The processor 402 is configured to execute the program 410, and may specifically perform relevant steps in the above-described data processing method embodiment.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a central processing unit CPU, or an application Specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present application. The intelligent device comprises one or more processors which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
A memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may be specifically configured to enable the processor 402 to perform operations corresponding to the aforementioned data processing method.
For specific implementation of each step in the program 410, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing data processing method embodiments, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
It should be noted that, according to the implementation requirement, each component/step described in the embodiment of the present application may be divided into more components/steps, and two or more components/steps or partial operations of the components/steps may also be combined into a new component/step to achieve the purpose of the embodiment of the present application.
The above-described methods according to embodiments of the present application may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the methods described herein may be stored in such software processes on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA. It will be appreciated that the computer, processor, microprocessor controller or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the data processing methods described herein. Further, when a general-purpose computer accesses code for implementing the data processing method shown herein, execution of the code converts the general-purpose computer into a special-purpose computer for executing the data processing method shown herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The above embodiments are only used for illustrating the embodiments of the present application, and not for limiting the embodiments of the present application, and those skilled in the relevant art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application, so that all equivalent technical solutions also belong to the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.

Claims (11)

1. A data processing method adapted for automatic dialog generation, the method comprising:
acquiring a question dialogue section corresponding to a current question sentence in a dialogue process of carrying out automatic dialogue with an interactive object;
screening a plurality of candidate dialogue materials associated with a question dialogue section from a plurality of preset dialogue materials according to the keyword characteristics of the question dialogue section, wherein the candidate dialogue materials comprise a set answer sentence and an associated sentence of the answer sentence;
determining semantic matching degree between the question dialogue segment and the candidate dialogue material according to semantic information of the question dialogue segment and semantic information between answer sentences and associated sentences in the candidate dialogue material;
and determining a target dialogue material from the candidate dialogue materials according to the semantic matching degree, and taking an answer sentence in the target dialogue material as an answer sentence of the current question sentence.
2. The method of claim 1, wherein the screening out a plurality of candidate dialog materials associated with the question dialog segment from a preset plurality of dialog materials according to the keyword feature of the question dialog segment comprises:
and determining a plurality of candidate dialogue materials semantically associated with the question dialogue section according to the word frequency and the inverse text frequency corresponding to the keywords in the question dialogue section and the word frequency and the inverse text frequency of the keywords in the dialogue materials.
3. The method of claim 1, wherein the associative sentence includes a preceding sentence that precedes the answer sentence in dialog timing and a following sentence that follows the answer sentence in dialog timing, the preceding sentence forming a preceding dialog segment and the following sentence forming a following dialog segment.
4. The method of claim 3, wherein determining semantic matching between the question dialog segment and the candidate dialog material based on the semantic information of the question dialog segment and the semantic information between the answer sentence and the associated sentence in the candidate dialog material comprises:
forming the question dialog segment, the previous dialog segment, the subsequent dialog segment and the answer sentence into a global reference text;
respectively taking the question dialog segment, the answer sentence, the previous dialog segment and the subsequent dialog segment as target processing objects, performing in-segment processing on the target processing objects to obtain corresponding in-segment semantic information, and determining global semantic information corresponding to the target processing objects according to the target processing objects and the global reference text;
and determining semantic matching degree between the question dialog segment and the candidate dialog material according to the in-segment semantic information and the global semantic information corresponding to the question dialog segment, the previous dialog segment, the next dialog segment and the answer sentence respectively.
5. The method of claim 4, wherein performing intra-segment processing on the target processing object to obtain corresponding intra-segment semantic information comprises:
determining a current sentence from the sentences contained in the target processing object according to an order of gradually departing from the answer sentences in time sequence;
processing the feature information of the current statement and the extracted semantic information in the segment by using a first self-attention layer to obtain the retention information in the segment corresponding to the current statement;
and updating the intra-segment retention information of the current statement into the extracted intra-segment semantic information according to the intra-segment retention information of the current statement and the intra-segment adjustment weight of the extracted intra-segment semantic information until the statement contained in the target processing object is processed.
6. The method of claim 5, wherein the updating the intra-segment retention information of the current sentence into the extracted intra-segment semantic information according to the intra-segment retention information of the current sentence and the intra-segment adjustment weight of the extracted intra-segment semantic information comprises:
determining the intra-segment adjustment weight according to the intra-segment retention information of the current statement and the extracted intra-segment semantic information;
and obtaining a product of the intra-segment adjustment weight and the extracted intra-segment semantic information, and updating the intra-segment retention information of the current statement into the extracted intra-segment semantic information by summing the product and the intra-segment retention information of the current statement.
7. The method of claim 4, wherein determining global semantic information corresponding to the target processing object according to the target processing object and the global reference text comprises:
determining a current sentence from the sentences contained in the target processing object according to an order of gradually departing from the answer sentences in time sequence;
processing the feature information of the current sentence and the global reference text by using a second self-attention layer to obtain corresponding extracted semantic information of the current sentence;
processing the extracted semantic information and the extracted global semantic information corresponding to the current statement by using a third self-attention layer to obtain global reserved information corresponding to the current statement;
and updating the global reservation information of the current statement into the extracted global semantic information according to the global reservation information of the current statement and the global adjustment weight of the extracted global semantic information until the statement contained in the target processing object is processed.
8. The method of claim 4, wherein the determining semantic matching degrees between the question dialog segment and the candidate dialog material according to intra-segment semantic information and global semantic information corresponding to the question dialog segment, the previous dialog segment, the next dialog segment, and the answer sentence respectively comprises:
according to the intra-segment semantic information and the global semantic information corresponding to the question dialog segment, the previous dialog segment, the next dialog segment and the answer sentence respectively, calculating a cross attention matrix of the question dialog segment and the previous dialog segment, the next dialog segment and the answer sentence respectively;
splicing cross attention matrixes of the question dialog segment and the previous dialog segment, the subsequent dialog segment and the answer sentence respectively;
and inputting the splicing result into a convolutional neural network model to obtain the semantic matching degree between the output question dialog section and the candidate dialog material.
9. A data processing apparatus adapted for automatic dialog generation, the apparatus comprising:
the acquisition module is used for acquiring a question dialogue segment corresponding to a current question sentence in a dialogue process of carrying out automatic dialogue with an interactive object;
the screening module is used for screening a plurality of candidate dialogue materials related to the question dialogue section from a plurality of preset dialogue materials according to the keyword characteristics of the question dialogue section, wherein the candidate dialogue materials comprise a set answer sentence and a related sentence of the answer sentence;
the matching module is used for determining the semantic matching degree between the question dialogue segment and the candidate dialogue material according to the semantic information of the question dialogue segment and the semantic information between the answer sentence and the associated sentence in the candidate dialogue material;
and the determining module is used for determining a target dialogue material from the candidate dialogue materials according to the semantic matching degree, and taking an answer sentence in the target dialogue material as an answer sentence of the current question sentence.
10. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the data processing method according to any one of claims 1-8.
11. A computer storage medium, on which a computer program is stored which, when being executed by a processor, carries out the data processing method of any one of claims 1 to 8.
CN202110336390.XA 2021-03-29 2021-03-29 Data processing method and device, electronic equipment and computer storage medium Pending CN115129831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110336390.XA CN115129831A (en) 2021-03-29 2021-03-29 Data processing method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110336390.XA CN115129831A (en) 2021-03-29 2021-03-29 Data processing method and device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN115129831A true CN115129831A (en) 2022-09-30

Family

ID=83375524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110336390.XA Pending CN115129831A (en) 2021-03-29 2021-03-29 Data processing method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN115129831A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115878775A (en) * 2022-12-23 2023-03-31 北京百度网讯科技有限公司 Method and device for generating cross-type dialogue data
CN116089593A (en) * 2023-03-24 2023-05-09 齐鲁工业大学(山东省科学院) Multi-pass man-machine dialogue method and device based on time sequence feature screening coding module

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115878775A (en) * 2022-12-23 2023-03-31 北京百度网讯科技有限公司 Method and device for generating cross-type dialogue data
CN115878775B (en) * 2022-12-23 2024-04-12 北京百度网讯科技有限公司 Method and device for generating cross-type dialogue data
CN116089593A (en) * 2023-03-24 2023-05-09 齐鲁工业大学(山东省科学院) Multi-pass man-machine dialogue method and device based on time sequence feature screening coding module
KR102610897B1 (en) * 2023-03-24 2023-12-07 치루 유니버시티 오브 테크놀로지 (산동 아카데미 오브 사이언시스) Method and device for multi-pass human-machine conversation based on time sequence feature screening and encoding module
US12014149B1 (en) 2023-03-24 2024-06-18 Qilu University Of Technology (Shandong Academy Of Sciences) Multi-turn human-machine conversation method and apparatus based on time-sequence feature screening encoding module

Similar Documents

Publication Publication Date Title
US20200251099A1 (en) Generating Target Sequences From Input Sequences Using Partial Conditioning
KR101770358B1 (en) Integration of embedded and network speech recognizers
CN109408526A (en) SQL statement generation method, device, computer equipment and storage medium
CN112528637B (en) Text processing model training method, device, computer equipment and storage medium
CN107039040A (en) Speech recognition system
CN108419094A (en) Method for processing video frequency, video retrieval method, device, medium and server
WO2020155619A1 (en) Method and apparatus for chatting with machine with sentiment, computer device and storage medium
CN110874528B (en) Text similarity obtaining method and device
CN115129831A (en) Data processing method and device, electronic equipment and computer storage medium
CN111694940A (en) User report generation method and terminal equipment
CN106844640A (en) A kind of web data analysis and processing method
CN111382270A (en) Intention recognition method, device and equipment based on text classifier and storage medium
CN110458287B (en) Parameter updating method, device, terminal and storage medium of neural network optimizer
CN110598210A (en) Entity recognition model training method, entity recognition device, entity recognition equipment and medium
CN111357051A (en) Speech emotion recognition method, intelligent device and computer readable storage medium
CN114841142A (en) Text generation method and device, electronic equipment and storage medium
CN111402864A (en) Voice processing method and electronic equipment
CN114579718A (en) Text feature generation method, device, equipment and storage medium combining RPA and AI
CN111680519B (en) Text translation method and device based on dimension reduction barrel model
CN113535912A (en) Text association method based on graph convolution network and attention mechanism and related equipment
US20230317058A1 (en) Spoken language processing method and apparatus, and storage medium
CN109885812B (en) Method and device for dynamically adding hotwords and readable storage medium
CN112307738A (en) Method and device for processing text
CN111739518B (en) Audio identification method and device, storage medium and electronic equipment
CN114898734A (en) Pre-training method and device based on speech synthesis model and electronic equipment

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240312

Address after: 51 Belarusian Pasha Road, Singapore, Lai Zan Da Building 1 # 03-06, Postal Code 189554

Applicant after: Alibaba Innovation Co.

Country or region after: Singapore

Address before: Room 01, 45th Floor, AXA Building, 8 Shanton Road, Singapore

Applicant before: Alibaba Singapore Holdings Ltd.

Country or region before: Singapore