Text abstract extraction method, device, equipment and storage medium

By introducing a pre-trained language model and syntactic analysis, syntactic extraction is performed when the summary results generated by the generative model do not meet the quality assessment conditions. This solves the problems of lengthy summaries and semantic incoherence in existing technologies, and achieves higher accuracy and readability.

CN116992012BActive Publication Date: 2026-07-03CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE INFORMATION TECHNOLOGY CO LTD
Filing Date
2022-09-06
Publication Date
2026-07-03

Smart Images

  • Figure CN116992012B_ABST
    Figure CN116992012B_ABST
Patent Text Reader

Abstract

This invention provides a text summarization extraction method, apparatus, device, and storage medium, comprising: acquiring text information to be processed; inputting the text information to be processed into a summarization generation model to obtain a summarization generation result output by the summarization generation model; if the summarization generation result does not meet preset quality assessment conditions, performing syntactic analysis and extraction on the text information to be processed to obtain a summarization extraction result, and using the summarization extraction result as the final summarization result. This invention generates a summarization result corresponding to the text information to be processed through a summarization generation model. If the summarization generation result does not meet preset quality assessment conditions, syntactic analysis and extraction are performed on the text information to be processed, improving the correlation between sentences in the summary, thereby solving the technical problem of low accuracy and readability of text summarization, and improving the accuracy and readability of summary extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a text summarization extraction method, apparatus, device, and storage medium. Background Technology

[0002] Existing short text summarization methods are mainly divided into two categories: extractive summarization methods and generative summarization methods. Extractive summarization methods typically directly concatenate important sentences from the original text, resulting in overly long summaries that do not consider sentence structure and often lack semantic logical connections between sentences. Generative summarization methods, being deep learning-based supervised methods, often ignore part-of-speech and syntactic dependency information, leading to semantic incoherence and disjointed sentences, resulting in low accuracy and readability. Summary of the Invention

[0003] This invention provides a text summarization method, apparatus, device, and storage medium, aiming to improve the accuracy and readability of text summarization.

[0004] This invention provides a text summarization extraction method, comprising:

[0005] Obtain the text information to be processed;

[0006] The text information to be processed is input into the summary generation model, and the summary generation result output by the summary generation model is obtained;

[0007] If the summary generation result does not meet the preset quality assessment conditions, then the text information to be processed is subjected to syntactic analysis and extraction to obtain the summary extraction result, and the summary extraction result is used as the final summary result.

[0008] Optionally, according to a text summarization extraction method provided by the present invention, the summarization generation model includes an embedding layer, a sequence generation network, and an output classification layer, wherein the embedding layer includes a pre-trained language embedding layer, a part-of-speech embedding layer, and a dependency relation embedding layer;

[0009] The step of inputting the text information to be processed into the summarization generation model and obtaining the summarization generation result output by the summarization generation model includes:

[0010] The text information to be processed is input into the pre-trained language embedding layer, the part-of-speech embedding layer, and the dependency embedding layer, respectively, to obtain the semantic vector output by the pre-trained language embedding layer, the part-of-speech vector of each word output by the part-of-speech embedding layer, and the syntactic dependency vector between words output by the dependency embedding layer.

[0011] The input feature sequence is input into the sequence generation network to encode and decode the input feature sequence using the sequence generation network to obtain the output feature sequence, wherein the input feature sequence is constructed from the semantic vector, part-of-speech vector and syntactic dependency vector of the text information to be processed;

[0012] The output feature sequence is input into the classification output layer to obtain the summary generation result output by the classification output layer.

[0013] Optionally, according to a text summarization method provided by the present invention, the step of performing syntactic analysis on the text information to be processed to obtain a summary extraction result includes:

[0014] The text information to be processed is segmented to obtain several short text sentences;

[0015] For any given text phrase, extract the syntactic feature information of the text phrase, and generate syntactic relation triples based on the syntactic feature information;

[0016] Several original summary units are extracted from each of the syntactic relation triples;

[0017] Several valid summary units containing pre-defined subject terms are selected from each of the original summary units.

[0018] Each of the effective summary units is expanded to obtain each target summary unit;

[0019] The target summary units are sequentially concatenated to obtain the summary extraction result.

[0020] Optionally, according to a text summarization method provided by the present invention, the step of expanding each of the effective summarization units to obtain each target summarization unit includes:

[0021] If the ending word in any valid summary unit is the preset topic word, then the valid summary unit is expanded to the next original summary unit corresponding to the valid summary unit;

[0022] If the first word in any valid summary unit is the preset topic word, then the valid summary unit is expanded to the previous original summary unit corresponding to the valid summary unit to form each target summary unit.

[0023] After inputting the text information to be processed into the summarization generation model and obtaining the summarization result output by the summarization generation model, the method further includes:

[0024] If the summary generation result meets the preset quality assessment conditions, then the summary generation result will be used as the final summary result.

[0025] Optionally, according to the text summarization extraction method provided by the present invention, the summarization generation model is trained based on the following steps:

[0026] Several original text samples are obtained, and the quality score corresponding to each original text sample is calculated based on the summary tags of each original text sample.

[0027] Each original text sample with a quality score greater than a preset score threshold is selected as a training text sample.

[0028] Based on the text samples to be trained, the training model is iteratively trained to obtain the summary generation model.

[0029] Optionally, according to a text summarization extraction method provided by the present invention, the step of iteratively training the training model based on each of the training text samples to obtain the summarization generation model includes:

[0030] For any text sample to be trained, the text sample to be trained is input into the pre-trained language embedding layer, the part-of-speech embedding layer and the dependency embedding layer respectively, to obtain the training semantic vector output by the pre-trained language embedding layer, the training part-of-speech vector of each word output by the part-of-speech embedding layer and the training syntactic dependency vector between words output by the dependency embedding layer.

[0031] The training semantic vector, the training part-of-speech vector, and the training syntactic dependency vector are input into the sequence generation network to obtain the training feature sequence output by the sequence generation network.

[0032] The training feature sequence is input into the output classification layer to obtain the predicted summary result output by the output classification layer;

[0033] Calculate the model loss value between the predicted summary result and the summary label;

[0034] Based on the model loss value of each iteration, the parameters of the model to be trained are updated to obtain the summary generation model.

[0035] The present invention also provides a text summarization extraction device, comprising:

[0036] The acquisition module is used to acquire the text information to be processed.

[0037] The summary generation module is used to input the text information to be processed into the summary generation model and obtain the summary generation result output by the summary generation model;

[0038] The abstract extraction module is used to perform syntactic analysis and extraction on the text information to be processed if the abstract generation result does not meet the preset quality assessment conditions, so as to obtain the abstract extraction result and use the abstract extraction result as the final abstract result.

[0039] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the text summarization extraction method described above.

[0040] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the text summarization extraction method as described above.

[0041] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the text summarization extraction method as described above.

[0042] The text summarization method, apparatus, device, and storage medium provided by this invention generate a summary result corresponding to the text information to be processed through a summary generation model. If the summary generation result does not meet the preset quality assessment conditions, it proves that the result generated by the summary generation model has low accuracy. Then, syntactic analysis is performed on the text information to be processed to extract the summary, thereby improving the correlation between sentences in the summary, as well as improving the accuracy and readability of the summary extraction. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0044] Figure 1 This is one of the flowcharts illustrating the text summarization extraction method provided by the present invention;

[0045] Figure 2 This is the second flowchart of the text summarization extraction method provided by the present invention;

[0046] Figure 3 This is the third flowchart of the text summarization extraction method provided by the present invention;

[0047] Figure 4 This is the fourth flowchart of the text summarization extraction method provided by the present invention;

[0048] Figure 5 This is a schematic diagram of the model structure of the abstract generation model in an embodiment of the present invention;

[0049] Figure 6 This is a schematic diagram of the text summarization extraction device provided by the present invention;

[0050] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0052] The terminology used in one or more embodiments of the present invention is for the purpose of describing particular embodiments only and is not intended to limit the scope of the invention. The singular forms “a,” “the,” and “the” used in one or more embodiments of the invention are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of the invention refers to and includes any or all possible combinations of one or more associated listed items.

[0053] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of the present invention, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of the present invention, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0054] The following is combined Figures 1-5 The exemplary embodiments of the present invention will be described in detail below.

[0055] like Figure 1 The diagram shown is a flowchart of a text summarization extraction method according to an embodiment of the present invention. Figure 1 As shown, the text summarization extraction method includes:

[0056] Step S10: Obtain the text information to be processed;

[0057] It should be noted that the text information to be processed is a piece of text information related to the target field, such as the mobile communications field, the financial field, or the aviation field.

[0058] Step S20: Input the text information to be processed into the summary generation model and obtain the summary generation result output by the summary generation model;

[0059] Specifically, the text information to be processed is input into a summarization generation model, and a summarization result is obtained based on the output of the model. The summarization generation model is obtained through iterative training based on pre-collected original text samples and their corresponding summary labels. It is understood that after training, the summarization generation model can effectively identify the summary information of the text information to obtain the summary result corresponding to the text information to be processed.

[0060] In this embodiment of the invention, the summary generation model includes an embedding layer, a sequence generation network, and an output classification layer. The embedding layer includes a pre-trained language embedding layer, a part-of-speech embedding layer, and a dependency relation embedding layer. The pre-trained language embedding layer includes classic pre-trained language models such as GPT, BART, and T5; preferably, the T5 pre-trained language model is selected. The sequence generation network includes a one-way Mask language model, a two-way Mask language model, a Seq2Seq language model (Sequence to Sequence), and a Seq2Seq with attention language model, preferably a Seq2Seq with attention language model. Specifically, the text information to be processed is input into the embedding layer to vectorize it, obtaining a semantic vector. Furthermore, to effectively improve the incoherence of the summary and enhance its accuracy, the part-of-speech tag of each word in the text information and the syntactic dependency data between words are also vectorized, resulting in part-of-speech vectors for each word and syntactic dependency vectors between words. These semantic vectors, part-of-speech vectors, and syntactic dependency vectors are then input into a Seq2Seq with attention language model, which incorporates an attention mechanism, to obtain a feature sequence output by the model. This feature sequence is further input into a classification output layer to generate the summary result output by that layer.

[0061] In one embodiment, after inputting the text information to be processed into the summarization generation model and obtaining the summarization generation result output by the summarization generation model, the method further includes:

[0062] Step S40: If the summary generation result meets the preset quality assessment conditions, then the summary generation result is taken as the final summary result.

[0063] It should be noted that the preset quality assessment conditions are conditions used to evaluate and determine the scoring index values ​​of the abstract generation results.

[0064] Specifically, the correlation between the text information to be processed and the summary generation result is calculated through a pre-set scoring index algorithm to obtain the scoring index value corresponding to the summary generation result. The scoring index algorithm includes algorithms such as ROUGE-N, ROUGE-L, ROUGE-W, and ROUGE-S. Furthermore, the scoring index value is compared with the preset scoring threshold. If the scoring index value is greater than the preset scoring threshold, the summary generation result generated by the summary generation model is directly used as the final summary result, thus eliminating the need to perform syntactic analysis and extraction on the text information to be processed.

[0065] The ROUGE score is a common evaluation metric in machine translation, automatic summarization, and question-answering generation. ROUGE is calculated by comparing the model-generated summary or answer with a reference answer (usually manually generated). Furthermore, the preset scoring threshold can be set according to actual conditions; preferably, the preset scoring threshold is set to 0.4.

[0066] Step S30: If the summary generation result does not meet the preset quality assessment conditions, then perform syntactic analysis and extraction on the text information to be processed to obtain the summary extraction result, and use the summary extraction result as the final summary result.

[0067] Specifically, if the score index value of the summary generation result is not greater than the preset score threshold, then syntactic analysis is performed on the text information to be processed to extract the key summary information corresponding to each text phrase in the text information to be processed, such as subject, predicate and object information, and then the key summary information corresponding to each text phrase is filtered according to the preset topic words to obtain effective summary units. The preset topic words are customized according to the industry field corresponding to the text. For example, for the mobile telecommunications industry, they can be defined as topic words such as recharge, package, data traffic, network and complaint. This reduces the redundancy of the extracted summary. Furthermore, if a preset keyword exists at the beginning or end of a sentence in a valid summary unit, the valid summary unit is expanded. That is, the valid summary unit is expanded to the previous key summary information or the next key summary information of the valid summary unit, resulting in multiple target summary units. This effectively improves the relevance between sentences in the summary. Stop words, auxiliary words, locative words, conjunctions, non-morphemes, and other information in the target summary units are then removed to shorten the character length of the summary. All target summary units are then sequentially concatenated to generate the summary extraction result, which is used as the final summary result.

[0068] This invention, through the above-described scheme, involves: acquiring text information to be processed; inputting the text information to be processed into a summarization generation model to obtain a summarization result output by the model; if the summarization result does not meet preset quality assessment conditions, then performing syntactic analysis and extraction on the text information to be processed to obtain a summarization extraction result, which is then used as the final summarization result. This achieves the goal of generating a summarization result corresponding to the text information to be processed through a summarization generation model. If the summarization result does not meet preset quality assessment conditions, it indicates that the accuracy of the result generated by the summarization generation model is low. Therefore, syntactic analysis and extraction are performed on the text information to be processed, thereby improving the relevance between sentences in the summary and enhancing the accuracy and readability of the summary extraction.

[0069] Reference Figure 2 In one embodiment, step S20 above, which involves inputting the text information to be processed into a summarization generation model and obtaining the summarization generation result output by the summarization generation model, includes:

[0070] Step S21: Input the text information to be processed into the pre-trained language embedding layer, the part-of-speech embedding layer and the dependency embedding layer respectively to obtain the semantic vector output by the pre-trained language embedding layer, the part-of-speech vector of each word output by the part-of-speech embedding layer and the syntactic dependency vector between words output by the dependency embedding layer.

[0071] Step S22: Input the input feature sequence into the sequence generation network to encode and decode the input feature sequence using the sequence generation network to obtain the output feature sequence, wherein the input feature sequence is constructed from the semantic vector, part-of-speech vector and syntactic dependency vector of the text information to be processed;

[0072] Step S23: Input the output feature sequence into the classification output layer to obtain the summary generation result output by the classification output layer.

[0073] It should be noted that the pre-trained language embedding layer is a word embedding layer using the T5 pre-trained language model. The T5 (Text-to-Text Transfer Transformer) model in this embodiment is a text conversion model. The sequence generation network is a Seq2seq with attention model, which is a sequence-to-sequence conversion model with an added attention mechanism. It includes an Encoder module, a Decoder module, an Attention mechanism layer, and a softmax classification output layer. The Encoder and Decoder modules consist of a bidirectional LSTM long short-term memory network layer and a hidden state layer.

[0074] It should be further explained that the part-of-speech vector is a feature vector obtained by quantifying the part-of-speech of each word in the text information to be processed. The part-of-speech includes verbs, nouns, and pronouns, etc. The syntactic dependency vector is a feature vector obtained by quantifying the syntactic dependency data between words in the text information to be processed. The syntactic dependency data includes objects, quantifiers, and appositives, etc.

[0075] Specifically, the text information to be processed is input into the T5 pre-trained language model to extract semantic features of the text information. The part-of-speech vector of each word in the text information is extracted through a part-of-speech embedding layer, and the syntactic dependency vector between words in the text information is extracted through a dependency embedding layer. The input feature sequence, constructed from the semantic vector, part-of-speech vector, and syntactic dependency vector of the text information, is then input into the Encoder and Decoder modules of the sequence generation network. The Encoder module encodes the original input features, and the encoded feature sequence is then input into the Decoder module for decoding. An attention mechanism is introduced between the Encoder and Decoder modules to improve decoding accuracy. Finally, the decoded feature sequence is input into the softmax classification output layer to obtain the final output summary generation result.

[0076] This invention, through the above-described scheme, involves inputting the text information to be processed into the pre-trained language embedding layer, the part-of-speech embedding layer, and the dependency relation embedding layer, respectively, to obtain semantic vectors output by the pre-trained language embedding layer, part-of-speech vectors of each word output by the part-of-speech embedding layer, and syntactic dependency vectors between words output by the dependency relation embedding layer. The input feature sequence is then input into the sequence generation network to encode and decode the input feature sequence, resulting in an output feature sequence. The input feature sequence is constructed from the semantic vectors, part-of-speech vectors, and syntactic dependency vectors of the text information to be processed. Finally, the output feature sequence is input into the classification output layer to obtain the summary generation result output by the classification output layer. This approach, by introducing the T5 pre-trained model into the summary generation method, largely solves the problem of effective representation of polysemous words. Furthermore, by adding part-of-speech vectors and syntactic dependency vectors of text words, it effectively improves the problem of incoherent summaries, thereby enhancing the accuracy and readability of text summarization.

[0077] Reference Figure 3 In one embodiment, step S30 above involves performing syntactic analysis and extraction on the text information to be processed to obtain a summary extraction result, including:

[0078] Step S31: Segment the text information to be processed to obtain several short text sentences;

[0079] Step S32: For any text phrase, extract the syntactic feature information of the text phrase, and generate a syntactic relation triple based on the syntactic feature information;

[0080] Step S33: Extract several original summary units from each of the syntactic relation triples;

[0081] Step S34: Select several valid summary units containing pre-defined subject terms from each of the original summary units;

[0082] Step S35: Expand each of the effective digest units to obtain each target digest unit;

[0083] Step S35 above includes:

[0084] Step S351: If the ending word in any valid summary unit is the preset topic word, then the valid summary unit is expanded to the next original summary unit corresponding to the valid summary unit; if the beginning word in any valid summary unit is the preset topic word, then the valid summary unit is expanded to the previous original summary unit corresponding to the valid summary unit, thus forming each target summary unit.

[0085] Step S36: Sequentially concatenate the target summary units to obtain the summary extraction result.

[0086] It should be noted that the syntactic feature information includes subject information, predicate information, and object information. Specifically, the text information to be processed is first segmented using delimiters such as commas, periods, question marks, and exclamation marks to generate several short text sentences. Then, syntactic analysis is performed on each short text sentence to extract the subject information, predicate information, and object information. For any short text sentence: the subject information and its corresponding modifiers are concatenated to obtain the subject concatenation result; the predicate information and its corresponding modifiers are concatenated to obtain the predicate concatenation result; and the object information and its corresponding modifiers are concatenated to obtain the object concatenation result. Finally, based on the subject concatenation result, predicate concatenation result, and object concatenation result of the short text sentence, the syntactic relation triplet is formed.

[0087] Furthermore, for any short text sentence: if the syntactic relation triples of the short text sentence contain a subject concatenation result and a predicate concatenation result, or if the syntactic relation triples of the short text sentence contain a predicate concatenation result and an object concatenation result, then the short text sentence is proven to be a valid short sentence. Then, the syntactic relation triples corresponding to each valid short sentence are sequentially concatenated to obtain several original summary units.

[0088] Furthermore, based on pre-set keyword terms, multiple valid summary units containing pre-set keyword terms are selected from each of the original summary units. Then, for any valid summary unit: if the valid summary unit ends with the pre-set keyword term, the valid summary unit is expanded to the next original summary unit of the valid summary unit to obtain a target summary unit; if the valid summary unit begins with the pre-set keyword term, the valid summary unit is expanded to the previous original summary unit of the valid summary unit to obtain each target summary unit.

[0089] Furthermore, stop words, auxiliary words, locative words, conjunctions, and non-morphemes are removed from each target summary unit to shorten the character length of the summary. Then, the processed target summary units are sequentially concatenated to generate the summary extraction result.

[0090] This invention, through the above-described scheme, involves segmenting the text information to be processed into several short sentences; for any given short sentence, extracting its syntactic features to generate syntactic relation triples; extracting several original summary units from each of the syntactic relation triples; selecting several effective summary units containing pre-defined keywords from each of the original summary units; expanding each effective summary unit to obtain target summary units; and sequentially concatenating the target summary units to obtain the summary extraction result. This approach incorporates keyword concepts to filter summary units, reducing redundancy in the extraction summary to some extent. Furthermore, it automatically expands the preceding and following sentences when keywords are at the beginning or end, improving the relevance between sentences in the extracted summary. This enhances the readability of the text summary.

[0091] Reference Figure 4 In one embodiment, the summary generation model is trained based on the following steps:

[0092] Step A10: Obtain several original text samples, and calculate the quality score corresponding to each original text sample based on the summary tags of each original text sample.

[0093] Step A20: Select each original text sample whose quality score is greater than the preset score threshold as the text sample to be trained.

[0094] Step A30: Based on each of the text samples to be trained, iteratively train the model to be trained to obtain the summary generation model.

[0095] The model to be trained includes an embedding layer, a sequence generation network, and a classification output layer. The embedding layer includes a pre-trained language embedding layer, a part-of-speech embedding layer, and a dependency relation embedding layer. The step of iteratively training the model to be trained based on each of the training text samples to obtain the summary generation model includes:

[0096] Step A31: For any text sample to be trained, input the text sample to be trained into the pre-trained language embedding layer, the part-of-speech embedding layer and the dependency embedding layer respectively to obtain the training semantic vector output by the pre-trained language embedding layer, the training part-of-speech vector of each word output by the part-of-speech embedding layer and the training syntactic dependency vector between words output by the dependency embedding layer.

[0097] Step A32: Input the training semantic vector, the training part-of-speech vector, and the training syntactic dependency vector into the sequence generation network to obtain the training feature sequence output by the sequence generation network;

[0098] Step A33: Input the training feature sequence into the output classification layer to obtain the predicted summary result output by the output classification layer;

[0099] Step A34: Calculate the model loss value between the predicted summary result and the summary label;

[0100] Step A35: Based on the model loss value of each iteration, update the parameters of the model to be trained to obtain the summary generation model.

[0101] Specifically, pre-annotated original text samples are collected from the internet, or a batch of text information is manually annotated to obtain several original text samples. Then, based on the summary tags of each original text sample, a quality score is calculated for each original text sample using a pre-set scoring algorithm. This scoring algorithm includes algorithms such as ROUGE-N, ROUGE-L, ROUGE-W, and ROUGE-S. Original text samples with quality scores greater than a preset threshold are selected as training samples; for example, texts with quality scores greater than 0.4 are retained. Further, for any training text sample, it is input into the pre-trained language embedding layer, the part-of-speech embedding layer, and the dependency relation embedding layer to obtain the training semantic vector output by the pre-trained language embedding layer, the training part-of-speech vector for each word output by the part-of-speech embedding layer, and the training syntactic dependency vector between words output by the dependency relation embedding layer. The training semantic vector, the training part-of-speech vector, and the training syntactic dependency vector are then input into the sequence generation network to obtain the training feature sequence output by the sequence generation network. Figure 5 , Figure 5 This is a schematic diagram of the model structure of the summary generation model in this embodiment of the invention. An attention mechanism layer is introduced between the Encoder and Decoder modules to improve decoding accuracy. Further, the training feature sequence is input to the output classification layer to obtain the predicted summary result output by the output classification layer. Then, the model loss value between the predicted summary result and the summary label is calculated using the aforementioned scoring index algorithm. In other embodiments, the model loss value calculation method can be set according to actual needs and is not specifically limited here. After calculating the model loss value, the current training process ends, the model parameters in the prediction model to be trained are updated, and then the next training is performed. During the training process, it is determined whether the updated model to be trained meets the preset training termination conditions. If it does, the updated model to be trained is used as the summary generation model; if it does not, the model training continues. The preset training termination conditions include loss convergence and reaching the maximum iteration threshold, etc.

[0102] The embodiments of the present invention, through the above-described scheme, enable the training of a summary generation model by introducing a T5 pre-trained model and adding part-of-speech vectors of text words and syntactic dependency vectors between words. This solves the problem of effective representation of polysemous words and effectively improves the problem of incoherent summaries. Furthermore, it controls the loss value of the summary generation model within a preset range, thereby improving the accuracy of the summary generation model in generating summaries.

[0103] The text summarization extraction apparatus provided by the present invention is described below. The text summarization extraction apparatus described below can be referred to in correspondence with the text summarization extraction method described above.

[0104] like Figure 6 As shown, an embodiment of the present invention provides a text summarization extraction device, which includes:

[0105] Module 10 is used to acquire text information to be processed;

[0106] The summary generation module 20 is used to input the text information to be processed into the summary generation model and obtain the summary generation result output by the summary generation model;

[0107] The abstract extraction module 30 is used to perform syntactic analysis and extraction on the text information to be processed if the abstract generation result does not meet the preset quality assessment conditions, so as to obtain the abstract extraction result and use the abstract extraction result as the final abstract result.

[0108] Optionally, the summary generation model includes an embedding layer, a sequence generation network, and an output classification layer, wherein the embedding layer includes a pre-trained language embedding layer, a part-of-speech embedding layer, and a dependency relation embedding layer; the summary generation module 20 is further configured to:

[0109] The text information to be processed is input into the pre-trained language embedding layer, the part-of-speech embedding layer, and the dependency embedding layer, respectively, to obtain the semantic vector output by the pre-trained language embedding layer, the part-of-speech vector of each word output by the part-of-speech embedding layer, and the syntactic dependency vector between words output by the dependency embedding layer.

[0110] The input feature sequence is input into the sequence generation network to encode and decode the input feature sequence using the sequence generation network to obtain the output feature sequence, wherein the input feature sequence is constructed from the semantic vector, part-of-speech vector and syntactic dependency vector of the text information to be processed;

[0111] The output feature sequence is input into the classification output layer to obtain the summary generation result output by the classification output layer.

[0112] Optionally, the summary extraction module 30 is further configured to:

[0113] The text information to be processed is segmented to obtain several short text sentences;

[0114] For any given text phrase, extract the syntactic feature information of the text phrase, and generate syntactic relation triples based on the syntactic feature information;

[0115] Several original summary units are extracted from each of the syntactic relation triples;

[0116] Several valid summary units containing pre-defined subject terms are selected from each of the original summary units.

[0117] Each of the effective summary units is expanded to obtain each target summary unit;

[0118] The target summary units are sequentially concatenated to obtain the summary extraction result.

[0119] Optionally, the summary extraction module 30 is further configured to:

[0120] If the ending word in any valid summary unit is the preset topic word, then the valid summary unit is expanded to the next original summary unit corresponding to the valid summary unit;

[0121] If the first word in any valid summary unit is the preset topic word, then the valid summary unit is expanded to the previous original summary unit corresponding to the valid summary unit to form each target summary unit.

[0122] Optionally, the text summarization extraction device further includes:

[0123] If the summary generation result meets the preset quality assessment conditions, then the summary generation result will be used as the final summary result.

[0124] Optionally, the text summarization extraction device further includes:

[0125] Several original text samples are obtained, and the quality score corresponding to each original text sample is calculated based on the summary tags of each original text sample.

[0126] Each original text sample with a quality score greater than a preset score threshold is selected as a training text sample.

[0127] Based on the text samples to be trained, the training model is iteratively trained to obtain the summary generation model.

[0128] Optionally, the text summarization extraction device further includes:

[0129] For any text sample to be trained, the text sample to be trained is input into the pre-trained language embedding layer, the part-of-speech embedding layer and the dependency embedding layer respectively, to obtain the training semantic vector output by the pre-trained language embedding layer, the training part-of-speech vector of each word output by the part-of-speech embedding layer and the training syntactic dependency vector between words output by the dependency embedding layer.

[0130] The training semantic vector, the training part-of-speech vector, and the training syntactic dependency vector are input into the sequence generation network to obtain the training feature sequence output by the sequence generation network.

[0131] The training feature sequence is input into the output classification layer to obtain the predicted summary result output by the output classification layer;

[0132] Calculate the model loss value between the predicted summary result and the summary label;

[0133] Based on the model loss value of each iteration, the parameters of the model to be trained are updated to obtain the summary generation model.

[0134] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail here.

[0135] Figure 7A schematic diagram of the physical structure of an electronic device is provided. This electronic device may include a processor 610, a memory 620, a communications interface 630, and a communication bus 640. The processor 610, memory 620, and communications interface 630 communicate with each other via the communication bus 640. The processor 610 can invoke logical instructions in the memory 620 to execute a text summarization extraction method. This method includes: acquiring text information to be processed; inputting the text information to be processed into a summarization generation model to obtain a summarization generation result output by the summarization generation model; if the summarization generation result does not meet preset quality assessment conditions, performing syntactic analysis and extraction on the text information to be processed to obtain a summarization extraction result, and using the summarization extraction result as the final summarization result.

[0136] Furthermore, the logical instructions in the aforementioned memory 620 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0137] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the text summarization extraction method provided by the above methods. The method includes: acquiring text information to be processed; inputting the text information to be processed into a summarization generation model to acquire a summarization generation result output by the summarization generation model; if the summarization generation result does not meet a preset quality assessment condition, performing syntactic analysis and extraction on the text information to be processed to obtain a summarization extraction result, and using the summarization extraction result as the final summarization result.

[0138] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the text summarization extraction method provided by the above methods. The method includes: acquiring text information to be processed; inputting the text information to be processed into a summarization generation model to acquire a summarization generation result output by the summarization generation model; if the summarization generation result does not meet a preset quality assessment condition, performing syntactic analysis and extraction on the text information to be processed to obtain a summarization extraction result, and using the summarization extraction result as the final summarization result.

[0139] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0140] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A text summarization extraction method, characterized in that, include: Obtain the text information to be processed; The text information to be processed is input into the summary generation model, and the summary generation result output by the summary generation model is obtained; If the summary generation result does not meet the preset quality assessment conditions, then the text information to be processed is subjected to syntactic analysis and extraction to obtain the summary extraction result, and the summary extraction result is used as the final summary result; The step of performing syntactic analysis and extraction on the text information to be processed to obtain the summary extraction result includes: The text information to be processed is segmented to obtain several short text sentences; For any given text phrase, extract the syntactic feature information of the text phrase to generate a syntactic relation triple based on the syntactic feature information; wherein, the syntactic feature information includes subject information, predicate information, and object information; If the syntactic relation triples of the text phrase contain both subject and predicate concatenation results, or if the syntactic relation triples of the text phrase contain both predicate and object concatenation results, then the corresponding syntactic relation triples of the text phrase are sequentially concatenated to obtain several original summary units; wherein, the subject concatenation result is obtained by concatenating the subject information of the text phrase and its corresponding modifiers, the predicate concatenation result is obtained by concatenating the predicate information of the text phrase and its corresponding modifiers, and the object concatenation result is obtained by concatenating the object information of the text phrase and its corresponding modifiers; Several effective abstract units containing preset keywords are selected from each of the original abstract units; Each of the effective summary units is expanded to obtain each target summary unit; wherein, if the ending word of any effective summary unit is the preset subject word, then the effective summary unit is expanded to the next original summary unit corresponding to the effective summary unit; if the beginning word of any effective summary unit is the preset subject word, then the effective summary unit is expanded to the previous original summary unit corresponding to the effective summary unit, thus forming each of the target summary units; The target summary units are sequentially concatenated to obtain the summary extraction result.

2. The text summarization extraction method according to claim 1, characterized in that, The summary generation model includes an embedding layer, a sequence generation network, and an output classification layer. The embedding layer includes a pre-trained language embedding layer, a part-of-speech embedding layer, and a dependency relation embedding layer. The step of inputting the text information to be processed into the summarization generation model and obtaining the summarization generation result output by the summarization generation model includes: The text information to be processed is input into the pre-trained language embedding layer, the part-of-speech embedding layer, and the dependency embedding layer, respectively, to obtain the semantic vector output by the pre-trained language embedding layer, the part-of-speech vector of each word output by the part-of-speech embedding layer, and the syntactic dependency vector between words output by the dependency embedding layer. The input feature sequence is input into the sequence generation network to encode and decode the input feature sequence using the sequence generation network to obtain the output feature sequence, wherein the input feature sequence is constructed from the semantic vector, part-of-speech vector and syntactic dependency vector of the text information to be processed; The output feature sequence is input into the output classification layer to obtain the summary generation result output by the output classification layer.

3. The text summarization extraction method according to claim 1, characterized in that, After inputting the text information to be processed into the summarization generation model and obtaining the summarization result output by the summarization generation model, the method further includes: If the summary generation result meets the preset quality assessment conditions, then the summary generation result will be used as the final summary result.

4. The text summarization extraction method according to claim 2, characterized in that, The summary generation model is trained based on the following steps: Several original text samples are obtained, and the quality score corresponding to each original text sample is calculated based on the summary tags of each original text sample. Each original text sample with a quality score greater than a preset score threshold is selected as a training text sample. Based on the text samples to be trained, the training model is iteratively trained to obtain the summary generation model.

5. The text summarization extraction method according to claim 4, characterized in that, The step of iteratively training the model to obtain the summary generation model based on each of the text samples to be trained includes: For any text sample to be trained, the text sample to be trained is input into the pre-trained language embedding layer, the part-of-speech embedding layer and the dependency embedding layer respectively, to obtain the training semantic vector output by the pre-trained language embedding layer, the training part-of-speech vector of each word output by the part-of-speech embedding layer and the training syntactic dependency vector between words output by the dependency embedding layer. The training semantic vector, the training part-of-speech vector, and the training syntactic dependency vector are input into the sequence generation network to obtain the training feature sequence output by the sequence generation network. The training feature sequence is input into the output classification layer to obtain the predicted summary result output by the output classification layer; Calculate the model loss value between the predicted summary result and the summary label; Based on the model loss value of each iteration, the parameters of the model to be trained are updated to obtain the summary generation model.

6. A text summarization extraction device, characterized in that, include: The acquisition module is used to acquire the text information to be processed. The summary generation module is used to input the text information to be processed into the summary generation model and obtain the summary generation result output by the summary generation model; The abstract extraction module is used to perform syntactic analysis and extraction on the text information to be processed if the abstract generation result does not meet the preset quality assessment conditions, so as to obtain the abstract extraction result and use the abstract extraction result as the final abstract result. The abstract extraction module is specifically used for: The text information to be processed is segmented to obtain several short text sentences; For any given text phrase, extract the syntactic feature information of the text phrase to generate a syntactic relation triple based on the syntactic feature information; wherein, the syntactic feature information includes subject information, predicate information, and object information; If the syntactic relation triples of the text phrase contain both subject and predicate concatenation results, or if the syntactic relation triples of the text phrase contain both predicate and object concatenation results, then the corresponding syntactic relation triples of the text phrase are sequentially concatenated to obtain several original summary units; wherein, the subject concatenation result is obtained by concatenating the subject information of the text phrase and its corresponding modifiers, the predicate concatenation result is obtained by concatenating the predicate information of the text phrase and its corresponding modifiers, and the object concatenation result is obtained by concatenating the object information of the text phrase and its corresponding modifiers; Several effective abstract units containing preset keywords are selected from each of the original abstract units; Each of the effective summary units is expanded to obtain each target summary unit; wherein, if the ending word of any effective summary unit is the preset subject word, then the effective summary unit is expanded to the next original summary unit corresponding to the effective summary unit; if the beginning word of any effective summary unit is the preset subject word, then the effective summary unit is expanded to the previous original summary unit corresponding to the effective summary unit, thus forming each of the target summary units; The target summary units are sequentially concatenated to obtain the summary extraction result.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the text summarization extraction method as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the text summarization extraction method as described in any one of claims 1 to 5.