Abstract generation method and device, terminal equipment and computer readable storage medium

By analyzing the text structure and generating summary based on subtitle tags, the problem of high computational burden on existing models is solved, and more efficient summary generation is achieved.

CN119397006APending Publication Date: 2025-02-07TCL TECHNOLOGY GROUP CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310923788.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-26
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing text summary generation model needs to analyze a large number of text features when generating the summary, resulting in a high computational burden.

Method used

By analyzing the text structure, determining whether the input text is a specific type of text, and then generating a summary based on the label of each subtitle, reducing the need for overall text feature analysis.

Benefits of technology

Reduces the computational burden of the model and improves the efficiency of digest generation, especially when processing text with specific structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397006A_ABST
    Figure CN119397006A_ABST
Patent Text Reader

Abstract

The invention provides an abstract generation method and device, terminal equipment and a computer readable storage medium. The method comprises the steps of obtaining a target text; determining a subtitle label corresponding to each subtitle in the target text; and generating an abstract of the target text based on the sub-title labels corresponding to the sub-titles. According to the abstract generation method, after the target text is obtained, when it is determined that the input target text is the text of the specific text structure, the specific label of each subtitle of the input text can be determined. For a specific type of text, the described content has similarity, so that when the abstract is generated, the abstract of each sub-title can be determined based on the label of each sub-title, and then the abstract of each sub-title is spliced, so that the abstract of the whole text can be obtained. Therefore, analysis of overall features of the text is not needed, and the calculation amount of the model is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a summary generation method, apparatus, terminal device and computer-readable storage medium. Background Art

[0002] Text summarization technology aims to save users' time and energy when reading, and aims to generate simple and comprehensive text summaries. With the advancement of deep learning technology, the overall quality of text summarization methods has also improved. However, when the current mainstream model generates a summary for the target text, it extracts the specific sentence features of each sentence in the target text, and then determines whether the meaning expressed by the sentence needs to be included as part of the summary based on the features of each sentence, thereby generating a summary.

[0003] The above-mentioned method of generating summaries is a general method. In other words, there is no restriction on the input text, and the generated summary is determined by analyzing the overall content of the text. Therefore, for the summary generation model, there are many text features or sentence features that need to be analyzed, and the computational burden of the model is relatively large. Summary of the invention

[0004] This application provides a summary generation method, which can determine whether the input text is a specific type of text by first analyzing the text structure of the text. For a specific type of text, the content described has similarities, so when generating a summary, there is also a certain regularity, which can reduce the computational burden of the model.

[0005] In a first aspect, the present application provides a method for generating a summary, the method comprising:

[0006] Get the target text;

[0007] Determine a subtitle label corresponding to each subtitle in the target text;

[0008] Based on the subtitle tags corresponding to the subtitles, a summary of the target text is generated.

[0009] In a second aspect, the present application further provides a summary generation device, the device comprising:

[0010] An acquisition module is used to acquire the target text;

[0011] A determination module, used to determine a subtitle label corresponding to each subtitle in the target text;

[0012] A generating module is used to generate a summary of the target text based on the subtitle tags corresponding to each of the subtitles.

[0013] In a third aspect, the present application also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any one of the summary generation methods.

[0014] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps in any one of the abstract generation methods.

[0015] The summary generation method provided by the present application, after obtaining the target text, when it is determined that the input target text is a text of a specific text structure, the specific label of each subheading of the input text can be determined. For a specific type of text, the content described has similarities, so when generating a summary, the summary of each subheading can be determined based on the label of each subheading, and then the summary of each subheading can be spliced ​​to obtain a summary of the entire text. Therefore, there is no need to analyze the overall features of the text, which reduces the computational complexity of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 is a schematic diagram of a scenario of a summary generation system provided in an embodiment of the present application;

[0018] Figure 2 This is a schematic diagram of an embodiment of the abstract generation method in the embodiment of the present application;

[0019] Figure 3 This is a schematic diagram of an embodiment of the abstract generation method in the embodiment of the present application;

[0020] Figure 4 is a schematic diagram of a functional module of a summary generating device in an embodiment of the present application;

[0021] Figure 5 It is a schematic diagram of the structure of the terminal device in the embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0023] In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of the present application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0024] In this application, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. At the same time, it is to be understood that in the specific implementation of this application, when user information, user data and other related data are involved, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data shall comply with relevant laws, regulations and standards of relevant countries and regions.

[0025] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art will recognize that the present application can be implemented without using these specific details. In other examples, known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present application obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present application.

[0026] The present application provides a summary generation method, apparatus, device and storage medium, which are described in detail below.

[0027] See also Figure 1 , Figure 1 Schematic diagram of a scenario of a summary generation system provided in an embodiment of the present application. The summary generation system may include a terminal device 100 and a storage device 200. The storage device 200 may transmit data to the terminal device 100. Figure 1 The terminal device 100 in the embodiment can obtain the text for which a summary needs to be generated and stored in the storage device 200 to execute the summary generation method in the present application.

[0028] In the embodiment of the present application, the terminal device 100 includes but is not limited to a desktop computer, a portable computer, a network server, a PDA (Personal Digital Assistant), a tablet computer, a wireless terminal device, an embedded device, etc.

[0029] In an embodiment of the present application, communication between the terminal device 100 and the storage device 200 can be achieved through any communication method, including but not limited to mobile communications based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), and Worldwide Interoperability for Microwave Access (WiMAX), or computer network communications based on the TCP / IP Protocol Suite (TCP / IP) and User Datagram Protocol (UDP).

[0030] It should be noted that Figure 1 The scenario diagram of the summary generation system shown is only an example. The summary generation system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. It can be known by those skilled in the art that with the evolution of the summary generation system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.

[0031] like Figure 2 As shown, Figure 2 This is a flow chart of an embodiment of a method for generating a summary in an embodiment of the present application. The method for generating a summary may include the following steps 201 to 203:

[0032] 201. Obtain target text.

[0033] In the embodiments of the present application, the target text for which a summary needs to be generated can be as described in the above embodiments, and the target text can be stored in a corresponding storage medium, and can be a text for which a summary needs to be generated in real time, for example, a text file received as external input, etc., and the specific embodiments of the present application are not limited thereto. At the same time, in the embodiments of the present application, the target text can be text data in any form, including text data in word format, txt format, etc., or can be text data obtained through image-text recognition, and the specific embodiments of the present application are also not limited thereto.

[0034] 202. Determine a subheading label corresponding to each subheading in the target text.

[0035] It should be noted that the target text involved in the embodiments of the present application needs to be a type of text, such as a paper, a judgment, etc. The specific reason is that for a type of text with a fixed text structure, the content described under the corresponding subheadings in different texts is consistent, for example: the beginning of the paper can be a subheading of the introduction, and the subheading of the introduction includes specific introduction content. Therefore, based on the consistency of this text structure, when summarizing the same type of text, there is a certain regularity. In the embodiments of the present application, the label determination model used to determine the subheading label can be obtained by training only for a text that only includes a specific text format. In other words, the label determination model can only generate corresponding subheading labels for texts of a specific text format, and if subheading labels are generated for texts of other text types, deviations may occur. If subheading labels need to be generated for texts of different text types, it is necessary to train texts of different text types. Therefore, the target text can be directly sent to a label determination model trained for a certain specific text type, and the subheading labels corresponding to each subheading of the target text can be obtained.

[0036] It should be noted that when determining to input the target text into the corresponding label determination model, the label determination model corresponding to the target text can be determined manually or by other means, and the target text can be input into the corresponding label determination model.

[0037] 203. Generate a summary of the target text based on the subtitle tags corresponding to each subtitle.

[0038] According to the above steps, after obtaining the subtitle labels corresponding to each subtitle in the target text, a summary can be generated based on the label of each subtitle. For the sake of convenience, the paper is still listed here. At this time, if the sub-title tag is the tag of the introduction sub-title, the introduction part can be ignored, because for the paper, the introduction part does not involve substantive content, so there is no need to generate an abstract for the introduction; if the sub-title tag is the tag corresponding to the research purpose, sentences including keywords such as "reason" and "purpose" can be extracted from the sub-title of the research purpose as sentences in the abstract to be generated; if the sub-title tag is the sub-title tag corresponding to the research method, sentences including keywords such as "method" and "way" can be extracted from the sub-title of the research method as sentences in the abstract to be generated; if the sub-title tag is the sub-title tag corresponding to the research process, sentences including keywords such as "adopt" and "take" can be extracted from the sub-title of the research process as sentences in the abstract to be generated; if the sub-title tag is the sub-title tag corresponding to the conclusion, since the conclusion sub-title is relatively concise, the overall conclusion can be directly used as the abstract of the target text; if the sub-title tag is the sub-title tag corresponding to the literature review, it is also possible not to generate an abstract for the sub-title of the literature review.

[0039] In summary, each subtitle label corresponds to a summary generation method, so the summary of each subtitle of the target text can be generated by using the corresponding summary generation method according to the labels corresponding to different subtitles. Afterwards, the summaries corresponding to each subtitle can be spliced ​​together according to the order of the subtitles. It should be noted that the embodiment of the present application can also generate summaries for other types of texts. When the training texts of the summary generation model are different, the corresponding labels are also different, and the summary generation methods corresponding to different labels are also different. The specific method can be adjusted according to the actual situation, and the embodiment of the present application does not limit it.

[0040] The summary generation method provided by the present application, after obtaining the target text, when it is determined that the input target text is a text of a specific text structure, the specific label of each subheading of the input text can be determined. For a specific type of text, the content described has similarities, so when generating a summary, the summary of each subheading can be determined based on the label of each subheading, and then the summary of each subheading can be spliced ​​to obtain a summary of the entire text. Therefore, there is no need to analyze the overall features of the text, which reduces the computational complexity of the model.

[0041] In order to better implement the embodiment of the present application, in one embodiment of the present application, according to the target text structure of the target text, the subtitle label corresponding to each subtitle in the target text is determined, including:

[0042] Determine a target text structure of a target text for which a summary is to be generated; if the target text structure matches a preset text structure, determine a subheading label corresponding to each subheading in the target text.

[0043] In the above embodiment, a scheme for determining the subtitle label of the target text according to the label determination model corresponding to the target text type is provided. However, if the target text type does not match the label determination model, the subtitle label cannot be correctly output. Therefore, in order to solve this problem, in the embodiment of the present application, the target text structure of the target text can be determined by analyzing the titles of each subtitle in the text, thereby determining the target text structure of the target text. Then, it is determined whether the target text structure is a matching structure. If it is a matching structure, it can be determined that the input target text is a matching text type, and then each subtitle can be effectively labeled. For example: academic papers usually include: introduction, research purpose, research methods, research process, conclusion and literature review, etc. Therefore, it can be determined by analyzing the titles of each subtitle in the paper, thereby determining which structures the specific text of the paper consists of. Of course, in addition to the text of the academic paper with a specific text structure, it also includes the text of the judgment including the text structure of the header, body, judgment result and tail, or other texts with a specific text structure, and the specific embodiment of the present application is not limited.

[0044] For ease of understanding, it is assumed that the target text is a paper, and since the paper is a text with a stable text structure, it is still assumed that the paper has 6 subheadings: introduction, research purpose, research method, research process, conclusion and literature review. After that, the target text structure including 6 subheadings can be compared with the preset text structure. If the preset text structure also includes 6 subheadings, and the order of the subheadings of the paper is also a fixed subheading order. Therefore, the labels of the 6 subheadings of the target text can be directly predicted in order, so as to obtain the labels corresponding to each subheading in the target text.

[0045] In order to better implement the embodiment of the present application, in one embodiment of the present application, determining the target text structure of the target text to be generated as a summary includes:

[0046] Determine the number of subheadings of the target text; determine the subheading name of each subheading of the target text; determine the structure of the target text based on the number of subheadings and the subheading name of each subheading.

[0047] In the above embodiment, an implementation method for determining the text structure according to the number of subheadings is provided. However, in actual situations, there may be a situation where the number of subheadings is the same. For example, a longer press release may have the same number of subheadings as a paper; or, the number of subheadings in the input paper is the same as the number of subheadings included in the preset text structure, but the order of the subheadings in the input paper is wrong. Therefore, the obtained text structure may contain information errors.

[0048] Therefore, the embodiment of the present application can also determine the text structure of the target text according to the subtitle name when combining the number of subtitles. For example: while obtaining the number of subtitles, the subtitle name of each subtitle is extracted, and the number of subtitles and the subtitle name are used as the corresponding information of the target text structure of the target text. In this way, in the subsequent process, when determining the target text structure and the preset text structure, it can be further determined based on the specific subtitle name whether the input target text is a text that the summary generation model can generate a summary. For example: in the preset text structure, title information can also be included, and then when determining whether the target text structure matches the preset text structure, it can be determined whether the number of subtitles of the two is the same. If the number of subtitles is the same, it can be determined whether the subtitle name in the target text structure is similar to the template title in the preset text structure. If each subtitle name in the target text structure can correspond to a template title in a preset text structure, and the similarity is greater than a certain similarity threshold, it can be determined that the target text structure matches the preset text structure. It should be noted that in an embodiment of the present application, the method for determining the similarity between the subtitle name in the target text structure and the template title in the preset text structure can be achieved by first extracting text features of the two titles, and then calculating the Euclidean distance or cosine similarity between the two features, etc., to determine the similarity between the subtitle name and the template title, and the specific embodiments of the present application are not limited thereto.

[0049] In order to better implement the embodiment of the present application, in one embodiment of the present application, if the target text structure matches the preset text structure, determining the subtitle tag corresponding to each subtitle in the target text includes:

[0050] If the target text structure matches the preset text structure, the subtitle features of each subtitle in the target text are determined; and according to the subtitle features, the subtitle label corresponding to each subtitle in the target text is determined.

[0051] According to the description of any of the above embodiments, the above embodiments provide a method for predicting labels for each subtitle of a target text in a given order. However, according to the above description, the order of subtitles in the target text may be wrong. Therefore, there may be errors in predicting labels for subtitles in a given order. Therefore, after determining that the target text structure matches the preset text structure, feature extraction or keyword extraction can be performed on the subtitle name of each subtitle first, so that the text features of each subtitle name or the keywords of the subtitle name in the target text can be obtained. After that, feature comparison or keyword comparison is performed to determine the labels corresponding to each subtitle. Among them, in the embodiment of the present application, feature comparison can still be determined by calculating the Euclidean distance or cosine similarity between two features, and then determining the labels corresponding to each subtitle based on the similarity, and the specific embodiment of the present application is not limited.

[0052] In order to better implement the embodiment of the present application, in one embodiment of the present application, a summary of the target text is generated based on the subtitle tags corresponding to each subtitle, including:

[0053] According to the subtitle labels corresponding to each subtitle, the summary template corresponding to each subtitle is determined; any subtitle in each subtitle is taken as the target subtitle, and the summary template corresponding to the target subtitle is taken as the target summary template, and the similarity score between each sentence in the target subtitle and each summary sentence in the target summary template is determined; the sentence with the highest similarity score among each sentence in the target subtitle is determined as the target sentence; according to the target sentence in the target subtitle, a summary of the target text is generated.

[0054] The above embodiment provides a method for generating a summary, so that the generated summary can more effectively fit the content to be expressed in the text. The embodiment of the present application lists a method for generating a summary through a summary template, and the specific process is as follows:

[0055] For example, the different subtitles in the target text X with K subtitles are denoted as X1, 2, ..., k First, you can separate each subheading into X according to the punctuation marks. k (k=1,2,…,n) is divided into a single sentence set S i (l=1,2,…,L i ), where L i For X k Then, all the sentences in each sub-heading section are compared with each sentence in the summary template to calculate their ROUGE-1 scores. For example, if there are 5 sentences in the summary template, and S iWhen there are 40 sentences in total, 5 scores will be obtained for each of the 40 sentences. Finally, the score of a sentence is defined as the maximum value of the relevance score between the sentence and the sentences in the summary template, that is, the maximum value of the ROUGE-1 score, by using an indicator called Maximum. At this time, the labels of the a sentences with the highest scores are set to 1, and the labels of the remaining sentences are set to 0. At this time, the sentence with the label set to 1 is the target sentence. At this time, the target sentence can be regarded as the sentence that best expresses the corresponding subheading. Therefore, the target sentence can be directly used as the sentence in the summary to be generated.

[0056] It should be noted that, in the embodiment of the present application, each subtitle can correspond to a summary template, and the first a sentences obtained in each subtitle are obtained through the implementation method described above, and the specific details are not repeated here. At the same time, the value of a can be set according to actual conditions, and is still not limited here.

[0057] After that, after the above processing is performed on all the collected target texts, the target sentences with labels can be obtained. Finally, each single sentence is classified and sorted according to its part for use in subsequent modules.

[0058] In order to better implement the embodiment of the present application, in one embodiment of the present application, a summary of the target text is generated according to the target sentence in the target subtitle, including:

[0059] Determine multiple sentence features of each target sentence in the target subtitle; fuse the multiple sentence features of each target sentence to obtain the fused sentence features corresponding to each target sentence; obtain candidate sentences for generating a summary based on the fused sentence features corresponding to each target sentence; concatenate the candidate sentences to obtain a summary of each target subtitle; concatenate the summaries of each target subtitle to obtain a summary of the target text.

[0060] In the above embodiment, an implementation method of directly using the target sentence as the sentence in the summary to be generated is listed. However, this method may still use some redundant content as the summary, resulting in a low degree of succinctness of the summary. Therefore, in order to improve the generality of the summary, it is also necessary to detect the target sentence to determine whether all the screened target sentences can be used as candidate sentences for generating the summary.

[0061] Specifically, after determining the target sentence, we need to consider that the position of the sentence is related to its importance. We can think that sentences at the beginning or end of the text or at the beginning of a paragraph will be more important. Or, based on the content of the sentence, it is believed that sentences containing entity names such as people, events, geographic locations or time will obviously contain more information. In addition, in order to ensure the rationality of the summaries generated in subsequent modules, sentences that are too long or too short in the original text should be punished. Therefore, feature information can be extracted for the target sentence, including: information features of the position of the sentence in the text, information features of the position of the sentence in the paragraph, information features of the entity name type contained in the sentence, TF-ISF value, sentence length features, and scores generated by the LexRank and TextRank algorithms, respectively, and dense vectors of each target sentence, etc. These feature information can be regarded as multiple sentence features of the target sentence. Among them, the position information features of the sentence in the text, the position information features of the sentence in the paragraph, the information features of the entity name type contained in the sentence, the TF-ISF value, the sentence length features, and the scores generated by the LexRank and TextRank algorithms can be regarded as view feature 1, and the dense vector representing the semantic embedding features of the sentence obtained by the SentenceTransformer library can be regarded as view feature 2. The feature fusion performed in the embodiment of the present application is the process of fusing view feature 1 and view feature 2.

[0062] Among them, the feature fusion method can be performed through a preset feature fusion encoder. Specifically, the feature fusion encoder includes: N densely connected layers, each dense layer consists of three parts: a fully connected layer, a regularization layer, and an activation layer. Batch normalization is performed in the regularization layer. The activation layer uses the Leaky ReLu activation function, and its output is the encoding unit E1 to En. These units are used to create representations of V1 to Vn, where V1 is a copy of E1, and the representation of Vn is the concatenation of V1 and En. For details, please see Figure 3 It should be noted that Figure 3 The encoder shown is an encoder that completes feature fusion training. The training process is as follows and is not described here. After concatenating V1 and En, the fused sentence feature can be obtained.

[0063] After obtaining the fused sentence features of each target sentence, it is possible to predict whether each corresponding target sentence can be regarded as a candidate sentence for generating a summary based on the fused sentence features. If the predicted label output by the summary generation model indicates that the target sentence can be regarded as a candidate sentence for generating a summary, the predicted target sentence will be directly used as a sentence in the summary, and the target sentence that is not predicted by the label will not be used as a sentence in the summary.

[0064] In order to better implement the embodiment of the present application, in one embodiment of the present application, based on the fused sentence features corresponding to each target sentence, candidate sentences for generating a summary are obtained, including:

[0065] The fused sentence features corresponding to each target sentence are respectively input into different preset classifiers for prediction; the target sentences predicted by each classifier are determined as candidate sentences for generating a summary.

[0066] The above embodiment provides a scheme for predicting whether each target sentence is a candidate sentence for generating a summary through a summary generation model. However, if prediction is performed through a summary generation model, the efficiency is low. Therefore, in order to improve the accuracy and efficiency of prediction, the embodiment of the present application can set multiple summary generation models for prediction, that is, multiple classifiers for prediction. The purpose is that when there are multiple target sentences, multiple classifiers can be used to predict at the same time to improve the prediction efficiency, and also to avoid a classifier being disturbed by other target sentence features when performing prediction classification, thereby improving the prediction accuracy.

[0067] Specifically, 5, 10, 20, etc. classifiers can be set in the embodiment of the present application. The specific number is not limited in the embodiment of the present application, and the number of classifiers can be a positive integer. When the target sentence obtained is assumed to be 16 sentences, 16 classifiers are called, and the 16 target sentences are respectively sent to the 16 called classifiers, and one target sentence is input into one classifier. In this way, 16 classifiers work at the same time, which can improve the efficiency by at least 16 times. Of course, this method also avoids one classifier, and classifies and predicts multiple sentences at the same time, and also avoids the interference of the fusion features of other sentences on the prediction of the fusion features of the sentence currently being predicted, thereby improving the prediction accuracy.

[0068] In order to better implement the embodiment of the present application, in an embodiment of the present application, before fusing the multiple sentence features of each target sentence to obtain the fused sentence features corresponding to each target sentence, the method further includes:

[0069] A plurality of groups of sample sentence features for training are obtained, each group of sample sentence features includes a plurality of sub-sample sentence features; the plurality of sub-sample sentence features in each group of sample sentence features are respectively input into a preset feature fusion encoder to obtain fused sentence features of each group of sample sentence features; the fused sentence features of each group of sample sentence features are respectively input into a preset feature decomposition decoder to obtain respective decoding results; if the respective decoding results all indicate that the feature decomposition decoder restores the fused sentence features to the plurality of sub-sample sentence features, it is determined that the feature fusion encoder completes the training.

[0070] The above embodiment provides a solution for fusing each sub-sentence feature through an encoder. This embodiment provides an implementation method for training the encoder. It should be noted that in the embodiment of the present application, multiple sub-sample sentence features in a set of sample sentence features can be of the same type as the view features described in the above embodiment. The specific process is as follows:

[0071] like Figure 3 As shown, V1 and Vn will be connected in series to form a single representation, and the connected representation will pass through a bottleneck layer. The output of the bottleneck layer can be regarded as the fused feature after fusion, and this output will be used as the input of the decoder during the training process. Similarly, the decoder architecture is also composed of N densely connected layers. Each densely connected layer consists of four parts: a fully connected layer, a regularization layer, an activation layer, and a deactivation layer, and the settings are the same as the encoder. Among them, the feature fusion process of the training encoder is the same as the fusion method in the actual fusion scenario in the above embodiment, and the details are not repeated here. Among them, in this fusion architecture, the purpose of setting the decoder is to regard the decoder as a loss adjustment mechanism. When the untrained encoder completes feature fusion and obtains the fused feature, the fused feature is input into the decoder again. If it is decoded by the decoder again, that is, after the fused feature is restored, the view feature 1 and the view feature 2 cannot be obtained, then it proves that the feature fusion of the encoder is failed. At this time, the feature fusion strategy of the encoder can be randomly adjusted to obtain a new fused feature. After that, the new fused features are input into the decoder again until the features restored by the decoder are the same as the view features 1 and 2 initially input into the encoder, and then it can be determined that the encoder has completed training. It should be noted that in the embodiment of the present application, only the fusion method of view features 1 and 2 is shown. In the actual process, the view features may also include view features 3, view features 4, etc., that is, Figure 3 In other words, when extracting features from a target sentence, more sub-sentence features can be extracted according to the specific situation. Similarly, if more sub-sentence features need to be extracted, the corresponding training samples can also be adjusted accordingly, and the specific embodiments of the present application are not limited thereto.

[0072] In summary, the overall process of the embodiment of the present application can be as follows:

[0073] In view of the fact that the target text has a specific structural pattern, the summary generation problem of the target text can be divided into the sub-problem of creating a summary model for each part. Therefore, for a target text with K sub-title parts, K classifiers can be created to screen the sentences of each part. Due to the excellence of the multi-sub-sentence features, the final performance of the overall method is not affected by the specific classifier architecture. Specifically, in the process of building the classifier, one of the various algorithms or network structures such as random forest, MLP, KNN, etc. can be selected to build a classifier. The training of the classifier is carried out on the data set with generated labels obtained from module one, and is characterized by being composed of multi-view feature information obtained from the fusion framework in the above embodiment. Each classifier will receive the sentence fusion features in its respective part as input and be trained under the supervision of its generated labels.

[0074] When the classifiers of all parts are trained, the summary generation task can be performed for this type of text. First, the target text to be summarized is divided into sentences. After extracting multi-view features from a single sentence and inputting it into its corresponding summary classifier, the label prediction probability can be obtained, that is, the probability of whether the sentence belongs to the candidate summary. In order to retain information to the maximum extent and fix the size of the summary, the first b sentences with the highest output probability in each part can be selected to form the sub-summary of the part. Then all the obtained sub-summaries are spliced ​​according to the order of the parts they belong to in the target text. For a target text with K sub-title parts, the total summary that can be obtained will contain Kb sentences.

[0075] In order to better implement the abstract generation method in the embodiment of the present application, in addition to the abstract generation method, the embodiment of the present application also provides an abstract generation device, such as Figure 4 As shown, the device 300 includes:

[0076] An acquisition module 301 is used to acquire a target text;

[0077] A determination module 302 is used to determine a subtitle tag corresponding to each subtitle in the target text;

[0078] The generating module 303 is used to generate a summary of the target text based on the subtitle tags corresponding to each subtitle.

[0079] The summary generation device provided by the present application first obtains the target text through the acquisition module 301, and then determines through the determination module 302 that the input target text is a text with a specific text structure, and then determines the specific label of each subheading of the input text. For a specific type of text, the content described has similarity, so when generating a summary through the generation module 303, the summary of each subheading can be determined based on the label of each subheading, and then the summary of each subheading is spliced ​​to obtain a summary of the entire text. Therefore, there is no need to analyze the overall characteristics of the text, which reduces the calculation amount of the model.

[0080] In some embodiments of the present application, the determination module 302 is specifically used to:

[0081] determining a target text structure of the target text;

[0082] If the target text structure matches the preset text structure, a subtitle tag corresponding to each subtitle in the target text is determined.

[0083] In some embodiments of the present application, the determination module 302 is specifically used to:

[0084] Determine the number of subheadings for the target text;

[0085] Determine the subheading name for each subheading of the target text;

[0086] Determine the target text structure based on the number of subheadings and the subheading names of each subheading.

[0087] In some embodiments of the present application, the determination module 302 is specifically used to:

[0088] If the target text structure matches the preset text structure, determining subheading features of each subheading in the target text;

[0089] According to the features of each sub-title, the sub-title label corresponding to each sub-title in the target text is determined.

[0090] In some embodiments of the present application, the generation module 303 is specifically used to:

[0091] Determine the summary template corresponding to each subtitle according to the subtitle label corresponding to each subtitle;

[0092] Taking any one of the subtitles as the target subtitle and the summary template corresponding to the target subtitle as the target summary template, determining the similarity score between each sentence in the target subtitle and each summary sentence in the target summary template;

[0093] Determine the sentence with the highest similarity score among all sentences in the target subtitle as the target sentence;

[0094] Generate a summary of the target text based on the target sentence in the target subheading.

[0095] In some embodiments of the present application, the generating module 303 is further used to:

[0096] determining a plurality of sentence features of each target sentence in the target subheading;

[0097] Fusing multiple sentence features of each target sentence to obtain fused sentence features corresponding to each target sentence;

[0098] Based on the fused sentence features corresponding to each target sentence, candidate sentences for generating a summary are obtained;

[0099] Concatenate the candidate sentences to obtain the summary of each target sub-title;

[0100] The summaries of each target subtitle are concatenated to obtain the summary of the target text.

[0101] In some embodiments of the present application, the generating module 303 is further used to:

[0102] Input the fused sentence features corresponding to each target sentence into different preset classifiers for prediction;

[0103] The target sentences predicted by each classifier are determined as candidate sentences for generating a summary.

[0104] In some embodiments of the present application, the apparatus further includes a training module 304, and the training module 304 is specifically used for:

[0105] Acquire multiple groups of sample sentence features for training, each group of sample sentence features including multiple sub-sample sentence features;

[0106] Inputting multiple sub-sample sentence features in each set of sample sentence features into a preset feature fusion encoder respectively to obtain fused sentence features of each set of sample sentence features;

[0107] The fused sentence features of each group of sample sentence features are respectively input into a preset feature decomposition decoder to obtain respective decoding results;

[0108] If each decoding result represents that the feature decomposition decoder restores the fused sentence features to multiple sub-sample sentence features, it is determined that the feature fusion encoder completes the training.

[0109] The present application also provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any one of the methods for generating a summary in the embodiments of the present application. The terminal device integrates any one of the methods for generating a summary provided in the embodiments of the present application, such as Figure 5 As shown, it shows a schematic diagram of the structure of the terminal device involved in the embodiment of the present application, specifically:

[0110] The terminal device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will appreciate that Figure 5 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0111] The processor 401 is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 executes various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. Optionally, the processor 401 may include one or more processing cores; the processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

[0112] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0113] The terminal device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption management and other functions through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0114] The terminal device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0115] Although not shown, the terminal device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the terminal device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, such as:

[0116] Get the target text;

[0117] Determine the subheading label corresponding to each subheading in the target text;

[0118] Generate a summary of the target text based on the subheading labels corresponding to each subheading.

[0119] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0120] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the summary generation methods provided in the embodiments of the present application. For example, the computer program loaded by the processor may execute the following steps:

[0121] Get the target text;

[0122] Determine the subheading label corresponding to each subheading in the target text;

[0123] Generate a summary of the target text based on the subheading labels corresponding to each subheading.

[0124] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.

[0125] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.

[0126] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0127] The above is a detailed introduction to a summary generation method and device provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A method for generating a summary, characterized in that: The method comprises: Get the target text; Determine a subtitle label corresponding to each subtitle in the target text; Based on the subtitle tags corresponding to the subtitles, a summary of the target text is generated.

2. The method for generating a summary according to claim 1, characterized in that: The determining of the subtitle label corresponding to each subtitle in the target text includes: determining a target text structure of the target text; If the target text structure matches the preset text structure, a subtitle tag corresponding to each subtitle in the target text is determined.

3. The method for generating a summary according to claim 2, characterized in that: The step of determining the target text structure of the target text comprises: determining the number of subheadings of the target text; Determine the subheading name of each subheading of the target text; The target text structure is determined according to the number of subheadings and the subheading name of each subheading.

4. The method for generating a summary according to claim 2, characterized in that: If the target text structure matches the preset text structure, determining the subtitle tag corresponding to each subtitle in the target text includes: If the target text structure matches the preset text structure, determining subtitle features of each subtitle in the target text; According to the subtitle features, a subtitle label corresponding to each subtitle in the target text is determined.

5. The method for generating a summary according to claim 1, wherein: The generating a summary of the target text based on the subtitle tags corresponding to the subtitles includes: Determine the summary template corresponding to each subtitle according to the subtitle label corresponding to each subtitle; Taking any one of the subtitles as a target subtitle, and the summary template corresponding to the target subtitle as a target summary template, determining a similarity score between each sentence in the target subtitle and each summary sentence in the target summary template; Determine that the sentence with the highest similarity score among all the sentences in the target subtitle is the target sentence; A summary of the target text is generated according to the target sentence in the target subtitle.

6. The method for generating a summary according to claim 5, characterized in that: The step of generating a summary of the target text according to the target sentence in the target subtitle includes: determining a plurality of sentence features of each target sentence in the target subheading; Fusing the multiple sentence features of each target sentence to obtain a fused sentence feature corresponding to each target sentence; Based on the fused sentence features corresponding to each of the target sentences, a candidate sentence for generating a summary is obtained; Concatenate the candidate sentences to obtain a summary of each target sub-title; The abstracts of the target subtitles are concatenated to obtain a summary of the target text.

7. The method for generating a summary according to claim 6, characterized in that: The step of obtaining candidate sentences for generating a summary based on the fused sentence features corresponding to each of the target sentences includes: Inputting the fused sentence features corresponding to each of the target sentences into different preset classifiers for prediction; The target sentences predicted by each of the classifiers are determined as the candidate sentences for generating a summary.

8. A summary generation device, characterized in that: The device comprises: An acquisition module is used to acquire the target text; A determination module, used to determine a subtitle label corresponding to each subtitle in the target text; A generating module is used to generate a summary of the target text based on the subtitle tags corresponding to each of the subtitles.

9. A terminal device, characterized in that: The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the abstract generation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in the abstract generation method according to any one of claims 1 to 7.