Dialogue abstract method and system based on theme enhancement and dialogue center

Through a deep learning network model based on topic enhancement and dialogue center, the potential topic features in dialogue data are extracted and the discourse center is weighted, and the problems of scattered information and unclear topics in dialogue summary are solved, achieving more accurate and smooth summary generation. Significantly improved performance.

CN119293347AActive Publication Date: 2025-01-10FUZHOU UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411213861.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-31
Publication Date
2025-01-10
Estimated Expiration
2044-08-31

AI Technical Summary

Technical Problem

Existing dialogue summary techniques are difficult to effectively process unique features of dialogue data, such as different language styles, fragmented information and unclear theme boundaries, resulting in a lack of fluency and diversity in generated abstracts, and traditional methods require a large amount of annotation data and supervised training.

Method used

Adopt a deep learning network model based on theme enhancement and dialogue center, extract potential theme features by embedding the theme model, combine multi-headed attention and gating mechanism for feature fusion, and use unsupervised clustering method to weight the discourse center to generate more accurate dialogue summary .

Benefits of technology

Significantly improves the accuracy and fluency of conversation summary, enables effective identification of key information in conversations, and performs better than existing state-of-the-art baseline models on public benchmark datasets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293347A_ABST
    Figure CN119293347A_ABST
Patent Text Reader

Abstract

The invention relates to a dialogue abstract method and system based on theme enhancement and a dialogue center. The method comprises the steps that user dialogues and user dialogue abstracts are extracted and labeled, and a training set is constructed; training a deep learning network model M based on topic enhancement and a dialogue center by using a training set and an embedded topic model, acquiring utterance-level representation and utterance-level topic feature representation of a dialogue by the model M, taking the utterance-level representation and the utterance-level topic feature representation as input, adopting a feature perception element network as features to remove noise, and utilizing semantic relevance between multi-head attention capture features to obtain a deep learning model M; filtering and fusing by using a gating mechanism to obtain a theme-enhanced dialogue context feature representation, and weighting the theme-enhanced dialogue context feature representation to obtain a final representation; using the final representation as an input to generate a dialogue abstract to train a model so as to learn a semantic relationship between the user dialogue and the user dialogue abstract; and inputting a user dialogue into the trained model M, and outputting an abstract of the user dialogue. The method and the system are favorable for improving the accuracy of the dialogue abstract.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a conversation summarization method and system based on topic enhancement and conversation center. Background Art

[0002] Conversation is one of the most common ways of communication in social networks. It has become an important task to organize the content of conversations into relevant summaries or abstracts. The purpose of conversation summarization is to summarize the important information that a third party considers in the discourse of two or more interlocutors. This task not only helps to provide a quick context for new participants in the conversation, but also helps people grasp the central idea or search for key content in the conversation, thereby improving efficiency and productivity. In recent years, social networks have become increasingly closely related to people. People use social networks to communicate, make friends, work, study and entertain. With the increasing number of users, the communication data generated by social networks is also increasing day by day. People can use conversation summarization technology to extract the main information in the conversation and form a summary so as to grasp the relevant information quickly and efficiently. However, unlike news or articles in traditional document summarization, conversation data has its own unique characteristics, including different language styles, scattered information, flexible discourse structure, unclear topic boundaries, etc., which brings many challenges to conversation summarization.

[0003] The earliest work on dialogue summarization solved this problem by converting the dialogue into a word graph and selecting appropriate paths in the graph as summary sentences based on complex rules. Template-based methods have also been used, which collect templates from summaries written by humans and generate abstract summaries by selecting appropriate words from the dialogue to fill in the blanks. However, the summaries they generate lack fluency and diversity, and are therefore far from practical use. With the emergence of neural encoder-decoder models, it is possible to project the input into a dense semantic representation and generate a summary with new words by gradually sampling from the vocabulary until a special token indicating the end is output. Based on these models, generative text summarization has made significant progress, from non-pre-trained PGN, Fast-Abs, and HRED, to pre-trained models BART and Pegasus, which have promoted the development of abstract text summarization.

[0004] Injecting preprocessed features, through manual annotation or external tagging tools as part of the input, explicitly utilizes additional features in the conversation context. Injecting preprocessed features includes obtaining intra-utterance features and inter-utterance features.

[0005] In-discourse features can be divided into word-level, phrase-level, and discourse-level, where word-level intra-discourse features include TF-IDF weights, part-of-speech (POS) tags, and named entity tags. Phrase-level intra-discourse features include key phrases / keywords, which emphasize prominent n-grams in the original dialogue, which helps to overcome the challenge of information dispersion and thus produce more informative summaries. Discourse-level intra-discourse features enhance summaries through features such as speakers or roles, user intent, and dialogue behaviors. Lin et al. proposed two interactive methods to obtain key information of other roles to enhance role-oriented dialogue summaries. Kim et al. used the COMET and PARACOMET common sense knowledge models to extract common sense knowledge from dialogues and injected common sense knowledge into state-of-the-art language models (e.g., BART) for abstract dialogue summaries.

[0006] Inter-discourse features can be divided into partitioning and graph methods. Partitioning refers to extracting or splitting the entire conversation into relatively independent segments. The information in each segment is more concentrated and interferes less with summary generation. At the same time, these features reduce the requirements for GPU memory with shorter input lengths, which is especially suitable for long conversation summaries. Krishna et al.'s Cluster2Sent extracts important discourse, clusters related discourse together, generates a summary sentence for each cluster, and obtains a semi-structured summary suitable for clinical conversations. Except for Shang et al.'s use of K-means for discourse clustering in an unsupervised manner, the supervised training of the extractor or classifier of most methods requires labeled oracle partitions. Typically, the partitions are concatenated as input to the abstract summary model, or the summaries generated by each segment are concatenated or sorted to form the final summary. Summary of the invention

[0007] The object of the present invention is to provide a method and system for conversation summarization based on topic enhancement and conversation center, which method and system are conducive to improving the accuracy of conversation summaries.

[0008] In order to achieve the above object, the technical solution adopted by the present invention is: a conversation summarization method based on topic enhancement and conversation center, comprising the following steps:

[0009] Step A: Extract user conversations and user conversation summaries, and annotate user conversation and user conversation summary labels. Each complete user conversation corresponds to a user conversation summary, and construct a training set DS.

[0010] Step B: Use the training set DS and the embedded topic model ETM to train a deep learning network model M based on topic enhancement and conversation center. The encoder of the deep learning network model M includes an input submodule, a topic feature extraction submodule, a center selection submodule and a feature dynamic fusion submodule. The deep learning network model M obtains the discourse-level representation of the conversation text through the input submodule, and mines the potential topic feature information in the conversation text through the topic feature extraction submodule to obtain the discourse-level topic feature representation; the feature dynamic fusion submodule takes the discourse-level representation and the discourse-level topic feature representation as input, uses the feature perception meta-network to remove noise for the feature to enhance the feature representation capability, uses multi-head attention to capture the semantic relevance between features, and finally uses the gating mechanism to filter and fuse to obtain the topic-enhanced conversation context feature representation; the center selection submodule uses an unsupervised clustering method to calculate the center weight of the discourse to weight the topic-enhanced conversation context feature representation to obtain the final representation; the decoder of the deep learning network model M uses the final representation as input to generate a summary of the conversation text to train the model, thereby learning the semantic relationship between user conversations and user conversation summaries;

[0011] Step C: Input the user conversation into the trained deep learning network model M and output the summary of the user conversation.

[0012] Furthermore, the step B specifically includes the following steps:

[0013] Step B1: Initially process and encode all training samples in the training set DS to obtain the sentence [mask] sequence M, token sequence N and discourse-level representation H of the dialogue. u ;

[0014] Step B2: Combine the token sequence N and the utterance-level representation H obtained in step B1 u The word-level topic feature representation H is extracted through an externally trained embedding topic model (ETM) wt , the aligned discourse-level topic feature representation H is obtained by stacking and dimension expansion ut ;

[0015] Step B3: Combine the sentence [mask] sequence M obtained in step B1 and the utterance-level representation H u The clustering tool is used to obtain the discourse center C of the conversation, and the degree centrality score S of each discourse in the conversation is calculated. s , according to the degree centrality score of the discourse, select and divide the central discourse U and the non-central redundant discourse The central weight W of each utterance is calculated by calculating the degree centrality score c ;

[0016] Step B4: The utterance-level representation H obtained in steps B1 and B2 is u , discourse-level topic feature representation H ut The meta-network is used to dynamically learn and adjust the fusion weights of the discourse-level representation and the discourse-level topic feature representation to obtain the weighted discourse-level representation. and discourse-level topic feature representation Fusion of weighted utterance-level representations using multi-head attention and weighted discourse-level topic feature representation Get the feature representation H of topic enhancement t , and then the feature representation H of the topic enhancement is transformed into t and the utterance-level representation H u Perform filtering and fusion to obtain the topic-enhanced conversation context feature representation H dt ;

[0017] Step B5: Substitute the central weight W of each utterance obtained in steps B3 and B4 c and topic-enhanced conversation context feature representation H dt The topic-enhanced discourse center representation H is obtained through weighted fusion topic , and then concatenate them to get the final representation H final ;

[0018] Step B6: The final representation H obtained in step B5 final Input to the decoder, decoded through self-attention mechanism, layer normalization, topic attention, and feedforward neural network to obtain the decoded output representation;

[0019] Step B7: The decoded output obtained in B6 is represented by a softmax function to obtain the probability distribution P∈[0,1] of generating the next word; then, according to the target loss function, the gradient of each parameter in the deep learning network model is calculated by the back propagation method, and the parameters are updated by the stochastic gradient descent method;

[0020] Step B8: When the loss value change generated by each iteration of the deep learning network model is less than the set threshold, or the maximum number of iterations is reached, the training process of the deep learning network model is terminated.

[0021] Furthermore, the step B1 specifically includes the following steps:

[0022] Step B11: traverse the training set DS, and perform sentence segmentation processing on the dialogue text therein to obtain a sentence [mask] sequence M. Each training sample in the training set DS is represented by ds = (D, S); wherein D is the text content of the dialogue, and S is the summary text content corresponding to the dialogue;

[0023] Dialogue D is represented as:

[0024] D=[u1,u2,…,u n ]

[0025] Among them, u t is the tth utterance in the conversation, t = 1, 2, ..., n, and n is the number of utterances in the conversation;

[0026] Discourse t It is expressed as:

[0027]

[0028] in, is the i-th word in the t-th sentence, i = 1, 2, ..., m, m is the utterance u t Length of text;

[0029] Step B12: The dialogue D obtained in step B11 is converted into [u1,u2,…,u n ], insert the [CLS] tag in front and the [SEP] tag between each sentence, and construct the initial sequence X of the dialogue d ;

[0030] The initial sequence of the conversation is expressed as:

[0031] X d =[CLS]+u1+[SEP]+u2+[SEP]+…+u n

[0032] Where n represents the number of utterances contained in the conversation;

[0033] Step B13: Place X d The tokenizer of the BART model performs padding and length truncation to obtain the token sequence N of the conversation as the input of the BART model encoder. According to the [CLS] and [SEP] tags, the token sequence N is added to X. d The position in the sequence is used to split the feature representation of each sentence to obtain the feature representation of each sentence.

[0034] The conversation token sequence N is calculated as follows:

[0035] N=BART tokenizer (X d )

[0036] Among them, BART tokenizer () represents the tokenizer of the BART model;

[0037] Discourse-level representation Hu The calculation is as follows:

[0038]

[0039]

[0040]

[0041] Among them, BART enc () represents the BART model encoder, is the i-th word in the u-th sentence The corresponding word vector, l is the text length of the nth sentence, and d is the dimension of the feature vector.

[0042] Furthermore, the step B2 specifically includes the following steps:

[0043] Step B21: Use the token sequence N obtained in step B13 to extract the word-level topic feature representation H through the externally trained embedding topic model (ETM) wt , determine whether the vocabulary corresponding to each token in the token sequence N exists in the vocabulary obtained by ETM training. If so, obtain its word-level topic feature representation H through ETM wt ;

[0044] Word-level topic feature representation H wt The calculation is as follows:

[0045]

[0046] in, Represents the topic feature representation of the i-th word in the token sequence N;

[0047] Step B22: Use the word-level topic feature representation H obtained in step B21 wt and the utterance-level representation H obtained in step B13 u , the aligned discourse-level topic feature representation H is obtained by stacking and dimension expansion ut ;

[0048] Discourse-level topic feature representation H ut The calculation formula is as follows:

[0049]

[0050] Among them, func(·) represents the dimension expansion function, represents the i-th sentence containing n words, and d is the dimension of the feature vector.

[0051] Furthermore, the step B3 specifically includes the following steps:

[0052] Step B31: For the sentence [mask] sequence M obtained in step B11 and the utterance-level representation H obtained in step B13 u The clustering tool is used to obtain the center of the conversation C and the center distance matrix D of the conversation. c ;

[0053] Discourse center C and center distance matrix D c The calculation is as follows:

[0054]

[0055]

[0056] Among them, C k Indicates the discourse center contained in the dialogue, represents the i-th sentence, l is the length of the utterance, and d is the dimension of the feature vector; in the center distance matrix D c The element d in the i-th row and j-th column of ij represents the distance from discourse i to center j, i∈[1,n], k∈[1,k];

[0057] Step B32: Based on the obtained discourse center C and discourse level representation H u , calculate the degree centrality score S of each utterance in the conversation s , according to the discourse degree centrality score, the central discourse U and non-central redundant discourse are selected

[0058] The degree centrality score S of the utterance s The calculation formula is as follows:

[0059]

[0060] The central discourse is divided as follows:

[0061]

[0062] Among them, mean(·) is the mean function;

[0063] Step B33: Calculate the central weight W of each utterance based on the utterance centrality score and the central utterance c ;

[0064] The central weight of the utterance W c The calculation is as follows:

[0065]

[0066] Among them, α and β are adjustable weight parameters.

[0067] Furthermore, the step B4 specifically includes the following steps:

[0068] Step B41: For the utterance-level representation H obtained in steps B13 and B22 u , discourse-level topic feature representation H ut By building a meta-network to learn and adjust the fusion weights of discourse-level representation and discourse-level topic feature representation, we can obtain a weighted discourse-level representation. and discourse-level topic feature representation

[0069] Weighted Utterance-Level Representation and discourse-level topic feature representation The calculation is as follows:

[0070]

[0071]

[0072]

[0073]

[0074]

[0075]

[0076]

[0077]

[0078] Where MLP is a multi-layer perceptron, mean(·) is the mean function, and n is the number of utterances in the conversation;

[0079] Step B42: Use multi-head attention mechanism to fuse weighted utterance-level representations and weighted topic feature representation It can better capture the complex relationship between discourse and topic features to obtain topic-enhanced feature representation H t ;

[0080] Topic-enhanced feature representation H t The calculation is as follows:

[0081]

[0082]

[0083]

[0084] Among them, MHA represents the multi-head attention mechanism, concat(·) represents the vector concatenation operation, num is the number of parallel heads, Q(query), K(key), V(value) are the query item, keyword item and value item in the attention mechanism respectively, and Q is the weighted discourse level representation K and V are weighted topic feature representations l is the text length of the utterance, and d is the dimension of the feature vector; is a trainable attention parameter, head i represents the output of the i-th attention function, i∈[1,num];

[0085] Step B43: The feature representation H of the topic enhancement is transformed into t and the utterance-level representation H u Perform filtering and fusion to obtain the topic-enhanced conversation context feature representation H dt ;

[0086] Topic-enhanced conversation context feature representation H dt The calculation is as follows:

[0087]

[0088]

[0089] Among them, “:” is the splicing operation, l is the length of the utterance, d is the dimension of the feature vector; W1, W2 are trainable gating network parameters.

[0090] Furthermore, the step B5 specifically includes the following steps:

[0091] Step B51: Substitute the discourse center weight W obtained in steps B33 and B43 c and topic-enhanced conversation context feature representation H dt The topic-enhanced discourse center representation H is obtained through weighted fusion topic ;

[0092] Topic-enhanced discourse center representation H topic The calculation is as follows:

[0093]

[0094] in, l is the length of the utterance, d is the dimension of the feature vector;

[0095] Step B52: The obtained topic-enhanced discourse center representation H topicWith the utterance-level representation H u Re-weighted sum, concatenate each sentence to get the final representation H final ;

[0096] Finally, H final The calculation is as follows:

[0097]

[0098]

[0099] in, p is the length of the text of the conversation, d is the dimension of the feature vector, n is the number of utterances, To define hyperparameters, concat(·) represents a vector concatenation operation.

[0100] Furthermore, the specific implementation method of step B6 is:

[0101] The final representation H obtained in step B52 is final Input to the decoder, decoded through self-attention mechanism, layer normalization, topic attention, and feedforward neural network to obtain the decoded output representation H”’;

[0102] H'=SelfAttention(LayNorm(H final ))

[0103] H"=TopicAttention(LayNorm(H'+H final ))

[0104] H″′=FFN(LayNorm(H′+H”))

[0105] Among them, LayNorm(·) represents layer normalization, SelfAttention(·) represents self-attention mechanism, TopicAttention(·) represents topic attention, and FFN(·) represents feedforward neural network.

[0106] Furthermore, the step B7 specifically includes the following steps:

[0107] Step B71: using the softmax function to normalize the decoded output representation H'' obtained in step B61 to obtain the score distribution P of the next word generated;

[0108] The calculation formula of score distribution P is as follows:

[0109] P = softmax(W3H″′+b)

[0110] Among them, P∈[0,1], W3 is the trainable parameter matrix, and b is the bias vector;

[0111] Step B72: The model uses cross entropy as the loss function to calculate the loss value, updates the learning rate through the gradient optimization algorithm Adam, and uses back propagation to iteratively update the model parameters to minimize the loss function to train the model;

[0112] The formula for minimizing the loss function L is as follows:

[0113]

[0114] Among them, P(y t |y <t ,D;θ) represents the corresponding word y taken from P t The probability value of | represents the conditional part of the conditional probability, that is, given y <t , dialogue text D and model parameters θ, generate the target word y t The probability of y <t =(y1,y2,…,y t-1 ) represents the first t-1 words of the output sequence, S y Represents a target summary.

[0115] The present invention also provides a conversation summary system based on topic enhancement and conversation center, including a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, the above-mentioned method steps can be implemented.

[0116] Compared with the prior art, the present invention has the following beneficial effects: In order to effectively identify key information in a conversation and incorporate additional feature information, the present invention proposes a novel topic-enhanced context encoder, which consists of a topic feature extraction submodule, a dynamic feature fusion submodule and a center selection submodule. In the topic feature extraction submodule, the present invention introduces an embedded topic model ETM to discover interpretable latent topic features from the conversation. In the dynamic feature fusion submodule, a feature-aware meta-network is designed to reduce noise and enhance feature representation, and then multi-head attention is used to capture the semantic correlation between features, and a gating mechanism is used for filtering and fusion, thereby enhancing the effective fusion between topic features and conversation representation. The center selection submodule uses an unsupervised method to weight discourse, which can guide the model to identify key discourse, thereby improving the effectiveness of understanding the conversation context. Experimental results on two public benchmark datasets show that the method of the present invention achieves significant performance improvement over the existing state-of-the-art baseline models. BRIEF DESCRIPTION OF THE DRAWINGS

[0117] Figure 1 is a flow chart of a method implementation of an embodiment of the present invention;

[0118] Figure 2 It is an architecture diagram of a deep learning network model M based on topic enhancement and conversation center in an embodiment of the present invention. DETAILED DESCRIPTION

[0119] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0120] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.

[0121] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0122] like Figure 1 As shown, this embodiment provides a conversation summarization method based on topic enhancement and conversation center, including the following steps:

[0123] Step A: Extract user conversations and user conversation summaries, and annotate user conversation and user conversation summary labels. Each complete user conversation corresponds to a user conversation summary, and construct a training set DS.

[0124] Step B: Use the training set DS and the embedded topic model ETM to train a deep learning network model M based on topic enhancement and conversation center. The encoder of the deep learning network model M includes an input submodule, a topic feature extraction submodule, a center selection submodule and a feature dynamic fusion submodule. The deep learning network model M obtains the discourse-level representation of the conversation text through the input submodule, and mines the potential topic feature information in the conversation text through the topic feature extraction submodule to obtain the discourse-level topic feature representation; the feature dynamic fusion submodule realizes the effective fusion of topic features. The module takes the discourse-level representation and the discourse-level topic feature representation as input, uses the feature perception meta-network to remove noise for features to enhance the feature representation capability, uses multi-head attention to capture the semantic relevance between features, and finally uses the gating mechanism to filter and fuse to obtain the topic-enhanced conversation context feature representation; the center selection submodule uses an unsupervised clustering method to calculate the center weight of the discourse to weight the topic-enhanced conversation context feature representation to obtain the final representation; the decoder of the deep learning network model M uses the final representation as input to generate a summary of the conversation text to train the model, thereby learning the semantic relationship between user conversations and user conversation summaries;

[0125] Step C: Input the user conversation into the trained deep learning network model M and output the summary of the user conversation.

[0126] The model structure of the deep learning network model M based on topic enhancement and conversation center in this embodiment is as follows: Figure 2 In this embodiment, the specific implementation steps of step B are as follows.

[0127] Step B1: Initially process and encode all training samples in the training set DS to obtain the sentence [mask] sequence M, token sequence N and discourse-level representation H of the dialogue. u .

[0128] In this embodiment, step B1 specifically includes the following steps:

[0129] Step B11: Traverse the training set DS, and perform sentence segmentation processing on the dialogue text therein to obtain a sentence [mask] sequence M. Each training sample in the training set DS is represented as ds = (D, S); wherein D is the text content of the dialogue, and S is the summary text content corresponding to the dialogue.

[0130] Dialogue D is represented as:

[0131] D=[u1,u2,…,u n ]

[0132] Among them, u tis the tth sentence in the conversation, t = 1, 2, ..., n, and n is the number of utterances in the conversation.

[0133] Discourse t It is expressed as:

[0134]

[0135] in, is the i-th word in the t-th sentence, i = 1, 2, ..., m, m is the utterance u t The length of the text.

[0136] Step B12: The dialogue D obtained in step B11 is converted into [u1,u2,…,u n ], insert the [CLS] tag in front and the [SEP] tag between each sentence, and construct the initial sequence X of the dialogue d .

[0137] The initial sequence of the conversation is expressed as:

[0138] X d =[CLS]+u1+[SEP]+u2+[SEP]+…+u n

[0139] Here, n represents the number of utterances contained in the conversation.

[0140] Step B13: Place X d The tokenizer of the BART model performs padding and length truncation to obtain the token sequence N of the conversation as the input of the BART model encoder. According to the [CLS] and [SEP] tags, the token sequence N is added to X. d The position in the sequence is used to split the feature representation of each sentence to obtain the feature representation of each sentence.

[0141] The conversation token sequence N is calculated as follows:

[0142] N=BART tokenizer (X d )

[0143] Among them, BART tokenizer () represents the tokenizer of the BART model.

[0144] Discourse-level representation H u The calculation is as follows:

[0145]

[0146]

[0147]

[0148] Among them, BART enc () represents the BART model encoder, is the i-th word in the u-th sentence The corresponding word vector, l is the text length of the nth sentence, and d is the dimension of the feature vector.

[0149] Step B2: Combine the token sequence N and the utterance-level representation H obtained in step B1 u The word-level topic feature representation H is extracted through an externally trained embedding topic model (ETM) wt , the aligned discourse-level topic feature representation H is obtained by stacking and dimension expansion ut .

[0150] In this embodiment, step B2 specifically includes the following steps:

[0151] Step B21: Use the token sequence N obtained in step B13 to extract the word-level topic feature representation H through the externally trained embedding topic model (ETM) wt , determine whether the vocabulary corresponding to each token in the token sequence N exists in the vocabulary obtained by ETM training. If so, obtain its word-level topic feature representation H through ETM wt .

[0152] Word-level topic feature representation H wt The calculation is as follows:

[0153]

[0154] in, Represents the topic feature representation of the i-th word in the token sequence N.

[0155] Step B22: Use the word-level topic feature representation H obtained in step B21 wt and the utterance-level representation H obtained in step B13 u , the aligned discourse-level topic feature representation H is obtained by stacking and dimension expansion ut .

[0156] Discourse-level topic feature representation H ut The calculation formula is as follows:

[0157]

[0158] Among them, func(·) represents the dimension expansion function, represents the i-th sentence containing n words, and d is the dimension of the feature vector.

[0159] Step B3: Combine the sentence [mask] sequence M obtained in step B1 and the utterance-level representation H u The clustering tool is used to obtain the discourse center C of the conversation, and the degree centrality score S of each discourse in the conversation is calculated. s , according to the degree centrality score of the discourse, select and divide the central discourse U and the non-central redundant discourse The central weight W of each utterance is calculated by calculating the degree centrality score c .

[0160] In this embodiment, step B3 specifically includes the following steps:

[0161] Step B31: For the sentence [mask] sequence M obtained in step B11 and the utterance-level representation H obtained in step B13 u The clustering tool is used to obtain the center of the conversation C and the center distance matrix D of the conversation. c .

[0162] Discourse center C and center distance matrix D c The calculation is as follows:

[0163]

[0164]

[0165] Among them, C k Indicates the discourse center contained in the dialogue, represents the i-th sentence, l is the length of the utterance, and d is the dimension of the feature vector; in the center distance matrix D c The element d in the i-th row and j-th column of ij Represents the distance from discourse i to center j, i∈[1,n], j∈[1,k].

[0166] Step B32: Based on the obtained discourse center C and discourse level representation H u , calculate the degree centrality score S of each utterance in the conversation s , according to the discourse degree centrality score, the central discourse U and non-central redundant discourse are selected

[0167] The degree centrality score S of the utterance s The calculation formula is as follows:

[0168]

[0169] The central discourse is divided as follows:

[0170]

[0171] Among them, mean(·) is the mean function.

[0172] Step B33: Calculate the central weight W of each utterance based on the utterance centrality score and the central utterance c .

[0173] The central weight of the utterance W c The calculation is as follows:

[0174]

[0175] Among them, α and β are adjustable weight parameters used to balance the influence of degree centrality score and whether it is a central discourse.

[0176] Step B4: The utterance-level representation H obtained in steps B1 and B2 is u , discourse-level topic feature representation H ut The meta-network is used to dynamically learn and adjust the fusion weights of the discourse-level representation and the discourse-level topic feature representation to obtain the weighted discourse-level representation. and discourse-level topic feature representation Fusion of weighted utterance-level representations using multi-head attention and weighted discourse-level topic feature representation Get the feature representation H of topic enhancement t , and then the feature representation H of the topic enhancement is transformed into t and the utterance-level representation H u Perform filtering and fusion to obtain the topic-enhanced conversation context feature representation H dt .

[0177] In this embodiment, step B4 specifically includes the following steps:

[0178] Step B41: For the utterance-level representation H obtained in steps B13 and B22 u , discourse-level topic feature representation H ut By building a meta-network to learn and adjust the fusion weights of discourse-level representation and discourse-level topic feature representation, we can obtain a weighted discourse-level representation. and discourse-level topic feature representation

[0179] Weighted Utterance-Level Representation and discourse-level topic feature representation The calculation is as follows:

[0180]

[0181]

[0182]

[0183]

[0184]

[0185]

[0186]

[0187]

[0188] Among them, MLP is a multi-layer perceptron, mean(·) is the mean function, and n is the number of utterances in the conversation.

[0189] Step B42: Use multi-head attention mechanism to fuse weighted utterance-level representations and weighted topic feature representation It can better capture the complex relationship between discourse and topic features to obtain topic-enhanced feature representation H t .

[0190] Topic-enhanced feature representation H t The calculation is as follows:

[0191]

[0192]

[0193]

[0194] Among them, MHA represents the multi-head attention mechanism, concat(·) represents the vector concatenation operation, num is the number of parallel heads, Q(query), K(key), V(value) are the query item, keyword item and value item in the attention mechanism respectively, and Q is the weighted discourse level representation K and V are weighted topic feature representations l is the text length of the utterance, and d is the dimension of the feature vector; is a trainable attention parameter, head i represents the output of the i-th attention function, i∈[1,num].

[0195] Step B43: The feature representation H of the topic enhancement is transformed into t and the utterance-level representation H u Perform filtering and fusion to obtain the topic-enhanced conversation context feature representation H dt .

[0196] The topic-enhanced conversation context feature representation is calculated as follows:

[0197]

[0198]

[0199] Among them, “:” is the splicing operation, l is the length of the utterance, d is the dimension of the feature vector; W1, W2 are trainable gating network parameters.

[0200] Step B5: Substitute the central weight W of each utterance obtained in steps B3 and B4 c and topic-enhanced conversation context feature representation H dt The topic-enhanced discourse center representation H is obtained through weighted fusion topic , and then concatenate them to get the final representation H final .

[0201] In this embodiment, step B5 specifically includes the following steps:

[0202] Step B51: Substitute the discourse center weight W obtained in steps B33 and B43 c and topic-enhanced conversation context feature representation H dt The topic-enhanced discourse center representation H is obtained through weighted fusion topic .

[0203] Topic-enhanced discourse center representation H topic The calculation is as follows:

[0204]

[0205] in, l is the length of the utterance and d is the dimension of the feature vector.

[0206] Step B52: The obtained topic-enhanced discourse center representation H topic With the utterance-level representation H u Re-weighted sum, concatenate each sentence to get the final representation H final .

[0207] Finally, H final The calculation is as follows:

[0208]

[0209]

[0210] in, p is the length of the text of the conversation, d is the dimension of the feature vector, n is the number of utterances, To define hyperparameters, cocat(·) represents the vector concatenation operation.

[0211] Step B6: The final representation H obtained in step B5 final The input is sent to the decoder, decoded through self-attention mechanism, layer normalization, topic attention, and feedforward neural network to obtain the decoded output representation.

[0212] In this embodiment, the specific implementation method of step B6 is:

[0213] The final representation H obtained in step B52 is final Input to the decoder, decoded through self-attention mechanism, layer normalization, topic attention, and feedforward neural network to obtain the decoded output representation H”’;

[0214] H'=SelfAttention(LayNorm(H final ))

[0215] H"=TopicAttention(LayNorm(H'+H final ))

[0216] H″′=FFN(LayNorm(H′+H″))

[0217] Among them, LayNorm(·) represents layer normalization, SelfAttention(·) represents self-attention mechanism, TopicAttention(·) represents topic attention, and FFN(·) represents feedforward neural network.

[0218] Step B7: The decoded output obtained in B6 is represented by a softmax function to obtain the probability distribution P∈[0,1] of generating the next word; then, according to the target loss function, the gradient of each parameter in the deep learning network model is calculated by the back propagation method, and the parameters are updated using the stochastic gradient descent method.

[0219] In this embodiment, step B7 specifically includes the following steps:

[0220] Step B71: Use the softmax function to normalize the decoded output representation H'' obtained in step B61 to obtain the score distribution P of the next word generated.

[0221] The calculation formula of score distribution P is as follows:

[0222] P = softmax(W3H″′+b)

[0223] Among them, P∈[0,1], W3 is the trainable parameter matrix, and b is the bias vector.

[0224] Step B72: The model uses cross entropy as the loss function to calculate the loss value, updates the learning rate through the gradient optimization algorithm Adam, and uses back propagation to iteratively update the model parameters to minimize the loss function to train the model.

[0225] The formula for minimizing the loss function L is as follows:

[0226]

[0227] Among them, P(y t |y <t ,D;θ) represents the corresponding word y taken from P t The probability value of | represents the conditional part of the conditional probability, that is, given t <y , dialogue text D and model parameters θ, generate the target word y t The probability of y <t =(y1,y2,…,y t-1 ) represents the first t-1 words of the output sequence, S y Represents a target summary.

[0228] Step B8: When the loss value change generated by each iteration of the deep learning network model is less than the set threshold, or the maximum number of iterations is reached, the training process of the deep learning network model is terminated.

[0229] This embodiment also provides a conversation summary system based on topic enhancement and conversation center, including a memory, a processor, and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the above-mentioned method steps can be implemented.

[0230] The model of this method is compared with other dialogue summarization baseline models, and the evaluation experimental results are shown in Table 1. On the SAMSum benchmark dataset, the ROUGE-1, ROUGE-2, and ROUGE-L indicators of the model of this method are improved by 0.36%, 0.89%, and 0.33% respectively compared with the SDDS model. On the DialogSum benchmark dataset, the ROUGE-1, ROUGE-2, and ROUGE-L indicators of the model of this method are improved by 0.62%, 1.22%, and 1.05% respectively compared with the SDDS model. On these two benchmark datasets, the performance of the model of this method is significantly better than other baseline models including the most advanced model SDDS.

[0231] Table 1: Evaluation results on SAMsum and DialogSum datasets

[0232]

[0233]

[0234] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0235] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0236] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0237] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0238] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

Claims

1. A conversation summarization method based on topic enhancement and conversation center, characterized in that: The following steps are involved: Step A: Extract user conversations and user conversation summaries, and annotate user conversation and user conversation summary labels. Each complete user conversation corresponds to a user conversation summary, and construct a training set DS. Step B: Use the training set DS and the embedded topic model ETM to train a deep learning network model M based on topic enhancement and dialogue center. The encoder of the deep learning network model M includes an input submodule, a topic feature extraction submodule, a center selection submodule, and a feature dynamic fusion submodule. The deep learning network model M obtains a discourse-level representation of the dialogue text through the input submodule, and mines potential topic feature information in the dialogue text through the topic feature extraction submodule to obtain a discourse-level topic feature representation; The feature dynamic fusion submodule takes the utterance-level representation and the utterance-level topic feature representation as input, uses the feature-aware meta-network to remove noise from the features to enhance the feature representation capability, uses multi-head attention to capture the semantic relevance between features, and finally uses the gating mechanism to perform filtering and fusion to obtain the topic-enhanced conversation context feature representation; The center selection submodule uses an unsupervised clustering method to calculate the center weight of the speech to weight the topic-enhanced conversation context feature representation to obtain a final representation; the decoder of the deep learning network model M uses the final representation as input to generate a summary of the conversation text to train the model, thereby learning the semantic relationship between the user conversation and the user conversation summary; Step C: Input the user conversation into the trained deep learning network model M and output the summary of the user conversation.

2. The method for conversation summarization based on topic enhancement and conversation center according to claim 1, characterized in that: The step B specifically comprises the following steps: Step B1: Initially process and encode all training samples in the training set DS to obtain the sentence [mask] sequence M, token sequence N and discourse-level representation H of the dialogue. u ; Step B2: Combine the token sequence N and the utterance-level representation H obtained in step B1 u The word-level topic feature representation H is extracted through an externally trained embedding topic model (ETM) wt , the aligned discourse-level topic feature representation H is obtained by stacking and dimension expansion ut ; Step B3: Combine the sentence [mask] sequence M obtained in step B1 and the utterance-level representation H u The clustering tool is used to obtain the discourse center C of the conversation, and the degree centrality score S of each discourse in the conversation is calculated. s , according to the degree centrality score of the discourse, select and divide the central discourse U and the non-central redundant discourse The central weight W of each utterance is calculated by calculating the degree centrality score c ; Step B4: The utterance-level representation H obtained in steps B1 and B2 is u , discourse-level topic feature representation H ut The meta-network is used to dynamically learn and adjust the fusion weights of the discourse-level representation and the discourse-level topic feature representation to obtain the weighted discourse-level representation. and discourse-level topic feature representation Fusion of weighted utterance-level representations using multi-head attention and weighted discourse-level topic feature representation Get the feature representation H of topic enhancement t , and then the feature representation H of the topic enhancement is transformed into t and the utterance-level representation H u Perform filtering and fusion to obtain the topic-enhanced conversation context feature representation H dt ; Step B5: Substitute the central weight W of each utterance obtained in steps B3 and B4 c and topic-enhanced conversation context feature representation H dt The topic-enhanced discourse center representation H is obtained through weighted fusion topic , and then concatenate them to get the final representation H final ; Step B6: The final representation H obtained in step B5 final Input to the decoder, decoded through self-attention mechanism, layer normalization, topic attention, and feedforward neural network to obtain the decoded output representation; Step B7: The decoded output obtained in B6 is represented by a softmax function to obtain the probability distribution P∈[0,1] of generating the next word; then, according to the target loss function, the gradient of each parameter in the deep learning network model is calculated by the back propagation method, and the parameters are updated by the stochastic gradient descent method; Step B8: When the loss value change generated by each iteration of the deep learning network model is less than the set threshold, or the maximum number of iterations is reached, the training process of the deep learning network model is terminated.

3. The method for conversation summarization based on topic enhancement and conversation center according to claim 2, characterized in that: The step B1 specifically comprises the following steps: Step B11: traverse the training set DS, and perform sentence segmentation processing on the dialogue text therein to obtain a sentence [mask] sequence M. Each training sample in the training set DS is represented by ds = (D, S); wherein D is the text content of the dialogue, and S is the summary text content corresponding to the dialogue; Dialogue D is represented as: D=[u1,u2,…,u n ] Among them, u t is the tth utterance in the conversation, t = 1, 2, ..., n, and n is the number of utterances in the conversation; Discourse t It is expressed as: in, is the i-th word in the t-th sentence, i = 1, 2, ..., m, m is the utterance u t Length of text; Step B12: The dialogue D obtained in step B11 is converted into [u1,u2,…,u n ], insert the [CLS] tag in front and the [SEP] tag between each sentence, and construct the initial sequence X of the dialogue d ; The initial sequence of the conversation is expressed as: X d =[CLS]+u1+[SEP]+u2+[SEP]+…+u n Where n represents the number of utterances contained in the conversation; Step B13: Place X d The tokenizer of the BART model performs padding and length truncation to obtain the token sequence N of the conversation as the input of the BART model encoder. According to the [CLS] and [SEP] tags, the token sequence N is added to X. d The position in the sequence is used to segment the feature representation of each sentence, thereby obtaining the feature representation of each sentence. The conversation token sequence N is calculated as follows: N=BART tokenizer (X d ) Among them, BART tokenizer () represents the tokenizer of the BART model; Discourse-level representation H u The calculation is as follows: Among them, BART enc () represents the BART model encoder, is the i-th word in the u-th sentence The corresponding word vector, l is the text length of the nth sentence, and d is the dimension of the feature vector.

4. The method for conversation summarization based on topic enhancement and conversation center according to claim 3, characterized in that: The step B2 specifically comprises the following steps: Step B21: Use the token sequence N obtained in step B13 to extract the word-level topic feature representation H through the externally trained embedding topic model (ETM) wt , determine whether the vocabulary corresponding to each token in the token sequence N exists in the vocabulary obtained by ETM training. If so, obtain its word-level topic feature representation H through ETM wt ; Word-level topic feature representation H wt The calculation is as follows: in, Represents the topic feature representation of the i-th word in the token sequence N; Step B22: Use the word-level topic feature representation H obtained in step B21 wt and the utterance-level representation H obtained in step B13 u , the aligned discourse-level topic feature representation H is obtained by stacking and dimension expansion ut ; Discourse-level topic feature representation H ut The calculation formula is as follows: Among them, func(·) represents the dimension expansion function, represents the i-th sentence containing n words, and d is the dimension of the feature vector.

5. The method for conversation summarization based on topic enhancement and conversation center according to claim 4, characterized in that: The step B3 specifically comprises the following steps: Step B31: For the sentence [mask] sequence M obtained in step B11 and the utterance-level representation H obtained in step B13 u The clustering tool is used to obtain the center of the conversation C and the center distance matrix D of the conversation. c ; Discourse center C and center distance matrix D c The calculation is as follows: Among them, C k Indicates the discourse center contained in the dialogue, represents the i-th sentence, l is the length of the utterance, d is the dimension of the feature vector; in the center distance matrix D c The element d in the i-th row and j-th column of ij Represents the distance from discourse i to center j, i∈[1,n], h∈[1,k]; Step B32: Based on the obtained discourse center C and discourse level representation H u , calculate the degree centrality score S of each utterance in the conversation s , according to the discourse degree centrality score, the central discourse U and non-central redundant discourse are selected The degree centrality score S of the utterance s The calculation formula is as follows: The central discourse is divided as follows: Among them, mean(·) is the mean function; Step B33: Calculate the central weight W of each utterance based on the utterance centrality score and the central utterance c ; The central weight of the utterance W c The calculation is as follows: Among them, α and β are adjustable weight parameters.

6. The method for conversation summarization based on topic enhancement and conversation center according to claim 5, characterized in that: The step B4 specifically comprises the following steps: Step B41: For the utterance-level representation H obtained in steps B13 and B22 u , discourse-level topic feature representation H ut By building a meta-network to learn and adjust the fusion weights of discourse-level representation and discourse-level topic feature representation, we can obtain a weighted discourse-level representation. and discourse-level topic feature representation Weighted Utterance-Level Representation and discourse-level topic feature representation The calculation is as follows: Where MLP is a multi-layer perceptron, mean(·) is the mean function, and n is the number of utterances in the conversation; Step B42: Use multi-head attention mechanism to fuse weighted utterance-level representations and weighted topic feature representation It can better capture the complex relationship between discourse and topic features to obtain topic-enhanced feature representation H t ; Topic-enhanced feature representation H t The calculation is as follows: Among them, MHA represents the multi-head attention mechanism, concat(·) represents the vector concatenation operation, num is the number of parallel heads, Q(query), K(key), V(value) are the query item, keyword item and value item in the attention mechanism respectively, and Q is the weighted discourse level representation K and V are weighted topic feature representations l is the text length of the utterance, and d is the dimension of the feature vector; is a trainable attention parameter, head i represents the output of the i-th attention function, i∈[1,num]; Step B43: The feature representation H of the topic enhancement is transformed into t and the utterance-level representation H u Perform filtering and fusion to obtain the topic-enhanced conversation context feature representation H dt ; Topic-enhanced conversation context feature representation H dt The calculation is as follows: Among them, ":" is the splicing operation, l is the length of the utterance, d is the dimension of the feature vector; W1, W2 are trainable gating network parameters.

7. The method for conversation summarization based on topic enhancement and conversation center according to claim 6, characterized in that: The step B5 specifically comprises the following steps: Step B51: Substitute the discourse center weight W obtained in steps B33 and B43 c and topic-enhanced conversation context feature representation H dt The topic-enhanced discourse center representation H is obtained through weighted fusion topic ; Topic-enhanced discourse center representation H topic The calculation is as follows: in, l is the length of the utterance, d is the dimension of the feature vector; Step B52: The obtained topic-enhanced discourse center representation H topic With the utterance-level representation H u Re-weighted sum, concatenate each sentence to get the final representation H final ; Finally, H final The calculation is as follows: in, p is the length of the text of the conversation, d is the dimension of the feature vector, n is the number of utterances, To define hyperparameters, concat(·) represents a vector concatenation operation.

8. The method for conversation summarization based on topic enhancement and conversation center according to claim 7, characterized in that: The specific implementation method of step B6 is: The final representation H obtained in step B52 is final Input to the decoder, decoded through self-attention mechanism, layer normalization, topic attention, and feedforward neural network to obtain the decoded output representation H”’; H'=SelfAttention(LayNorm(H final )) H”=TopicAttention(LayNorm(H'+H final )) H″′=FFN(LayNorm(H′+H″)) Among them, LayNorm(·) represents layer normalization, SelfAttention(·) represents self-attention mechanism, TopicAttention(·) represents topic attention, and FFN(·) represents feedforward neural network.

9. The method for conversation summarization based on topic enhancement and conversation center according to claim 8, characterized in that: The step B7 specifically includes the following steps: Step B71: using the softmax function to normalize the decoded output representation H'' obtained in step B61 to obtain the score distribution P of the next word generated; The calculation formula of score distribution P is as follows: P = softmax(W3H″′+b) Among them, P∈[0,1], W3 is the trainable parameter matrix, and b is the bias vector; Step B72: The model uses cross entropy as the loss function to calculate the loss value, updates the learning rate through the gradient optimization algorithm Adam, and uses back propagation to iteratively update the model parameters to minimize the loss function to train the model; The formula for minimizing the loss function L is as follows: Among them, P(y t |y <t ,D;θ) represents the corresponding word y taken from P t The probability value of | represents the conditional part of the conditional probability, that is, given t <y , dialogue text D and model parameters θ, generate the target word y t The probability of y <t =(y1,y2,…,y t-1 ) represents the first t-1 words of the output sequence, S y Represents a target summary.

10. A conversation summarization system based on topic enhancement and conversation center, characterized in that: The method comprises a memory, a processor and computer program instructions stored in the memory and capable of being executed by the processor. When the processor executes the computer program instructions, the method steps as described in any one of claims 1 to 9 can be implemented.

Citation Information

Patent Citations

  • Dialogue abstract generation method and system

    CN116483991A

  • Dialogue abstract generation method based on adaptive dialogue segmentation

    CN116541505A

  • Dialogue abstract generation method and device and model training method and equipment

    CN116933801A

  • Method and apparatus for training dialogue summary generation network, computer device, and medium

    WO2024139294A1