Abstract generation method, apparatus, device, and computer-readable storage medium

By preprocessing and reconstructing the text, and using a graph convolutional neural network model to adjust the manifold regularization term of the graph Laplacian matrix, the target sentences are identified and a summary is generated. This solves the problem of repetition in automatically generated summaries and achieves the accuracy and consistency of the summaries.

CN116795975BActive Publication Date: 2025-11-04CHINA MOBILE GROUP DESIGN INST +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210233103.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-09
Publication Date
2025-11-04
Estimated Expiration
2042-03-09

AI Technical Summary

Technical Problem

Existing technologies tend to generate repetitive summary content when automatically generating summaries, and cannot effectively reduce repetition.

Method used

By preprocessing and reconstructing the text to be used for the summary, text reconstruction data is generated. A graph Laplacian matrix is ​​obtained based on an attention mechanism and input into a graph convolutional neural network model. The manifold regularization term of the graph Laplacian matrix is ​​adjusted to determine the target sentence and generate the summary.

Benefits of technology

It reduces the repetition of abstract content, improves the accuracy and consistency of abstracts, and generates abstracts that meet expectations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116795975B_ABST
    Figure CN116795975B_ABST
Patent Text Reader

Abstract

The application discloses a kind of abstract generation method, device, equipment and computer readable storage medium, method includes: the text to be generated abstract is preprocessed, and the reconstruction result is reconstructed, and text reconstruction data is generated;The graph laplacian matrix of the text reconstruction data is obtained based on attention mechanism, and the graph laplacian matrix, the text reconstruction data input graph convolutional neural network model, and the preliminary classification matrix of word is obtained;According to the preliminary classification matrix, the manifold regularization term of graph laplacian matrix is adjusted, and the classification result of the sentence corresponding to the word is obtained;According to the classification result, determine target sentence, connect the target sentence and generate the abstract of the text.Repeatability of abstract content is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of natural language processing, and particularly relates to a summary generation method and device, equipment and a computer readable storage medium. BACKGROUND

[0002] Automatic summary technology is to automatically extract keywords (or key sentences) from a given original long text, and then organize the extracted keywords (or key sentences) into small texts by certain rules or means to summarize the central idea of the original long text.

[0003] At present, when automatically generating a summary, stop words in the text are deleted through a stop word table, and the text data is encoded based on a structured knowledge graph and an unstructured description text, the similarity of each sentence is measured by a TextRank algorithm, the similarity scores between each sentence in the text are calculated, the obtained sentences are sorted, and the summary information is obtained. The essence of measuring the similarity of each sentence by the TextRank algorithm is to investigate the number of times the same word appears in different sentences, and the more the number of times, the more similar. However, in actual situations, different words can be used to express the same meaning, resulting in a lot of repetitive summary content. SUMMARY

[0004] The main purpose of the present application is to provide a summary generation method, device, equipment and computer readable storage medium, which aims to reduce the repetitiveness of the summary content.

[0005] To achieve the above purpose, the summary generation method provided by the present application comprises the following steps:

[0006] Pretreating the text to be generated summary, and reconstructing the pretreatment result to generate text reconstruction data;

[0007] Obtaining a graph Laplacian matrix of the text reconstruction data based on an attention mechanism, and inputting the graph Laplacian matrix and the text reconstruction data into a graph convolutional neural network model to obtain a preliminary classification matrix of the word;

[0008] Adjusting the manifold regularization term of the graph Laplacian matrix according to the preliminary classification matrix to obtain a classification result of the sentence corresponding to the word;

[0009] Determining a target sentence according to the classification result, and connecting the target sentence to generate a summary of the text.

[0010] Optionally, the step of determining a target sentence according to the classification result and connecting the target sentence to generate a summary of the text comprises:

[0011] acquiring the number of words of each type of sentence in the classification result, and determining a target sentence according to the number of words;

[0012] connecting the target sentence to generate a summary of the text.

[0013] Optionally, the step of determining a target sentence according to the number of words comprises:

[0014] determining the sentence with the most number of words as the target sentence, or determining the sentence with the least number of words as the target sentence;

[0015] The step of connecting the target sentence to generate a summary of the text comprises:

[0016] acquiring a preset number of words for generating the summary, and the number of words of the summary generated by connecting the target sentence;

[0017] when the number of words is greater than the preset number of words, changing the target sentence according to the preset number of words and the number of words;

[0018] when the number of words of the summary generated after the changed target sentence is less than or equal to the preset number of words, determining the current target sentence as the target sentence for generating the summary;

[0019] connecting the target sentence to generate a summary of the text.

[0020] Optionally, the step of preprocessing the text to be generated as a summary comprises:

[0021] dividing the text into different sentences;

[0022] identifying each word in the sentence and determining the attribute of each word;

[0023] generating a text encoding of each word according to the attribute.

[0024] Optionally, the step of dividing the text into different sentences comprises:

[0025] dividing the text into different sentences according to a preset punctuation mark.

[0026] Optionally, the step of generating a text encoding of each word according to the attribute comprises:

[0027] using a feature extraction method to acquire a text encoding of a noun in the text.

[0028] Optionally, the preprocessing result comprises a text encoding of each word to be generated as a summary, and the step of reconstructing the preprocessing result to generate text reconstruction data further comprises:

[0029] The dimensions of the text encoding of each sentence are converted into the same data through a full connection layer to generate text reconstruction data.

[0030] To achieve the above object, the application further provides an abstract generation device, which comprises:

[0031] A preprocessing module is configured to preprocess a text to be abstracted and reconstruct the preprocessing result to generate text reconstruction data.

[0032] A first obtaining module is configured to obtain a graph Laplacian matrix of the text reconstruction data based on an attention mechanism and input the graph Laplacian matrix and the text reconstruction data into a graph convolutional neural network model to obtain a preliminary classification matrix of the words.

[0033] A second obtaining module is configured to adjust a manifold regularization term of the graph Laplacian matrix according to the preliminary classification matrix to obtain a classification result of a sentence corresponding to the words.

[0034] A connecting module is configured to determine a target sentence according to the classification result and connect the target sentence to generate an abstract of the text.

[0035] To achieve the above object, the application further provides an abstract generation device, which comprises a memory, a processor and an abstract generation program stored in the memory and executable on the processor, and the abstract generation program implements each step of the abstract generation method when executed by the processor.

[0036] To achieve the above object, the application further provides a computer readable storage medium, which stores an abstract generation program, and the abstract generation program implements each step of the abstract generation method when executed by a processor.

[0037] The abstract generation method, device, equipment and computer readable storage medium provided by the application preprocess a text to be abstracted and reconstruct the preprocessing result to generate text reconstruction data, obtain a graph Laplacian matrix of the text reconstruction data based on an attention mechanism and input the graph Laplacian matrix and the text reconstruction data into a graph convolutional neural network model to obtain a preliminary classification matrix of the words, adjust a manifold regularization term of the graph Laplacian matrix according to the preliminary classification matrix to obtain a classification result of a sentence corresponding to the words, determine a target sentence according to the classification result and connect the target sentence to generate an abstract of the text. By adjusting the manifold regularization term of the graph Laplacian matrix to adjust the network parameters in the data generation process, the sentences can be accurately classified, the target sentence can be determined in each classification result, and thus the abstract of the text can be obtained, and the repetitiveness of the abstract content is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 A hardware structure schematic diagram of the abstract generation device involved in the embodiment of the present application is shown in the figure;

[0039] Figure 2 A flowchart of the first embodiment of the abstract generation method of the present application is shown in the figure;

[0040] Figure 3 A flowchart of the data reconstruction process of the abstract generation method of the present application is shown in the figure;

[0041] Figure 4 A graph convolutional neural network structure diagram of the abstract generation method of the present application is shown in the figure;

[0042] Figure 5 A detailed flowchart of step S30 of the second embodiment of the abstract generation method of the present application is shown in the figure;

[0043] Figure 6 A module diagram of the abstract generation method of the present application is shown in the figure.

[0044] The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0046] The main solution of the embodiment of the present application is:

[0047] The text to be generated abstract is preprocessed, and the preprocessing result is reconstructed to generate text reconstruction data;

[0048] A graph Laplacian matrix of the text reconstruction data is obtained based on an attention mechanism, and the graph Laplacian matrix and the text reconstruction data are input into a graph convolutional neural network model to obtain a preliminary classification matrix of the word;

[0049] The manifold regularization term of the graph Laplacian matrix is adjusted according to the preliminary classification matrix to obtain a classification result of the sentence corresponding to the word;

[0050] A target sentence is determined according to the classification result, and the target sentence is connected to generate an abstract of the text.

[0051] As an implementation scheme, the abstract generation device can be as shown in the figure. Figure 1

[0052] ​The embodiment of the present application relates to a summary generation device, the summary generation device comprising: a processor 101, such as a CPU, a memory 102, and a communication bus 103. The communication bus 103 is used to realize the connection and communication between the components.

[0053] The memory 102 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. As shown in the figure, the memory 102, as a computer readable storage medium, can include a summary generation program; and the processor 101 can be used to call the summary generation program stored in the memory 102 and perform the following operations: Figure 1

[0054] The text to be generated is preprocessed, and the preprocessing result is reconstructed to generate text reconstruction data;

[0055] A graph Laplacian matrix of the text reconstruction data is obtained based on an attention mechanism, and the graph Laplacian matrix and the text reconstruction data are input into a graph convolutional neural network model to obtain a preliminary classification matrix of the word;

[0056] The manifold regularization term of the graph Laplacian matrix is adjusted according to the preliminary classification matrix to obtain a classification result of a sentence corresponding to the word;

[0057] A target sentence is determined according to the classification result, and the target sentence is connected to generate a summary of the text.

[0058] In an embodiment, the processor 101 can be used to call the summary generation program stored in the memory 102 and perform the following operations:

[0059] The number of words of each type of sentence in the classification result is obtained, and a target sentence is determined according to the number of words;

[0060] The target sentence is connected to generate a summary of the text.

[0061] In an embodiment, the processor 101 can be used to call the summary generation program stored in the memory 102 and perform the following operations:

[0062] The sentence with the most number of words is determined as the target sentence, or the sentence with the least number of words is determined as the target sentence;

[0063] The step of connecting the target sentence to generate a summary of the text comprises:

[0064] A preset number of words for generating the summary is obtained, and the number of words of the summary generated by connecting the target sentence is obtained;

[0065] ​When the number of characters exceeds the preset number of characters, the target statement is modified according to the preset number of characters and the number of characters.

[0066] If the word count of the summary generated after the modified target statement is less than or equal to the preset word count, the current target statement is determined to be the target statement for generating the summary.

[0067] The target statement is concatenated to generate a summary of the text.

[0068] In one embodiment, processor 101 can be used to invoke a digest generation program stored in memory 102 and perform the following operations:

[0069] Divide the text into different sentences;

[0070] Identify each word in the statement and determine the attributes of each word;

[0071] The text encoding of each of the aforementioned words is generated based on the stated attributes.

[0072] In one embodiment, processor 101 can be used to invoke a digest generation program stored in memory 102 and perform the following operations:

[0073] The text is divided into different sentences based on preset punctuation marks.

[0074] In one embodiment, processor 101 can be used to invoke a digest generation program stored in memory 102 and perform the following operations:

[0075] The text encoding of the nouns in the text is obtained using feature extraction methods.

[0076] In one embodiment, processor 101 can be used to invoke a digest generation program stored in memory 102 and perform the following operations:

[0077] Obtain the dimensions of the text encoding for each sentence, and convert the dimensions of the text encoding for each sentence into the same data through a fully connected layer to generate text reconstruction data.

[0078] Automatic summarization technology involves automatically extracting keywords (or key sentences) from a given long original text, and then organizing the extracted keywords (or key sentences) into short text segments using certain rules or methods to summarize the central idea of ​​the original long text.

[0079] Currently, when automatically generating a summary, first, stop words in the text are deleted through a stop word list, and the text data is encoded based on a structured knowledge graph and an unstructured description text, then the similarity of each sentence is measured through a TextRank algorithm, the similarity scores between each sentence in the text are calculated, the obtained sentences are sorted, and summary information is obtained. The essence of measuring the similarity of each sentence through the TextRank algorithm is to investigate the number of times the same word appears in different sentences, and the more the number of times the same word appears, the more similar the sentences are. However, in actual situations, the same meaning can be expressed by different words, resulting in a lot of repetitive summary content.

[0080] Based on the hardware architecture of the above summary generation device, embodiments of the summary generation method of the present application are proposed.

[0081] Reference Figure 2 , Figure 2 For the first embodiment of the summary generation method of the present application, the summary generation method comprises the following steps:

[0082] In step S10, the text to be summarized is preprocessed, and the preprocessing result is reconstructed to generate text reconstruction data.

[0083] The execution subject of the embodiment is a summary generation device.

[0084] The summary generation device obtains the text for which a summary is to be generated, and preprocesses the text. The preprocessing is to convert the characters in the text into a data format for calculation and analysis in the data processing process. In the embodiment, the preprocessing includes text splitting and text encoding.

[0085] Illustratively, the summary generation device obtains the text to be summarized can be obtained by a scanning device, for example, an OCR (Optical Character Recognition) device scans a paper document; of course, the text can also be an electronic version of the text. The application does not limit the way of obtaining the text.

[0086] Optionally, when the summary generation device preprocesses the text to be summarized, the text is divided into different sentences. It can divide the text into different sentences according to the punctuation marks in the text, for example, a comma, a period, an exclamation point, a question mark, etc. in the text divide a paragraph of text into different sentences. In addition, in this embodiment, when processing some special texts, the text can also be divided into different sentences according to the content of the text, and the format of the font can also be recognized, and then the text can be divided into different sentences according to the format of the font. The way of dividing the text is not limited in this embodiment. In the implementation scheme of this embodiment, the text is divided into different sentences according to the punctuation marks, which is conducive to accurately extracting the content of the text and avoiding omission.

[0087] Optionally, in this embodiment, after the text is divided into different sentences, the stop words in each sentence can be deleted through an experience stop word list. The content of the reference stop word list is shown in Table 1:

[0088] Table 1: Reference stop word list (part)

[0089]

[0090] By deleting the stop words in the sentence through the experience stop word list, the stop words can be avoided from entering the summary generation stage, so as to avoid the situation that the generated summary data is redundant.

[0091] Optionally, the summary generation device identifies each word in different sentences, and then determines the attribute of each word.

[0092] For example, the summary generation device identifies the nouns, adjectives, adverbs, verbs, etc. in each sentence. The specific identification method can obtain the word contained in each sentence through a pre-trained recognition network model, and then directly obtain the word contained in each sentence through the recognition network model in the experiment process.

[0093] Further, the summary generation device determines the attribute of each word.

[0094] In this embodiment, the summary generation device can determine the attribute of each word through Table 2: Modern Chinese word list.

[0095] Table 2

[0096]

[0097] In Table 2, the word represents the word that needs to be encoded, and the attribute is the text encoding corresponding to the word.

[0098] Optionally, in this embodiment, for nouns, a feature extraction method is used based on all nouns appearing in the text, for example, One-hot method or TF-IDF for text encoding, which can simply and quickly obtain the text encoding of the noun.

[0099] Exemplarily, in the embodiment, it is determined that there are words A and B in the text, A and B are predicate and adjective respectively, the attributes of A are vice name, overlap and same row, and the attributes of B are attribute, shape, adverbial and object, and then the text codes generated according to the attributes of the words A and B are [0, 1, 1, 0, 0, 0, 1] and [0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0] respectively. In the embodiment, the attributes of the words in each sentence are obtained through the modern Chinese table to realize data coding, the similarity of each word is determined from the semantic, and the accuracy of the sentence classification result is improved, and the accurate extraction of the abstract is realized.

[0100] It can be understood that the length of each sentence in the text is inconsistent, the words contained are different, and the attributes of different words are different. Therefore, different sentences obtain different dimensions of text coding. In the classification process, different dimensions of data coding need to be converted into the same dimension of data coding.

[0101] Optionally, in the embodiment, after obtaining the text coding of each sentence, the dimension of the text coding of each sentence is further obtained, the dimensions of the text coding of each sentence are converted into mutual data through a full connection layer, and the text reconstruction data with consistent dimensions is generated. The process of data reconstruction is shown with reference to Figure 3 .

[0102] wherein X n represents the coding result of the nth sentence, n n represents the dimension of the coding result of the nth sentence. Y represents the text reconstruction data obtained after the text coding is reconstructed, wherein Y1 is the data obtained after the first sentence obtained by text division is reconstructed, Y2 is the data obtained after the second sentence obtained by text division is reconstructed, and Yn is the data obtained after the nth sentence obtained by text division is reconstructed.

[0103] In step S20, a graph Laplacian matrix of the text reconstruction data is obtained based on an attention mechanism, the graph Laplacian matrix and the text reconstruction data are input into a graph convolutional neural network model, and a preliminary classification matrix of the words is obtained.

[0104] The Laplacian matrix is obtained based on the attention mechanism. The calculation method is shown in formula 1:

[0105] e ij =Attention(WY i ,WY j ) (1)

[0106] wherein W is a parameter matrix, Y i , Y j represents the ith and jth reconstructed data, eij This represents the relationship between two data points. By performing the same calculations on the reconstructed data point i and all other data points, the relationship between the i-th data point and all other data points can be obtained. Then, by using the softmax function, the relationship is transformed into a probability space, yielding the correlation between the i-th and j-th data points in the entire dataset. The specific calculation is shown in Equation 2:

[0107] Where, α ij This represents the weights of the i-th and j-th data points in the entire data space, where α represents the weights of the data points when i = j. ij =0.

[0108] It should be noted that the AttentionO function used in this invention is shown in Equation 3:

[0109] Attention (WY) i WY j = LeakRelu(a T [WY i ||WY j (3)

[0110] Where LeakRelu() represents the activation function, and 'a' represents the parameter vector with dimensions WY. i Twice the dimension. || indicates concatenating two data vectors.

[0111] Finally, calculate α ij As shown in Equation 4:

[0112]

[0113] Then, all α ij Represented by matrix S, S is then expressed as shown in Equation 5:

[0114]

[0115] Because in calculating α ij Since the calculation results differ for each row, matrix S is a non-diagonal matrix and cannot be used as an affinity matrix. Therefore, matrix S is linearly transformed as shown in Equation 6 to obtain A′, and then all diagonal elements are converted to 0. As shown in Equation 7, the final affinity matrix A can be obtained.

[0116] A′=exp(SS T (6)

[0117]

[0118] Where A′ij Let A' be the element in the i-th row and j-th column of matrix A'. ij Let represent the element in the i-th row and j-th column of matrix A.

[0119] Furthermore, the Thulaplace matrix is ​​derived from the affinity matrix A using Equation 8.

[0120] L = DA (8)

[0121] Where D is a matrix whose elements are all zero except for the diagonal elements, and its dimension is the same as that of the affinity matrix A. The values ​​of the diagonal elements are shown in Equation 9:

[0122]

[0123] Reference Figure 4 ,Depend on Figure 4 It can be seen that the graph convolutional neural network model uses a two-layer convolutional neural network, in which, I represents the identity matrix. Its convolution process is shown in equations 10 and 11:

[0124]

[0125] Here, f() represents the activation function, which is the ReLU function. W 1 W 2 These represent the parameter matrices connecting to the upper layers. The final convolutional layer transforms the output into a probability space using the softmax function. Its output is the initial classification matrix F.

[0126] Step S30: Adjust the manifold regularization term of the graph Laplacian matrix according to the preliminary classification matrix to obtain the classification result of the sentences corresponding to the words;

[0127] Furthermore, the label diffusion process optimizes all network parameters using block coordinate descent and gradient descent algorithms through a cost function. The parameters to be optimized include all parameter matrices W1...W involved in the fully connected neural network during data reconstruction. n The figure shows the parameter matrix W and parameter vector a in the network. (Figure: Parameter matrix W in the convolutional neural network) 1 W 2 .

[0128] Its cost function is shown in Equation 12:

[0129]

[0130] Where, q irepresents the class to which the i-th labeled data belongs, and a is a hyperparameter, which functions to adjust the influence of the manifold regularization term on the optimization process, and takes a value in the range of 0-1.

[0131] In the embodiment, the preliminary classification matrix adjusts the manifold regularization term of the graph Laplacian matrix and the network parameters in the process of generating the classification matrix, so that accurate network parameters can be obtained, and the classification result of the sentence corresponding to the word is obtained.

[0132] In step S40, the target sentence is determined according to the classification result, and the summary of the text is generated by connecting the target sentence.

[0133] In the embodiment, after the classification result is determined, the target sentence is determined in each classification result, and then the summary of the text is generated by connecting.

[0134] In the embodiment, the text to be generated is preprocessed, and the preprocessing result is reconstructed to generate text reconstruction data. The graph Laplacian matrix of the text reconstruction data is obtained based on the attention mechanism. The graph Laplacian matrix and the text reconstruction data are input into the graph convolutional neural network model to obtain the preliminary classification matrix of the word. The manifold regularization term of the graph Laplacian matrix is adjusted according to the preliminary classification matrix, and the classification result of the sentence corresponding to the word is obtained. The target sentence is determined according to the classification result, and the summary of the text is generated by connecting the target sentence. By adjusting the manifold regularization term of the graph Laplacian matrix to adjust the network parameters in the data generation process, the sentences can be accurately classified, and then the target sentence is determined in each classification result, and then the summary of the text is obtained, and the repetition of the summary content is reduced.

[0135] Reference Figure 5 , Figure 5 Another embodiment of the summary generation method of the present application is provided, and the step S30 comprises:

[0136] In step S31, the number of words of each type of sentence in the classification result is obtained, and the target sentence is determined according to the number of words.

[0137] In step S32, the summary of the text is generated by connecting the target sentence.

[0138] In the embodiment, after the classification result of the sentence is obtained, the number of words of each type of sentence is determined in the sentence classification result, the target sentence is determined according to the number of words, and then the summary is generated by connecting the target sentence. The summary meeting the expectation is obtained.

[0139] Optionally, in the embodiment, the sentence with the least number of words in each type of sentence classification result can be determined as the target sentence, and then the summary is generated by connecting the target sentence. The summary is generated according to the sentence with the least number of words, and the redundancy of generating the summary is reduced.

[0140] Optionally, in the embodiment, the sentence with the most number of words is also determined as the target sentence, and then the summary is generated.

[0141] For example, in the present application, a preset number of words is obtained, which is a limit value of the number of words set by the user for generating a summary. In the process of generating the summary, the number of words of all target sentences for generating the summary is obtained, and then the number of words is compared with the preset number of words. When it is determined that the number of words is greater than the preset number of words, the target sentence is changed according to the preset number of words and the number of words. For example, a certain target sentence is changed. When the number of words of the summary generated after the change of the target sentence is less than or equal to the preset number of words, the current target sentence is determined as the target sentence for generating the summary, and the summary of the text is generated by connecting the target sentences. By comparing the number of words of the generated summary with the preset number of words, the target sentence is adjusted, and the summary meeting the expectation is generated.

[0142] The present application also provides a summary generation device, which comprises:

[0143] A preprocessing module 10 is configured to preprocess a text to be summarized and reconstruct the preprocessing result to generate text reconstruction data.

[0144] A first obtaining module 20 is configured to obtain a graph Laplacian matrix of the text reconstruction data based on an attention mechanism, and input the graph Laplacian matrix and the text reconstruction data into a graph convolutional neural network model to obtain a preliminary classification matrix of the words.

[0145] A second obtaining module 30 is configured to adjust a manifold regularization term of the graph Laplacian matrix according to the preliminary classification matrix to obtain a classification result of the sentences corresponding to the words.

[0146] A connecting module 40 is configured to determine target sentences according to the classification result and connect the target sentences to generate a summary of the text.

[0147] The present application also provides a summary generation device, which comprises a memory, a processor, and a summary generation program stored in the memory and executable on the processor. When the summary generation program is executed by the processor, the steps of the summary generation method described in the above embodiments are implemented.

[0148] The present application also provides a computer readable storage medium, which stores a summary generation program. When the summary generation program is executed by a processor, the steps of the summary generation method described in the above embodiments are implemented.

[0149] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0150] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, system, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, system, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, system, article, or apparatus that comprises the element.

[0151] Through the above description of the embodiments, the skilled in the art can clearly understand that the above-mentioned embodiment system can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a computer readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for making a terminal device (which can be a mobile phone, computer, parking management device, air conditioner, or network device, etc.) execute the system described in each embodiment of the present application.

[0152] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation made by using the content of the present application specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for generating summaries, characterized in that, The summary generation method includes: The text to be used for generating a summary is preprocessed, and the preprocessing results are reconstructed to generate text reconstruction data. In this process, the dimensions of the text encoding of each sentence are obtained, and the dimensions of the text encoding of each sentence are converted into the same data through a fully connected layer to generate text reconstruction data. The preprocessing results include the text encoding of each word in the summary to be generated. The graph Laplacian matrix of the reconstructed text data is obtained based on the attention mechanism, and the graph Laplacian matrix and the reconstructed text data are input into a graph convolutional neural network model to obtain a preliminary word classification matrix. Based on the preliminary classification matrix, the manifold regularization term of the graph Laplacian matrix is ​​adjusted using a cost function to obtain the classification result of the sentences corresponding to the words. The cost function is shown in the following formula: Where, q i Let represent the category to which the i-th labeled data belongs, α represent the hyperparameter, F represent the preliminary classification matrix, and L represent the graph Laplacian matrix; The target statement is determined based on the classification results, and the target statement is then concatenated to generate a summary of the text.

2. The abstract generation method as described in claim 1, characterized in that, The step of determining the target statement based on the classification result and concatenating the target statement to generate a summary of the text includes: Obtain the word count of each type of statement in the classification results, and determine the target statement based on the word count; The target statement is concatenated to generate a summary of the text.

3. The abstract generation method as described in claim 2, characterized in that, The step of determining the target statement based on the word count includes: The statement with the most words is selected as the target statement, or the statement with the fewest words is selected as the target statement. The step of connecting the target statement to generate a summary of the text includes: Obtain the preset word count for generating the summary, and the word count for the summary generated by connecting the target statement; When the number of characters exceeds the preset number of characters, the target statement is modified according to the preset number of characters and the number of characters. If the word count of the summary generated after the modified target statement is less than or equal to the preset word count, the current target statement is determined to be the target statement for generating the summary. The target statement is concatenated to generate a summary of the text.

4. The abstract generation method as described in claim 1, characterized in that, The preprocessing steps for the text to be used to generate a summary include: Divide the text into different sentences; Identify each word in the statement and determine the attributes of each word; The text encoding of each of the aforementioned words is generated based on the stated attributes.

5. The abstract generation method as described in claim 4, characterized in that, The step of dividing the text into different sentences includes: The text is divided into different sentences based on preset punctuation marks.

6. The abstract generation method as described in claim 4, characterized in that, The step of generating text codes for each word based on the attributes includes: The text encoding of the nouns in the text is obtained using feature extraction methods.

7. A summary generation apparatus, characterized in that, The summary generation device includes: The preprocessing module is used to preprocess the text to be used for the summary and to reconstruct the preprocessing results to generate text reconstruction data. Specifically, it obtains the dimension of the text encoding of each sentence and converts the dimension of the text encoding of each sentence into the same data through a fully connected layer to generate text reconstruction data. The preprocessing results include the text encoding of each word in the summary to be generated. The first module is used to obtain the graph Laplacian matrix of the text reconstruction data based on the attention mechanism, and input the graph Laplacian matrix and the text reconstruction data into the graph convolutional neural network model to obtain the preliminary word classification matrix; The second module is used to adjust the manifold regularization term of the graph Laplacian matrix according to the preliminary classification matrix through a cost function to obtain the classification result of the sentences corresponding to the words. The cost function is shown in the following formula: Where, q i Let represent the category to which the i-th labeled data belongs, α represent the hyperparameter, F represent the preliminary classification matrix, and L represent the graph Laplacian matrix; The connection module is used to determine the target statement based on the classification result and connect the target statement to generate a summary of the text.

8. A summary generation device, characterized in that, The digest generation device includes a memory, a processor, and a digest generation program stored in the memory and executable on the processor, wherein the digest generation program, when executed by the processor, implements the steps of the digest generation method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a digest generation program, which, when executed by a processor, implements the steps of the digest generation method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Case public opinion abstract generation method based on case element sentence association graph convolution

    CN111339754A

  • Data classification method and device based on unified optimization target framework graph neural network

    CN112733933A

  • Text classification method based on graph convolutional neural network with self-attention mechanism

    CN112765352A