Method, device, acquirer and storage medium for obtaining news text summaries based on topic information
By combining pre-trained theme models and deep learning technology, the problem of insufficient attention to topic information in the generative text summary is solved, and more accurate news text summary generation is achieved, suitable for public opinion analysis and electronic media platforms.
Patent Information
- Application Number
- CN202210673842.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-06-15
AI Technical Summary
The existing generative text summary technology fails to actively pay attention to potential topic information during the generation process, resulting in the loss of some important information.
Combining pre-trained theme models and reinforcement learning methods, we can clean news texts, train theme semantic matrix using public corpus, and establish a dedicated generative abstract model with deep learning neural networks, and introduce historical information coverage and pointer generation mechanisms to guide abstract generation.
Effectively retain the subject information of news texts, generate more accurate summary, and is suitable for public opinion analysis systems and electronic media platforms to improve information processing efficiency.
Smart Images

Figure CN115114428B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a method for acquiring text topics and news text summaries. Background Art
[0002] Automatic text summarization is a method for semantically compressing text and extracting key information. It is often used in scenarios such as assisting reading and filtering redundant information. It can also quickly summarize the main content of news texts and improve reading speed. Recently, automatic text summarization technology has also been applied when analyzing news in public opinion monitoring systems.
[0003] Over the past decade, internet-based electronic media has experienced rapid growth, with prominent news platforms such as Toutiao, Tencent News, and Sina Weibo emerging as prominent platforms. While these digital media are relatively new compared to traditional print media, they have quickly captured the user market. This growth is largely due to the widespread availability of the internet, the portability of mobile phones, and the ease of reading. People can easily browse the latest news on their phones, whether waiting for a bus or an elevator. While enjoying the convenience of digital media, drawbacks such as the sheer volume of online articles and the varying quality of their content are becoming increasingly apparent. Automatic text summarization, which can quickly organize article content and help users filter news, may be a promising application.
[0004] On the other hand, major enterprises and government departments are currently committed to developing online public opinion monitoring systems for specific or all sectors to respond to emergencies. Electronic media (news) has a wide audience and convenient access to information, and has a significant impact on a large number of users. Therefore, the analysis and processing of online news is also one of the tasks of various public opinion systems.
[0005] Current automatic text summarization technology is becoming increasingly mature, but news texts are generally long, and articles often progress from simple to complex, resulting in the central theme expressed in the text being different before and after the article. Current generative text summarization technology does not actively pay attention to these potential topic information during generation, resulting in the loss of some important information during the generation process. Summary of the Invention
[0006] To address the problem that existing generative text summarization technology does not actively pay attention to the potential topic information of the article during generation, resulting in the loss of some important information in the generation process, the present invention combines a pre-trained topic model and a reinforcement learning method to actively pay attention to the potential topic information and avoid losing some important information.
[0007] The present invention provides a method for obtaining a news text summary based on topic information, the method comprising:
[0008] News text cleaning step: cleaning the news text to remove useless symbols and information in the news text;
[0009] Steps for obtaining the topic semantic matrix: Use the public corpus to train the topic model and obtain the topic semantic matrix;
[0010] Steps for establishing a dataset training model: Based on the acquired topic semantic matrix and combined with a deep learning neural network, a dedicated generative summarization model for news text is established, and the model is trained using a public dataset to obtain a dataset training model;
[0011] Steps for obtaining the summary: Input the text processed in the news text cleaning step into the dataset training model, use the topic information to guide summary generation, and obtain the text summary.
[0012] Furthermore, a preferred embodiment is provided, wherein the step of obtaining the topic semantic matrix includes:
[0013] Searching a public Chinese corpus and replacing traditional Chinese characters in the public Chinese corpus with simplified Chinese characters to obtain a new Chinese corpus;
[0014] Use the new Chinese corpus to train the LDA topic model to obtain the word distribution corresponding to the topic and the topic training model. The preset number of topics is 150;
[0015] Perform topic word extraction based on the word distribution corresponding to the topic, and extract the top 100 words and their weights for each topic;
[0016] Embed the words corresponding to the topic into the topic training model to obtain the topic vector;
[0017] The topic vectors are concatenated to obtain the topic semantic matrix.
[0018] Furthermore, a preferred embodiment is provided, wherein the dataset training model includes:
[0019] News text encoder, decoder, historical information overwriting mechanism and pointer generation mechanism.
[0020] Furthermore, a preferred embodiment is provided, wherein the news text encoder comprises:
[0021] Word embedding layer and a bidirectional LSTM long short-term memory network;
[0022] The word embedding layer and a bidirectional LSTM long short-term memory network are combined with the attention mechanism to obtain the semantic representation vector c at each moment. t :
[0023] Each word in the public corpus is mapped through the Embedding layer to obtain the vector Embedding i , where i represents the i-th word in the sentence;
[0024] The vector embedding i Input into a bidirectional LSTM layer to get the forward vector corresponding to the i-th word and the backward vector The semantic representation of the word is obtained by concatenating the forward vector and the backward vector to obtain the vector of the word i at the decoding time t.
[0025]
[0026] Obtain the semantic representation vector c at each moment based on the vector of the i-th word at decoding time t t :
[0027]
[0028]
[0029]
[0030] Among them, v, W h , b represent the learnable parameters of the attention layer, s t represents the output of the decoder at time t, represents the result of attention operation, represents the attention score, and N represents the input length received by the encoder.
[0031] Furthermore, a preferred embodiment is provided, wherein the decoder comprises: an Embedding layer, a unidirectional LSTM long short-term memory network, and two fully connected layers;
[0032] The decoder maps the word received at the previous moment into a vector y t-1 , the vector y t-1 and the semantic vector c of the news text at the previous moment t-1 Splicing to get the input x at the current time t t :
[0033] x t =[y t-1 ;c t-1 ]
[0034] The input x at time t t Input it into the decoder's one-way LSTM long short-term memory network to obtain the latent vector s at time t t; Using the hidden vector s t and c t After concatenation and two fully connected layers, we get the word distribution P(w) at the current moment:
[0035] P(w)=Dense1(Dense2([s t ;c t ])),
[0036] Among them, Dense1 is the first fully connected layer, and Dense2 is the second fully connected layer;
[0037] Select the word w with the highest probability according to the word distribution at the current moment t As the decoding result at the current moment.
[0038] Furthermore, a preferred embodiment is provided, wherein the historical information overwriting mechanism is:
[0039]
[0040]
[0041] Among them, W H The trainable parameters added to the attention layer.
[0042] Furthermore, a preferred embodiment is provided, wherein the pointer generation mechanism is:
[0043] p gen =sigmoid(W s ·s t +W h c t +W x ·x t +b),
[0044] P(w)=p gen ·P(w)+(1-p gen )·H t ,
[0045] Among them, W s , W h , W x , b are all trainable parameters of the network layer that generates the pointer, P(w) represents the word distribution at the current moment, and p gen Indicates the pointer obtained by the pointer generation layer, and its value range is [0,1].
[0046] The present invention also provides a device for obtaining a news text summary based on topic information, the device comprising:
[0047] News text cleaning unit: cleaning the news text to remove useless symbols and information in the news text;
[0048] Topic semantic matrix acquisition unit: uses the public corpus to train the topic model and obtain the topic semantic matrix;
[0049] Establishing a dataset training model unit: Based on the acquired topic semantic matrix and combined with a deep learning neural network, a dedicated generative summary model for news text is established, and the model is trained using a public dataset to obtain a dataset training model;
[0050] Obtain summary unit: Input the text processed in the news text cleaning step into the dataset training model, use the topic information to guide summary generation, and obtain the summary result.
[0051] The present invention also provides a news text summary acquirer based on topic information, and the acquirer includes the above-mentioned news text summary acquiring device based on topic information.
[0052] The present invention also provides a computer-readable storage medium, which is used to store a computer program, and the computer program executes the above-mentioned method for obtaining news text summaries based on topic information.
[0053] The present invention is beneficial in that:
[0054] The present invention provides a news text summary acquisition method based on topic information. The method obtains a general topic semantic matrix by pre-processing the acquired news text, combines the topic model, and optimizes the effect of the model generation summary using deep learning technology and reinforcement learning methods, and finally obtains the summary result. Actively pay attention to potential topic information to avoid losing some important information. It can be applied in the public opinion analysis system to help users quickly understand the main content of news reports on public opinion events; or it can be applied to electronic media to generate summaries for news on the platform for use as a basis for retrieval (for example, in search engines). At the same time, in order to ensure that as much information as possible on each topic is retained, the news text topic is modeled to generate a summary.
[0055] The method for obtaining news text summaries based on topic information described in this invention has the same effect as the above-mentioned method and can be applied in public opinion analysis systems to help users quickly understand the main content of news reports on public opinion events; or it can be applied in electronic media to generate summaries for news on the platform to serve as a basis for retrieval (for example, in search engines). At the same time, in order to ensure that as much information as possible on each topic is retained, the news text topics are modeled to generate summaries.
[0056] The present invention is applied to the technical field of news information processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a flow chart of a method for obtaining a news text summary based on topic information according to the first embodiment of the present invention;
[0058] Figure 2 This is a flowchart for obtaining the topic semantic matrix according to the second embodiment of the present invention;
[0059] Figure 3 This is the dataset training model diagram described in the third embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the technical solutions and advantages of the present invention more clearly described, several embodiments of the present invention are now described in further detail with reference to the accompanying drawings. However, the various embodiments described below are only a few preferred embodiments of the present invention and are not intended to limit the invention.
[0061] Implementation Method 1: Participation Figure 1 This embodiment is a method for obtaining a news text summary based on topic information described in the first embodiment, and the method includes:
[0062] News text cleaning step: cleaning the news text to remove useless symbols and information in the news text;
[0063] Steps for obtaining the topic semantic matrix: Use the public corpus to train the topic model and obtain the topic semantic matrix;
[0064] Steps for establishing a dataset training model: Based on the acquired topic semantic matrix and combined with a deep learning neural network, a dedicated generative summarization model for news text is established, and the model is trained using a public dataset to obtain a dataset training model;
[0065] Steps for obtaining the summary: Input the text processed in the news text cleaning step into the dataset training model, use the topic information to guide summary generation, and obtain the text summary.
[0066] Specifically, the reason for cleaning news text is that the crawled news text, because it is obtained through API interfaces or directly crawling web pages in the backend of various websites, is mixed with some web page front-end code, scripts, and URL links. Secondly, the news text of each website has a section such as a "disclaimer" at the beginning or end, as well as information such as the editor and reporter of the news text. This information is currently unhelpful for generating text summaries and actually increases the burden on the computer, so it needs to be cleaned up before analysis.
[0067] The news text obtained after cleaning can be relatively concise, which can greatly facilitate subsequent related processing.
[0068] The steps for cleaning news texts include:
[0069] Step 1.1: Use regular expressions to clean up the obtained news text and remove network links, HTML codes, and script codes;
[0070] Step 1.2 uses regular expressions to clean up the results of step 1.1, removing information such as editor, reporter, and "disclaimer";
[0071] Step 1.3 uses the library function in the Python programming language to process the results of step 1.2 and convert the traditional Chinese characters into simplified Chinese. If the original text does not contain traditional Chinese characters, skip this step.
[0072] Implementation Method 2: Participation Figure 2 This embodiment further defines the method for obtaining a news text summary based on topic information described in the first embodiment. The steps for obtaining the topic semantic matrix include:
[0073] Searching a public Chinese corpus and replacing traditional Chinese characters in the public Chinese corpus with simplified Chinese characters to obtain a new Chinese corpus;
[0074] Use the new Chinese corpus to train the LDA topic model to obtain the word distribution corresponding to the topic and the topic training model. The preset number of topics is 150;
[0075] Perform topic word extraction based on the word distribution corresponding to the topic, and extract the top 100 words and their weights for each topic;
[0076] Embed the words corresponding to the topic into the topic training model to obtain the topic vector;
[0077] The topic vectors are concatenated to obtain the topic semantic matrix.
[0078] In practical applications, it's necessary to incorporate topic information into deep learning models, hoping the models can capture as much key information as possible. This approach involves introducing external topic information. This external topic information, equivalent to third-party prior knowledge, can improve the model's understanding of the text's topics and, consequently, its modeling of news text topics.
[0079] The topic model used is the common LDA model. By training on large-scale unsupervised news texts, a more general topic model is obtained. After subsequent processing, a general topic semantic matrix is obtained.
[0080] Specifically, the steps of obtaining the topic semantic matrix of this embodiment are described as follows:
[0081] Step 2.1: Collect a public Chinese corpus and replace the traditional Chinese characters with the corresponding simplified characters to form a new corpus;
[0082] Step 2.2: Use the Latent Dirichlet Allocation model, or LDA model, to train on the corpus obtained in step 2.1, with a preset number of topics of 150.
[0083] Step 2.3: After modeling the 150 topics in step 2.2, the LDA algorithm calculates the corresponding word distribution for each topic, extracts the top 100 words for each topic and their weights under the topic, and saves them. Specifically:
[0084]
[0085] Among them, i represents the topic, j represents the word, represents the jth word under the i-th topic, represents the weight of the jth word under the i-th topic.
[0086] Step 2.4: Use the pre-trained word embedding model to embed the words of all the topics in step 2.3. The calculation formula is as follows;
[0087]
[0088] in, Represents the word vector corresponding to the jth word under the i-th topic.
[0089] Step 2.5 combines the words of each topic obtained in step 2.3 and the weight of the words under the topic, and performs weighted summation on the word vectors of step 2.4 to obtain the vectors of 150 topics in turn. The calculation formula is as follows:
[0090]
[0091] Among them, vec j The vector representing the j-th topic.
[0092] Step 2.6 concatenates the 150 topic vector representations from step 2.5 into a matrix, namely the topic semantic matrix M topic :
[0093] M topic =concate(Vec0,Vec1,Vec 149 )
[0094] Implementation 3: This implementation further limits the method for obtaining a news text summary based on topic information described in Implementation 1. The dataset training model includes:
[0095] News text encoder, decoder, historical information overwriting mechanism and pointer generation mechanism.
[0096] Implementation 4: This implementation further limits the method for obtaining a news text summary based on topic information described in Implementation 3. The news text encoder includes:
[0097] Word embedding layer and a bidirectional LSTM long short-term memory network;
[0098] The word embedding layer and a bidirectional LSTM long short-term memory network are combined with the attention mechanism to obtain the semantic representation vector c at each moment. t :
[0099] Each word in the public corpus is mapped through the Embedding layer to obtain the vector Embedding i , where i represents the i-th word in the sentence;
[0100] The vector embedding i Input into a bidirectional LSTM layer to get the forward vector corresponding to the i-th word and the backward vector The semantic representation of the word is obtained by concatenating the forward vector and the backward vector to obtain the vector of the word i at the decoding time t.
[0101]
[0102] According to the vector Get the semantic representation vector c at each moment t :
[0103]
[0104]
[0105]
[0106] Among them, v, W h , b represent the learnable parameters of the attention layer, s t represents the output of the decoder at time t, represents the result of attention operation, represents the attention score, and N represents the input length received by the encoder.
[0107] Implementation 5: This implementation further limits the method for obtaining a news text summary based on topic information described in Implementation 3. The decoder includes: an embedding layer, a unidirectional LSTM layer, and two fully connected layers;
[0108] The decoder maps the word received at the previous moment into a vector y t-1 , the vector y t-1 and the semantic vector c of the news text at the previous moment t-1 Splicing to get the input x at the current time t t :
[0109] x t =[y t-1 ;c t-1 ]
[0110] The input x at time t t Input into the LSTM network of the decoder to obtain the latent vector s at time t t ; Using the hidden vector s t and c t After concatenation and two fully connected layers, we get the word distribution P(w) at the current moment:
[0111] P(w)=Dense1(Dense2([s t ;c t ])),
[0112] Among them, Dense1 is the first fully connected layer, and Dense2 is the second fully connected layer
[0113] Select the word w with the highest probability according to the word distribution at the current moment t As the decoding result at the current moment.
[0114] Implementation 6: The present invention further limits the method for obtaining news text summaries based on topic information described in Implementation 3. The historical information overwriting mechanism is:
[0115]
[0116]
[0117] Among them, W H New trainable parameters added to the attention layer.
[0118] Implementation 7: The present invention further limits the method for obtaining a news text summary based on topic information described in Implementation 3. The pointer generation mechanism is:
[0119] p gen =sigmoid(Ws ·s t +W h c t +W x ·x t +b),
[0120] P(w)=p gen ·P(w)+(1-p gen )·H t ,
[0121] Among them, W s , W h , W x , b are all trainable parameters of the pointer generation layer, P(w) represents the word distribution at the current moment, p gen Indicates the pointer obtained by the pointer generation layer, the value range is [0,1],
[0122] Embodiment 8: A device for obtaining a news text summary based on topic information according to this embodiment includes:
[0123] News text cleaning unit: cleaning the news text to remove useless symbols and information in the news text;
[0124] Topic semantic matrix acquisition unit: uses the public corpus to train the topic model and obtain the topic semantic matrix;
[0125] Establishing a dataset training model unit: Based on the acquired topic semantic matrix and combined with a deep learning neural network, a dedicated generative summary model for news text is established, and the model is trained using a public dataset to obtain a dataset training model;
[0126] Obtain summary unit: Input the text processed in the news text cleaning step into the dataset training model, use the topic information to guide summary generation, and obtain the summary result.
[0127] Implementation method 9: A news text summary acquirer based on topic information described in this implementation method includes a news text summary acquirer based on topic information described in implementation method 8.
[0128] Implementation method 10: A computer-readable storage medium described in this implementation method is used to store a computer program, and the computer program executes the method for obtaining a news text summary based on topic information described in implementation methods 1 to 7.
[0129] Embodiment 11, further illustrating the present invention in combination with embodiment 2, further includes information about the subject semantic matrix introduced by the encoder and information about the subject semantic matrix introduced by the pointer generation mechanism:
[0130] (1) Introduction of topic semantic matrix information
[0131] The parameters of the topic semantic matrix obtained in the second embodiment are loaded into the public dataset training model (using a trainable parameter variable P topic At the moment t when the model is decoded, the attention mechanism is used to calculate the similarity between the current semantics and all topics in the topic semantic matrix, and the topic semantic vector topic to be decoded at the current moment is calculated based on the similarity:
[0132] a t =softmax(c t ,P topic ),
[0133]
[0134] Among them, c t is the semantic representation of the current moment, a t Calculate demerits for topic attention, topic t is the topic vector representation at the current time t, is the transpose of the topic semantic matrix.
[0135] (2) The decoder introduces information about the topic semantic matrix
[0136] (3) The decoder needs to consider the current topic semantic information when decoding, so the decoder input will have an additional topic semantic representation, which is calculated as follows:
[0137] x t =[y t-1 ;c t-1 ; topic t ].
[0138] (4) The pointer generation mechanism introduces information from the topic semantic matrix
[0139] The reason for the change is the same as that of the decoder, and the pointer generation formula is changed to:
[0140] p gen =sigmoid(W s ·s t +W h c t +W x ·x t +W t topic t +b).
[0141] The above describes the present application in detail through specific implementation methods, but the above is only a preferred implementation method of the present application and is not intended to limit the present application. Any modifications, combinations of implementation methods, equivalent replacements and improvements made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A method for obtaining a news text summary based on topic information, characterized in that: The method comprises: News text cleaning step: cleaning the news text to remove useless symbols and information in the news text; Steps for obtaining the topic semantic matrix: Use the public corpus to train the topic model and obtain the topic semantic matrix; Steps for establishing a dataset training model: Based on the acquired topic semantic matrix and combined with a deep learning neural network, a dedicated generative summarization model for news text is established, and the model is trained using a public dataset to obtain a dataset training model; Steps for obtaining a summary: Input the text processed in the news text cleaning step into the dataset training model, use the topic information to guide summary generation, and obtain a text summary; The data set training model includes: News text encoder, decoder, historical information overwriting mechanism and pointer generation mechanism; The news text encoder comprises: Word embedding layer and a bidirectional LSTM long short-term memory network; The word embedding layer and a bidirectional LSTM long short-term memory network are combined with the attention mechanism to obtain the semantic representation vector at each moment. : Each word in the public corpus is mapped through the Embedding layer to obtain the vector Embedding i , where i represents the i-th word in the sentence; The vector embedding i Input into a bidirectional LSTM layer to get the forward vector corresponding to the i-th word and the backward vector The semantic representation of the word is obtained by concatenating the forward vector and the backward vector to obtain the vector of the word i at the decoding time t. : , According to the vector Get the semantic representation vector at each moment : , , , in, , , denote the learnable parameters of the attention layer, represents the output of the decoder at time t, represents the result of attention operation, represents the attention score, and N represents the input length received by the encoder; The decoder includes: an Embedding layer, a unidirectional LSTM layer and two fully connected layers; The decoder maps the word received at the previous moment into a vector , the vector and the semantic vector of the news text at the previous moment Splicing to get the input at the current time t : The input at time t Input it into the decoder's one-way LSTM long short-term memory network to obtain the latent vector at time t ; Using the hidden vector and Splicing, through two layers of fully connected layers to obtain the word distribution at the current moment : , in, is the first fully connected layer, is the second fully connected layer; Select the word with the highest probability based on the current word distribution As the decoding result at the current moment; The pointer generation mechanism is: , , in, , , , are the trainable parameters of the network layer that generates the pointer, represents the word distribution at the current moment, Indicates the pointer obtained by the pointer generation layer, the value range is [0,1]; Load the parameters of the obtained topic semantic matrix into the public dataset training model, using a trainable parameter variable Receive, at the moment t when the model is decoded, use the attention mechanism to calculate the similarity between the current semantics and all topics in the topic semantic matrix, and calculate the topic semantic vector to be decoded at the current moment based on the similarity : , , in, is the semantic representation of the current moment, Calculate demerits for subject attention, is the topic vector representation at the current time t, is the transpose of the topic semantic matrix; The decoder introduces the information of the topic semantic matrix. The decoder needs to consider the current topic semantic information when decoding. Therefore, the decoder input will have an additional topic semantic representation. The calculation formula is: ; The pointer generation mechanism introduces the information of the topic semantic matrix. The reason for the change is consistent with the decoder. The pointer generation formula changes to: 。 2. The method for obtaining a news text summary based on topic information according to claim 1, characterized in that: The step of obtaining the topic semantic matrix includes: Searching a public Chinese corpus and replacing traditional Chinese characters in the public Chinese corpus with simplified Chinese characters to obtain a new Chinese corpus; Use the new Chinese corpus to train the LDA topic model to obtain the word distribution corresponding to the topic and the topic training model. The preset number of topics is 150; Perform topic word extraction based on the word distribution corresponding to the topic, and extract the top 100 words and their weights for each topic; Embed the words corresponding to the topic into the topic training model to obtain the topic vector; The topic vectors are concatenated to obtain the topic semantic matrix.
3. The method for obtaining a news text summary based on topic information according to claim 1, characterized in that: The historical information coverage mechanism is: , , in, The trainable parameters added to the attention layer.
4. A device for obtaining news text summaries based on topic information, characterized in that: The device comprises: News text cleaning unit: cleaning the news text to remove useless symbols and information in the news text; Topic semantic matrix acquisition unit: uses the public corpus to train the topic model and obtain the topic semantic matrix; Establishing a dataset training model unit: Based on the acquired topic semantic matrix and combined with a deep learning neural network, a dedicated generative summary model for news text is established, and the model is trained using a public dataset to obtain a dataset training model; Obtain summary unit: Input the text processed in the news text cleaning step into the dataset training model, use the topic information to guide summary generation, and obtain the summary result; The data set training model includes: News text encoder, decoder, historical information overwriting mechanism and pointer generation mechanism; The news text encoder comprises: Word embedding layer and a bidirectional LSTM long short-term memory network; The word embedding layer and a bidirectional LSTM long short-term memory network are combined with the attention mechanism to obtain the semantic representation vector at each moment. : Each word in the public corpus is mapped through the Embedding layer to obtain the vector Embedding i , where i represents the i-th word in the sentence; The vector embedding i Input into a bidirectional LSTM layer to get the forward vector corresponding to the i-th word and the backward vector The semantic representation of the word is obtained by concatenating the forward vector and the backward vector to obtain the vector of the word i at the decoding time t. : , According to the vector Get the semantic representation vector at each moment : , , , in, , , denote the learnable parameters of the attention layer, represents the output of the decoder at time t, represents the result of attention operation, represents the attention score, and N represents the input length received by the encoder; The decoder includes: an Embedding layer, a unidirectional LSTM layer and two fully connected layers; The decoder maps the word received at the previous moment into a vector , the vector and the semantic vector of the news text at the previous moment Splicing to get the input at the current time t : The input at time t Input it into the decoder's one-way LSTM long short-term memory network to obtain the latent vector at time t ; Using the hidden vector and Splicing, through two layers of fully connected layers to obtain the word distribution at the current moment : , in, is the first fully connected layer, is the second fully connected layer; Select the word with the highest probability based on the current word distribution As the decoding result at the current moment; The pointer generation mechanism is: , , in, , , , are the trainable parameters of the network layer that generates the pointer, represents the word distribution at the current moment, Indicates the pointer obtained by the pointer generation layer, the value range is [0,1]; Load the parameters of the obtained topic semantic matrix into the public dataset training model, using a trainable parameter variable Receive, at the moment t when the model is decoded, use the attention mechanism to calculate the similarity between the current semantics and all topics in the topic semantic matrix, and calculate the topic semantic vector to be decoded at the current moment based on the similarity : , , in, is the semantic representation of the current moment, Calculate demerits for subject attention, is the topic vector representation at the current time t, is the transpose of the topic semantic matrix; The decoder introduces the information of the topic semantic matrix. The decoder needs to consider the current topic semantic information when decoding. Therefore, the decoder input will have an additional topic semantic representation. The calculation formula is: ; The pointer generation mechanism introduces the information of the topic semantic matrix. The reason for the change is consistent with the decoder. The pointer generation formula changes to: 。 5. A news text summary acquirer based on topic information, characterized in that: The acquirer includes the news text summary acquisition device based on topic information as described in claim 4.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and the computer program executes the method for obtaining a news text summary based on topic information described in claims 1-3.
Citation Information
Patent Citations
Judicial public opinion text abstracting method fusing theme information
CN110909152A