A summary generation method integrating key information

CN113111663BActive Publication Date: 2024-09-06SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110467022.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-28
Publication Date
2024-09-06
Estimated Expiration
2041-04-28

AI Technical Summary

Technical Problem

In the traditional seq2seq model, due to the distribution of attention weights to redundant information during summary generation, it leads to the problem of missing important information and inconsistency in contextual topics, making it difficult to effectively control the topic consistency and information coverage in the summary generation process.

Method used

The TextRank method is introduced to extract text keywords, and global topic information and local element information are extracted through BiLSTM. Combined with the attention mechanism of the seq2seq model, the key information is integrated for summary generation, and the triplet loss and cross-entropy loss are used to jointly train the model.

Benefits of technology

It improves the topic consistency and information coverage of summary results, reduces the interference of irrelevant information, and improves the accuracy of summary generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113111663B
    Figure CN113111663B
Patent Text Reader

Abstract

The present invention discloses a summary generation method integrating key information, which can automatically generate summaries for media texts. The present invention first collects media texts through the Internet, and generates standard summaries based on the media texts according to artificial rules to construct a sample data set; then the data set is preprocessed to generate input data for the training model; then a seq2seq summary generation model based on key information fusion is constructed, and the model training is performed in combination with triple loss and cross entropy loss; finally, an output model is constructed based on the trained model, and the output model is used to automatically generate summaries for the media texts to be summarized. Compared with the prior art, the present invention combines keywords and topic information as key information, and can guide the summary generation process at multiple levels, thereby improving the information coverage and topic consistency of the summary results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a summary generation method integrating key information, belonging to the technical field of Internet. Background Art

[0002] With the rapid development of Internet technology, online media has become an important platform for people to quickly obtain and publish information, which has led to an explosive growth in the number of various media news. Therefore, comprehensive analysis of media texts, extraction and refinement of important information, and aggregation into short and clear summaries to present to readers can effectively help readers quickly and conveniently understand the main content of media reports and improve readers' information acquisition efficiency.

[0003] The sequence-to-sequence (seq2seq) generative summary model is the mainstream model in the current field of text summary generation. The model consists of an encoder and a decoder. The encoder encodes the input text sequence into a hidden state vector, and then the decoder decodes the hidden state vector into a summary for output. However, the traditional seq2seq model focuses on important encoded information through the attention mechanism, but there is often a significant gap in length between the original text and the target summary in the summary generation task, and the attention weight is easily dispersed to a large amount of redundant information, resulting in the generation of important information missing and inconsistent context themes. For this reason, the present invention introduces the topic extraction task to train the text topic representation based on the triple loss on the basis of the seq2seq model, uses the TextRank method to extract the keywords of the text as the text element information, combines the text topic representation and the element information to generate the key information of the text and integrates it into the decoding process, and effectively guides the generation of the summary. Summary of the invention

[0004] In view of the problems and shortcomings in the prior art, the present invention provides a summary generation method that integrates key information, which can extract key information at two levels: global theme and local elements of media text, and improve the problem of lack of effective control in the summary generation process by integrating key information, thereby improving the theme consistency and information coverage of the summary results.

[0005] To achieve the above-mentioned invention purpose, the present invention discloses a summary generation method integrating key information. First, the keywords of the text are extracted using the TextRank method; then a key information extraction module based on BiLSTM (Bidirectional Long Short-Term Memory) is constructed, and the extracted keywords and media text are used as input to obtain the key information representation of the media text; finally, the key information representation is integrated into the attention mechanism of the seq2seq model to generate a summary of the media text. The method mainly includes four steps, as follows:

[0006] Step 1: Collect multiple media texts through the Internet to accumulate a sample data set; a sample in the data set includes a media text and a standard summary of the media text;

[0007] Step 2: Construct triple data for each sample in the dataset. A triple data includes a reference instance, a positive instance, and a negative instance. The reference instance is the standard summary of the media text, the positive instance is the original media text, and the negative instance is another original media text different from the positive instance.

[0008] Step 3: Train the seq2seq summary generation model based on key information fusion. First, the TextRank method is used to extract the keywords of the media text in the sample. Then, the key information extraction module based on BiLSTM extracts the global topic information of the text and the local element information of the keywords and combines them into the key information representation. The seq2seq summary generation module guides the summary generation process through the attention mechanism of the key information fusion. Finally, the triple loss and cross entropy loss are used to jointly train the model.

[0009] Step 4: Generate a summary of the media text to be summarized. For the media text to be summarized, first use the TextRank method to extract keywords, input the original media text and the text keywords into the seq2seq summary generation model trained in step (2) to generate a summary of the media text. This solution can extract key information from multiple dimensions, overcome the problems of inconsistent themes and incomplete information in traditional text summarization methods, and can be applied to the accurate extraction of key information in media texts, thereby improving the effect of media text summarization.

[0010] Compared with the prior art, the advantages of the present invention are as follows: 1) The key information extraction module adopted by the present invention can extract the global topic information and local element information of the text, and perform multi-level semantic context representation on the key information of the text, thereby supplementing the key features missing in the summary generation process and effectively improving the topic consistency and information coverage of the summary results; 2) The present invention adopts an attention mechanism that integrates key information, which can effectively integrate multi-level key information and guide the summary generation process from multiple angles, thereby reducing the interference of irrelevant information and effectively improving the accuracy of the summary results. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 The figure is a processing flow chart of an embodiment of the present invention.

[0012] Figure 2 Training flowchart for the seq2seq summary generation model based on key information fusion. DETAILED DESCRIPTION

[0013] In order to deepen the recognition and understanding of the present invention, the present invention is further illustrated below in conjunction with specific embodiments.

[0014] Example 1: See Figure 1 , Figure 2 , a summary generation method integrating key information, the specific implementation steps are as follows:

[0015] Step 1, accumulating sample data sets. Without loss of generality, this embodiment first collects a large number of media texts from the Internet and generates standard summaries according to manual rules, which together constitute the sample data set D. The manual generation rules of the standard summary are: 40% of the media texts use the title as the standard summary, 40% of the media texts use the first three sentences as the standard summary, and 20% of the media texts use manually written summaries as the standard summary.

[0016] Step 2, data preprocessing, this embodiment first performs TextRank on each media text in the data set D to extract keywords, selects the M keywords with the highest TextRank scores as the final keywords of the media text, and organizes them into keyword sequences according to the order of their positions in the original text. In this embodiment, the value of M is 8. For each sample in the data set D, a triple data (A, P, N) is constructed, where the benchmark instance A is the standard summary word sequence of the sample, the positive example P is the original word sequence of the media text of the sample, and N is the original word sequence of the media text of another sample.

[0017] Step 3: Use the dataset D processed in step 2 to train the seq2seq summary generation model with key information fusion. The implementation of this step can be divided into the following sub-steps:

[0018] Sub-step 3-1, construct the input layer, which receives the keyword sequence and triple data as input, and uses the pre-trained word2vec model to convert each word sequence into a word vector sequence, and obtains the mapped keyword vector sequence E K , benchmark instance word vector sequence E A , positive example word vector sequence E P And the negative example word vector sequence E N .

[0019] Sub-step 3-2, constructing a text encoding layer. This embodiment uses a two-layer BiLSTM recurrent neural network to encode the positive example word vector sequence E P Perform semantic encoding extraction to obtain the word vector sequence E P The hidden state vector of BiLSTM(E P ).

[0020] Sub-step 3-3, construct the key information extraction layer, which is divided into a global topic information extraction sub-layer and a local element information extraction sub-layer. The former uses a two-layer BiLSTM to extract triple word sequences (E A 、E P 、E N ), this embodiment concatenates the output hidden state vectors of the forward LSTM and the backward LSTM at the last moment in the last layer of BiLSTM as the global topic information representation of the word sequence (T A , T P , T N ); the latter uses a single-layer BiLSTM to train the keyword vector sequence E K Disambiguation is performed to obtain the element word vector sequence Elim (E K ).

[0021] Sub-step 3-4, constructing a summary decoding layer. This embodiment uses a two-layer LSTM recurrent neural network and an attention mechanism to decode the summary. First, the two-layer LSTM is used to obtain the hidden state vector H of the current summary word, and it is used as the query vector Query and the element word vector sequence Elim (E K ) to perform attention calculation and obtain the local element information vector representation K, and then use the local element information vector representation K and the global theme information representation T P , the decoding layer hidden state vector H is concatenated with the hidden layer state vector BiLSTM(E) obtained in sub-step 3-1 P ) performs attention calculation to obtain the context vector c, the formula is as follows:

[0022]

[0023] in Represents a dimension concatenation operation.

[0024] Sub-step 3-5, construct the summary probabilistic layer, use a linear mapping function fc and softmax activation function to convert the context vector c and the decoding layer hidden state vector H into the predicted probability distribution P of the summary word. The calculation formula is as follows:

[0025] P = softmax(fc(H,c)) (2)

[0026] fc(H,c)=W H H+W c c+b (3)

[0027] Among them, W H , W c and b are the parameters of the model to be trained.

[0028] Sub-step 3-6, construct a loss function layer, which combines the triple loss represented by the topic information and the cross entropy loss of the summary words as the training loss function of the model. The training loss of this group of samples is obtained according to the following loss function calculation formula:

[0029] L T =max{d(T A ,T P )-d(T A ,T N )+Margin,0} (4)

[0030] d(T A ,T P )=1-cos(T A ,T P ) (5)

[0031] d(T A ,T N )=1-cos(T A ,T N ) (6)

[0032] L total =αL S +βL T (7)

[0033] Where L T is the triple loss, Margin is the boundary distance, and in this embodiment, the value is 1 to ensure that the positive instance and the negative instance have differences in topic semantics; d(T A ,T P ) represents the topic semantic distance between the benchmark instance A and the positive instance P, d(T A ,T N) represents the topic semantic distance between the benchmark instance A and the negative instance N; the cosine function is used to calculate the cosine value of the angle between two topic vectors to measure the semantic similarity between the topic vectors; ɑ and β are hyperparameters, representing the weight coefficients of the two losses, which are 1 and 2 respectively in this embodiment; L S is the cross entropy loss for summary word prediction; L total is the overall training loss of this group of samples.

[0034] Sub-step 3-7, training the model. This embodiment uses random initialization to initialize all parameters to be trained. During the training process, the Adam optimizer is used to perform gradient back propagation to update the model parameters, and the initial learning rate is set to 0.001. When the training loss no longer decreases or the number of training rounds exceeds 50 rounds, the model training ends.

[0035] Step 4: Use the trained model to build an output model to generate a summary. The output model does not need to build triple data in advance. It only needs the media text to be summarized and the extracted keywords as input. Then, the input word at each moment in the summary decoding layer is the summary word generated at the previous moment. The initial summary word is a special start marker " <start>", the summary word at each moment is the word with the highest probability output by the summary probability layer, and when the output ends, the word is marked as " <end>", stop summarization generation and output the generated summary words as the predicted summary of the input media text.

[0036] Based on the same inventive concept, an embodiment of the present invention also provides a summary generation device for integrating key information, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the summary generation method for integrating key information is implemented.

[0037] It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent modifications of the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.< / end> < / start>

Claims

1. A summary generation method integrating key information, characterized in that: The method comprises the following steps: Step 1, accumulate sample data set: collect multiple media texts through the Internet to accumulate sample data set, as follows: first collect a large number of media texts from the Internet, and generate standard summaries according to manual rules, which together constitute the sample data set D. The manual generation rules of standard summaries are: 40% of media texts use titles as standard summaries, 40% of media texts use the first three sentences as standard summaries, and 20% of media texts use manually written summaries as standard summaries; Step 2, data preprocessing: First, perform TextRank on each media text in dataset D to extract keywords, select the M keywords with the highest TextRank scores as the final keywords of the media text, and organize them into keyword sequences in the order of their appearance in the original text; construct triple data (A, P, N) for each sample in dataset D, where the benchmark instance A is the standard summary word sequence of the sample, the positive instance P is the original word sequence of the media text of the sample, and the negative instance N is the original word sequence of the media text of another sample; Step 3, using the dataset D processed in step 2 to train the seq2seq summary generation model with key information fusion, first use the TextRank method to extract the keywords of the media text in the sample, then extract the global topic information of the text and the local element information of the keywords based on the key information extraction module of the BiLSTM recurrent neural network and combine them into the key information representation, the seq2seq summary generation module guides the summary generation process through the attention mechanism of the key information fusion, and finally use the triple loss and cross entropy loss to jointly train the model, which is specifically divided into the following sub-steps: Step 3-1: construct the input layer. The input layer receives the keyword sequence and triple data as input, and uses the pre-trained word2vec model to convert each word sequence into a word vector sequence to obtain the mapped keyword vector sequence E K , benchmark instance word vector sequence E A , positive instance word vector sequence E P And the negative instance word vector sequence E N ; Step 3-2: Construct a text encoding layer and use a two-layer BiLSTM recurrent neural network to align the instance word vector sequence E P Perform semantic encoding extraction to obtain the positive instance word vector sequence E P The hidden state vector of BiLSTM(E P ); Step 3-3, construct the key information extraction layer, which is divided into a global topic information extraction sublayer and a local element information extraction sublayer. The global topic information extraction sublayer uses a two-layer BiLSTM recurrent neural network to extract triple word vector sequences (E A 、E P 、E N ), the output hidden state vectors of the last moment of the forward LSTM and the backward LSTM in the last layer of the BiLSTM recurrent neural network are concatenated as the global topic information representation of the triple word vector sequence (T A , T P , T N ); the local feature information extraction sublayer uses a single-layer BiLSTM recurrent neural network to extract the keyword vector sequence E K Disambiguation is performed to obtain the element word vector sequence Elim (E K ); Step 3-4: Construct the summary decoding layer and use a two-layer LSTM recurrent neural network and attention mechanism to decode the summary. First, use the two-layer LSTM recurrent neural network to obtain the hidden state vector H of the current summary word and use it as the query vector Query and the element word vector sequence Elim (E K ) to perform attention calculation and obtain the local element information vector representation K, and then use the local element information vector representation K and the global theme information representation T P , the decoding layer hidden state vector H is concatenated with the hidden layer state vector BiLSTM(E) obtained in sub-step 3-2 P ) performs attention calculation to obtain the context vector c, the formula is as follows: where represents the dimension concatenation operation; Step 3-5, construct the summary probabilistic layer, use a linear mapping function fc and softmax activation function to convert the context vector c and the decoding layer hidden state vector H into the predicted probability distribution P of the summary word. The calculation formula is as follows: P = softmax(fc(H ,c)) (2) fc(H ,c)=W H H+W c c+b (3) Among them, W H , W c and b are the parameters of the model to be trained; Step 3-6: Construct the loss function layer. This layer combines the triple loss function L represented by the topic information T The cross entropy loss function L with the summary word S The total loss function for training the seq2seq summary generation model is as follows: L T =max{d(T A ,T P )-d(T A ,T N )+Margin ,0} (4) d(T A ,T P )=1-cos(T A ,T P ) (5) d(T A ,T N )=1-cos(T A ,T N ) (6) L total =αL S +βL T (7) Where L T is the triple loss, Margin is the boundary distance, and its value is 1 to ensure that the positive instance and the negative instance have differences in topic semantics; d(T A ,T P ) represents the semantic distance between the topic vector of the benchmark instance A and the positive instance P, d(T A ,T N ) represents the semantic distance between the topic vectors of the benchmark instance A and the negative instance N; the cosine function is used to calculate the cosine value of the angle between two topic vectors to measure the semantic similarity between the topic vectors; ɑ and β are hyperparameters, representing the weight coefficients of the two losses respectively; L S is the cross entropy loss for summary word prediction; L total is the overall training loss of this group of samples; Step 3-7, training the seq2seq summary generation model, initializing all parameters to be trained by random initialization, using Adam optimizer to perform gradient back propagation to update model parameters during training, and setting the initial learning rate to 0.

001. When the training loss no longer decreases or the number of training rounds exceeds 50 rounds, the model training ends; Step 4, use the trained model to build an output model to generate a summary. Specifically, for the media text to be summarized, first use the TextRank method to extract keywords, and input the original media text and text keywords into the seq2seq summary generation model trained in step 3 to generate a media text summary.