Generative abstract method and system based on BERT vectorization and dependency syntax
By combining BERT vectorization and dependency syntax analysis technology, using the BiLSTM model and beam search algorithm, the problem of high complexity of the generative summary model and difficulty in capturing key information is solved, and the quality and coherence of the text summary are improved.
Patent Information
- Application Number
- CN202410654697.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-05-24
AI Technical Summary
Existing generative summary models are highly complex and difficult to capture key information, resulting in low summary quality.
Adopt a generative summary method based on BERT vectorization and dependency syntax, obtain sentence feature vectors through the BERT model, perform syntactic dependency analysis combined with the LTP model, construct a dependency type matrix and an adjacency matrix, and perform attention weight calculation and fusion, using the BiLSTM model The encoder and decoder generate summaries and optimize the decoding process through beam search.
It improves the quality and coherence of text summaries, effectively captures the deep semantics and global information of the text, and generates more accurate and general summaries.
Smart Images

Figure CN118673133A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text summarization, and in particular to a generative summarization method and system based on BERT vectorization and dependency syntax. Background Art
[0002] Text summarization technology uses machine learning and deep learning algorithms to automatically refine long texts into concise, clear and easy-to-understand summaries. Generative summaries can understand the text content more deeply and learn the complex mapping relationship from the original text to the summary. Therefore, the generated summary can more accurately summarize the main idea of the original text while retaining key details, and the generated summary has higher quality.
[0003] However, generative summaries in existing technologies also face problems such as high model complexity and difficulty in capturing key information.
[0004] In view of this, the present invention is proposed. Summary of the invention
[0005] In view of this, the present invention discloses a generative summarization method and system based on BERT vectorization and dependency syntax to improve the summary quality of text summarization tasks.
[0006] Specifically, the present invention is achieved through the following technical solutions:
[0007] The present invention provides a generative summarization method based on BERT vectorization and dependency syntax, comprising the following steps:
[0008] Connect the original text and summary text to the BERT pre-training model to obtain the sentence feature vector;
[0009] The original text and summary text are subjected to syntactic dependency analysis using the LTP model to construct dependency type matrix and adjacency matrix;
[0010] Attention weights are calculated for the dependency type matrix and the adjacency matrix, and the resultant vectors are fused with the acquired sentence feature vectors to obtain a multi-granularity feature semantic intermediate vector;
[0011] The sentence feature vector is used as the input sequence, and the output sequence is obtained by encoding using the encoder with the network structure of the BiLSTM model;
[0012] The multi-granularity feature semantic intermediate vector and the output sequence are concatenated and input into the decoder of the BiLSTM model to generate a result sequence, and a beam search is used to generate a final text summary.
[0013] Specifically, the technical solution of the present invention mainly includes the following steps:
[0014] (1) The original text and summary text are connected to the Chinese BERT pre-trained model. The model inserts a [CLS] tag at the beginning of each sentence and a [SEP] tag at the end of the sentence. For a training batch of original text Q1 = (Q11, Q12, ... Q1 N ) and summary text Q2=(Q21,Q22,...Q2 N ), the corresponding vectorization result obtained by the BERT model is E1=(E11,E12,...E1 N ) and E2=(E21,E22,...E2 N );
[0015] (2) Construct syntactic features of the original text and summary text. Specifically, first, use LTP to perform syntactic dependency analysis, and obtain a dependency syntactic tree based on the dependency relationship between each word in the sentence. Then, parse the syntactic dependency tree to generate the association matrix M and the dependency type matrix M_Type. Subsequently, M and M_Type are input into GCN to calculate the attention weight. The attention weight formula between nodes i and j in the l-th layer GCN is Among them, m i,j is the value corresponding to i and j in the incidence matrix, and “·” represents the vector inner product. It is calculated by the node i, j dependency type matrix and GCN vector, and the formula is in represents the corresponding vector representation in the dependency type matrix, Represents the vector representation of node i in the l-1 layer GCN. Next, use the l-layer graph convolutional neural network combined with the obtained attention weights To process graph structure data, the formula is: Among them, σ represents the ReLU activation function, W (l) and b (l) Represent the trainable matrix and bias term of the lth layer respectively, Output of the GCN at layer l-1 Vector representation of dependency matrix In order to further integrate word features and syntactic information, the output of the graph convolutional neural network is fused with the sentence vector feature E in (1) by vector concatenation. Finally, a semantic vector h that combines multi-granular features is obtained;
[0016] (3) The encoder network structure is a BiLSTM model. The forward propagation LSTM layer and the backward propagation LSTM layer accept the vectorized result E as the input sequence and obtain the forward and backward hidden states h of the BiLSTM at time t. t and h t ′, and then perform vector fusion on it, the formula is st =g(w1h t +w2h t ′), w represents the weight parameter of each layer. Finally, the encoder output sequence C is obtained;
[0017] (4) The decoder of the model adopts the BiLSTM network structure. At the same time, in order to make the decoder reasonably use the intermediate semantic information generated by the encoder when generating prediction results, the Attention mechanism is introduced. The multi-granular feature semantic vector h obtained in (2) and the encoder output sequence C in (3) are concatenated and input into the decoder. The decoder first inputs the hidden layer state h according to the model. j Calculate the attention mechanism, the formula is Among them, s t-1 represents the hidden layer state of the decoder at time t-1, h j represents the hidden layer state of the encoder at all times, and α(·) is an alignment model based on a nonlinear function. Based on the calculated attention weights, the encoder’s hidden layer vectors (h1,h2,...,h n ) and attention weight α ij The weighted summation gives the semantic vector C i Finally, based on the semantic vector C i , information interaction is achieved through the attention mechanism and the result sequence of the nth word is predicted. The formula is Among them, g(·) represents the LSTM prediction function, H f and H b They represent the result sequences generated by the L2R decoder and the R2L decoder respectively. Represents the prediction result of the decoder's nth word. When the attention mechanism is used as a feature to combine H f and H b To predict the nth word, the formula is In the decoder, Q = H f ,K=V=H b ;
[0018] (5) Finally, beam search is used to generate the final text summary. The beam search uses the output prediction results of the bidirectional decoder as input. The algorithm can record the top-k results with the highest prediction probability in both directions at each moment, and finally select the result with the highest probability as the summary.
[0019] In addition, the present invention also provides a generative summary system based on BERT vectorization and dependency syntax, which specifically includes:
[0020] Acquisition module: used to connect the original text and summary text to the BERT pre-training model to obtain sentence feature vectors;
[0021] Construction module: used to perform syntactic dependency analysis on the original text and summary text using the LTP model, and to construct dependency type matrix and adjacency matrix;
[0022] Fusion module: used to calculate the attention weights of the dependency type matrix and the adjacency matrix, and fuse them with the acquired sentence feature vector to obtain a multi-granularity feature semantic intermediate vector;
[0023] Output module: used to take the sentence feature vector as the input sequence and encode it using the encoder with the network structure of BiLSTM model to obtain the output sequence;
[0024] Generation module: used for splicing the multi-granularity feature semantic intermediate vector and the output sequence into the decoder of the BiLSTM model to generate a result sequence, and using beam search to generate the final text summary.
[0025] The present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed, the steps of the generative summarization method are implemented.
[0026] The present invention provides a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the generative summary method are implemented when the processor executes the program.
[0027] In summary, the generative summary method and system provided by the present invention first use the BERT model to capture the global semantic features of the text in the feature construction stage of the model, and extract syntactic structure information through dependency syntactic analysis technology. Furthermore, the model integrates the attention mechanism and the graph convolutional neural network to achieve an effective fusion of syntactic features and BERT features, thereby improving the model's ability to represent the deep semantics of the text and its in-depth understanding of the global information of the text. In addition, a bidirectional decoding structure is used for forward and backward semantic analysis in the decoding stage, which effectively alleviates the problem of accumulated deviations of the unidirectional decoding structure when understanding the full text, thereby improving the coherence of the summary and the generalization of the full text, and ultimately achieving the purpose of improving the summary quality of the text summary task. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Various other advantages and benefits will become apparent to those skilled in the art by reading the following detailed description of the preferred embodiments. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. The same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0029] Figure 1 It is a diagram of the algorithm structure involved in the embodiment of the present invention;
[0030] Figure 2 It is a flow chart of the algorithm involved in the embodiment of the present invention;
[0031] Figure 3 A flowchart of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0033] The terms used in the present disclosure are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure. The singular forms "a", "said" and "the" used in the present disclosure and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0034] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" used herein may be interpreted as "at the time" or "when" or "in response to determining",
[0035] Example
[0036] (1) Overall structure of the model in the present invention:
[0037] The overall structure of the model in the embodiment of the present invention is as follows: Figure 1 As shown, the whole is divided into three modules. The algorithm flow in the embodiment of the present invention is as follows Figure 2As shown. In the feature construction module, the original text and summary are used as input. First, a global vectorized representation is obtained through the BERT model. Then, the text sentence is parsed into a set of relationship triplets through dependency syntactic analysis (that is, if there are two nodes with label types, it is parsed as (head, type, tail)). Then, these relationship triplets are converted into the form of association matrix and dependency type matrix, and the graph convolutional neural network and attention mechanism are used to obtain the syntactic features in the dependency syntactic tree. In the Seq2Seq module based on bidirectional decoding, the encoder and decoder modules take the fusion results of syntactic features and BERT vectorization as input. First, the encoder is used to extract key information. Then, the decoder uses bidirectional decoding to fuse the decoding results of the two directions during prediction. Through bidirectional decoding, the model can more accurately capture the key information in the text and generate a more accurate, coherent and general summary. In the beam search algorithm module, first, the model takes the output prediction results of the bidirectional decoder as input. Then, the model adopts the beam search algorithm, which can record the top-k results with the highest prediction probabilities in both directions at each moment, and finally selects the result with the highest probability as the summary.
[0038] (2) BERT vectorization:
[0039] BERT conditions all layers together in a bidirectional context and pre-trains deep bidirectional representations, so that it can fully consider word information, position information, and context information when understanding text, so that the model can more accurately understand the meaning of each word in the text and effectively solve the problem of polysemy. In the present invention, BERT is used as a baseline model for preliminary extraction of Chinese text features. The text is input into the BERT preprocessing model. The model inserts a [CLS] tag at the beginning of each sentence and adds a [SEP] tag at the end of the sentence. The corresponding vectorization result obtained by the Pooler_out output layer vector of the BERT model is E1=(E11, E12, ... E1 N ) and E2=(E21,E22,...E2 N ), the formula description is shown in (1)(2).
[0040] E1=[BERT([S1])] Pooler_out (1);
[0041] E2=[BERT([S2])] Pooler_out (2);
[0042] (3) Syntactic feature construction:
[0043] The syntactic feature construction adopts the LTP method for syntactic dependency analysis. Specifically, first, a dependency syntactic tree is obtained based on the dependency relationship between each word in the sentence. Then, the syntactic dependency tree is parsed to generate an association matrix and a dependency type matrix. In the association matrix M, if there is a dependency relationship between two words, the corresponding position in the matrix is marked as 1; otherwise, it is marked as 0; the construction of the dependency type matrix M_Type is also based on the dependency relationship between words. For words with a dependency relationship, the corresponding position in the M_Type matrix is set to the specific type between the words.
[0044] Next, the word feature vectors, association matrix, and dependency type matrix of the text are integrated into a unified graph structure. In this graph structure, the feature vector corresponding to each word is represented as the value of the node. At the same time, the weight information of the connecting edge between nodes is composed of the attribute values of the corresponding positions of the association matrix and the dependency type matrix. Subsequently, this graph structure data is input into the attention mechanism and the graph convolutional neural network (GCN) for attention weight calculation. Specifically, the calculation of the attention weight between nodes i and j in the l-th layer of the graph neural network is shown in (3).
[0045]
[0046] Among them, m i,j is the value corresponding to i and j in the incidence matrix, and “·” represents the vector inner product. It is calculated from the dependency type matrix and GCN vector of nodes i and j. The specific calculation is shown in formulas (4) and (5).
[0047]
[0048] in represents the corresponding vector representation in the dependency type matrix, Represents the vector representation of node i in the l-1th layer of GCN.
[0049] Next, we use a l-layer graph convolutional neural network combined with the obtained attention weights Process the graph structure data. The calculation is shown in formula (6).
[0050]
[0051] Among them, σ represents the ReLU activation function, W (l) and b (l) Represent the trainable matrix and bias term of the lth layer respectively, Output of the GCN at layer l-1 Vector representation of dependency matrix Calculated as shown in formula (7).
[0052]
[0053] Among them, the matrix The role of Mapped to The same dimension is used to ensure that the two are compatible and match each other in subsequent operations.
[0054] After the operation of the graph convolutional neural network, the intermediate vector representation is obtained. In order to further integrate word features and syntactic information, the intermediate vector is fused with the sentence feature E in the form of vector splicing. In this way, a semantic vector h that integrates multi-granular features is obtained. This vector not only contains information at the word level, but also incorporates deep information of the syntactic structure, thereby more comprehensively representing the intrinsic meaning of the text.
[0055] (4) Seq2Seq module encoder part based on bidirectional decoding:
[0056] The encoder is a BiLSTM network, which consists of a forward LSTM layer and a reverse LSTM layer. The vectorized result E is accepted as the input sequence. First, the forward LSTM layer processes the input data in the order from front to back of the sequence. At each time step, it considers the current input and the hidden state of the previous time step, and then calculates and outputs the hidden state of the current time step. Similarly, the reverse LSTM layer processes the same input data in the order from back to front of the sequence. Subsequently, the hidden states output by the forward LSTM and the reverse LSTM at the same time step are concatenated to obtain the bidirectional hidden state of the time step, as shown in formulas (8)(9)(10).
[0057] h t =f(w1e t +w2h t-1 )(8);
[0058] h t ′=f(w3e t +w5h t ' -1 )(9);
[0059] s t =g(w4h t +w6h t ′)(10);
[0060] Among them, h t and h t ′ represents the forward and reverse hidden states of BiLSTM at time t, e t represents the input at time t, s t Indicates that at time t, t and ht ′The result after vector fusion. Represents the weight parameters of each layer.
[0061] (5) Seq2Seq module decoder part based on bidirectional decoding:
[0062] The decoder is a BiLSTM network with an attention mechanism. The main task of the decoder is to generate the target sequence based on the output of the BiLSTM encoder. Specifically, during the decoding process, the BiLSTM decoder combines the output of the encoder C = (c1, c2..., c n ), internal state, the output of the previous time step, and the multi-granularity feature semantic vector h, and gradually generates each element of the target sequence. At each time step t, the decoder updates its internal state and predicts the output of the next time step based on the current state, input, and possible other information.
[0063] In addition, in order to further improve the performance, the BiLSTM decoder introduces the attention mechanism. The introduction of this mechanism enables the decoder to pay different attention to different parts of the input sequence according to the attention weights of different words when generating each output, thereby more accurately capturing the corresponding relationship between input and output, as shown in (11) and (12).
[0064]
[0065] e ij =α(s i-1 ,h j )(12);
[0066] Among them, s t-1 represents the hidden layer state of the decoder at time t-1, h j represents the hidden layer state of the encoder at all times, and α(·) is an alignment model based on a nonlinear function.
[0067] Based on the calculated attention weights, the encoder's hidden layer vectors (h1,h2,...,h n ) and attention weight α ij The weighted summation gives the semantic vector C i , as shown in (13):
[0068]
[0069] Based on the semantic vector C i, bidirectional decoding begins, and the process is performed in parallel by the forward (L2R) decoder and the backward (R2L) decoder. When each decoder generates a new result, it not only considers the previously generated result, but also the results generated by other decoders. Finally, the two decoders achieve information exchange through the attention mechanism and predict the result sequence of the nth word, as shown in (14), (15), and (16):
[0070]
[0071]
[0072] Among them, g(·) represents the LSTM prediction function, H f and H b They represent the result sequences generated by the L2R decoder and the R2L decoder respectively. and Represent the prediction results of the nth word of the L2R decoder and the R2L decoder respectively. When the attention mechanism is used as a feature to combine H f and H b To predict the nth word, the formula is shown in 4-14, and Q = H is satisfied in the L2R decoder. f ,K=V=H b , while in the R2L decoder Q=H b ,K=V=H f .
[0073] In summary, the technical effects of the present invention are as follows: a generative summary model integrating BERT vectorization and dependency syntactic information is designed in the invention, which solves the problems of insufficient accuracy of sentence-level vocabulary understanding and insufficient use of syntactic information in generative summary technology; the BERT model is used to capture the global semantic features of the text, and the syntactic structure information is extracted through dependency syntactic analysis technology. Furthermore, the model integrates the attention mechanism and graph convolutional neural network to achieve an effective fusion of syntactic features and BERT features, thereby enhancing the model's deep representation capabilities for text semantics. Ultimately, the purpose of improving the quality of text summaries is achieved.
[0074] The present invention also provides a generative summary system, which specifically includes:
[0075] Acquisition module: used to connect the original text and summary text to the BERT pre-training model to obtain sentence feature vectors;
[0076] Construction module: used to perform syntactic dependency analysis on the original text and summary text using the LTP model, and to construct dependency type matrix and adjacency matrix;
[0077] Fusion module: used to calculate the attention weights of the dependency type matrix and the adjacency matrix, and fuse them with the acquired sentence feature vector to obtain a multi-granularity feature semantic intermediate vector;
[0078] Output module: used to take the sentence feature vector as the input sequence and encode it using the encoder with the network structure of BiLSTM model to obtain the output sequence;
[0079] Generation module: used for splicing the multi-granularity feature semantic intermediate vector and the output sequence into the decoder of the BiLSTM model to generate a result sequence, and using beam search to generate the final text summary.
[0080] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0081] Figure 3 This is a schematic diagram of the structure of a computer device disclosed in the present invention. Figure 3 As shown, the computer device 400 at least includes a memory 402 and a processor 401; the memory 402 is connected to the processor via a communication bus 403, and is used to store computer instructions executable by the processor 401, and the processor 401 is used to read computer instructions from the memory 402 to implement the steps of the generative summary method described in any of the above embodiments.
[0082] For the above-mentioned device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0083] Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including, for example, semiconductor memory devices (e.g., EPROM, EEPROM and flash memory devices), magnetic disks (e.g., internal disks or removable disks), magneto-optical disks, and CD ROM and DVD-ROM disks. The processor and memory may be supplemented by, or incorporated in, special purpose logic circuits.
[0084] Finally, it should be noted that although this specification contains many specific implementation details, these should not be interpreted as limiting the scope of any invention or the scope of protection claimed, but are mainly used to describe the features of specific embodiments of specific inventions. Certain features described in multiple embodiments within this specification may also be implemented in combination in a single embodiment. On the other hand, the various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may work in certain combinations as described above and even initially claimed as such, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may point to a sub-combination or a variation of a sub-combination.
[0085] Similarly, although operations are depicted in a particular order in the accompanying drawings, this should not be understood as requiring that these operations be performed in the particular order shown or performed sequentially, or requiring that all illustrated operations be performed to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of various system modules and components in the above-described embodiments should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product, or packaged into multiple software products.
[0086] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired results. In some implementations, multitasking and parallel processing may be advantageous.
[0087] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. A generative summarization method based on BERT vectorization and dependency syntax, characterized in that: The steps include: Connect the original text and summary text to the BERT pre-training model to obtain the sentence feature vector; The original text and summary text are subjected to syntactic dependency analysis using the LTP model to construct dependency type matrix and adjacency matrix; Attention weights are calculated for the dependency type matrix and the adjacency matrix, and the resultant vectors are fused with the acquired sentence feature vectors to obtain a multi-granularity feature semantic intermediate vector; The sentence feature vector is used as the input sequence, and the output sequence is obtained by encoding using the encoder with the network structure of the BiLSTM model; The multi-granularity feature semantic intermediate vector and the output sequence are concatenated and input into the decoder of the BiLSTM model to generate a result sequence, and a beam search is used to generate a final text summary.
2. The generative summarization method according to claim 1, characterized in that: The method for obtaining a sentence feature vector includes the following steps: Insert a [CLS] tag at the beginning of each sentence in the source text and summary text, and add a [SEP] tag at the end of the sentence; For a training batch of original text Q1 = (Q11, Q12, ... Q1 N ) and summary text Q2=(Q21,Q22,...Q2 N ), the corresponding vectorization results obtained by the BERT model are E1=(E11,E12,...E1 N ) and E2=(E21,E22,...E2 N ).
3. The generative summarization method according to claim 1, characterized in that: The syntactic dependency analysis is to obtain the dependency syntactic tree according to the dependency relationship between each word in the sentence, and parse the syntactic dependency tree to generate the dependency type matrix and adjacency matrix.
4. The generative summarization method according to claim 1, characterized in that: The method for calculating the attention weight comprises the following steps: The adjacency matrix M and the dependency type matrix M_Type are input into GCN to calculate the attention weight. The attention weight formula between nodes i and j in the l-th layer GCN is: Among them, m i,j is the value corresponding to i and j in the incidence matrix, "·" represents the vector inner product, It is calculated by the node i, j dependency type matrix and GCN vector, and the formula is in represents the corresponding vector representation in the dependency type matrix, Represents the vector representation of node i in the l-1 layer GCN; Use l-layer graph convolutional neural network combined with the obtained attention weights To process graph structure data, the formula is: Among them, σ represents the ReLU activation function, W (l) and b (l) Represent the trainable matrix and bias term of the lth layer respectively, Output of the GCN at layer l-1 Vector representation of dependency matrix Calculated.
5. The generative summarization method according to claim 4, characterized in that: The method for obtaining the output sequence comprises the following steps: The forward propagation LSTM layer and the back propagation LSTM layer of the encoder accept the sentence feature vector E as the input sequence and obtain the forward and reverse hidden states h of the BiLSTM at time t. t and h′ t , and then perform vector fusion, the formula is s t =g(w1h t +w2h′ t ), w represents the weight parameter of each layer, and the encoder output sequence C is obtained.
6. The generative summarization method according to claim 5, characterized in that: The method for splicing the multi-granularity feature semantic intermediate vector and the output sequence and inputting the decoder of the BiLSTM model to generate a result sequence comprises the following steps: Introducing the Attention mechanism, the decoder inputs the hidden layer state h according to the model j Calculate the attention mechanism, the formula is e ij =α(s i-1 ,h j ), Among them, s t-1 represents the hidden layer state of the decoder at time t-1, h j represents the hidden layer state of the encoder at all times, and α(·) is an alignment model based on a nonlinear function; By transforming the encoder’s hidden layer vector (h1,h2,...,h n ) and attention weight α ij The weighted summation gives the semantic vector C i ; Based on the semantic vector C i The information interaction is realized through the attention mechanism and the result sequence of the nth word is predicted based on it. The formula is: Among them, g(·) represents the LSTM prediction function, H f and H b Represent the result sequences generated by the L2R decoder and the R2L decoder respectively, Represents the prediction result of the decoder for the nth word; When using the attention mechanism as a feature to combine H during decoding f and H b To predict the nth word, the formula is In the decoder, Q = H f ,K=V=H b .
7. The generative summarization method according to claim 1, characterized in that: The beam search method comprises the following steps: taking the result sequence generated by the decoder as input, recording the top-k results with the highest prediction probabilities in two directions at each moment, and finally selecting the result with the highest probability as a summary.
8. A system corresponding to the generative summarization method according to any one of claims 1 to 7, comprising: Acquisition module: used to connect the original text and summary text to the BERT pre-training model to obtain sentence feature vectors; Construction module: used to perform syntactic dependency analysis on the original text and summary text using the LTP model, and to construct dependency type matrix and adjacency matrix; Fusion module: used to calculate the attention weights of the dependency type matrix and the adjacency matrix, and fuse them with the acquired sentence feature vector to obtain a multi-granularity feature semantic intermediate vector; Output module: used to take the sentence feature vector as the input sequence and encode it using the encoder with the network structure of BiLSTM model to obtain the output sequence; Generation module: used for splicing the multi-granularity feature semantic intermediate vector and the output sequence into the decoder of the BiLSTM model to generate a result sequence, and using beam search to generate the final text summary.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed, the steps of the generative summarization method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the generative summarization method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Text abstract generation method and device based on semantic chunks, equipment and storage medium
CN113987169A
Entity identification method for science and technology service resource atlas in industrial field
CN117648927A
Open information extraction method based on dependency graph neural network
CN117875265A
Cited By
Causal event extraction method and device based on pre-training model and computer equipment
CN119067125A
Structured dynamic semantic reconstruction method and device and storage medium
CN119669395A
A structured dynamic semantic reconstruction method, device and storage medium
CN119669395B
Power equipment data management method and system and storage medium
CN119940519A
