Text abstract generation method for deep semantic understanding

By combining hierarchical semantic feature extraction and domain terminology sets, the problem of lack of professional depth in long text summarization in existing technologies is solved, and high accuracy and information coverage of medical and legal text summarization are achieved.

CN121579686APending Publication Date: 2026-02-27SHANDONG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511775147.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively model long-distance dependencies, inter-sentence semantic logic, and domain knowledge when dealing with highly specialized texts such as those in medicine and law, resulting in generated summaries that lack professional depth and accuracy.

Method used

By combining hierarchical semantic feature extraction and domain terminology set, inter-sentence semantic feature fusion is achieved. Professional terms are explicitly injected using domain knowledge gating module to construct multi-layer semantic compressed representation. Summary is generated by combining professional domain consistency scoring function.

Benefits of technology

It significantly improves the professional accuracy and information coverage of the abstracts, solves the problems of highlighting key points and explicitly amplifying professional terms in long texts, and enhances the domain consistency and accuracy of the abstracts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579686A_ABST
    Figure CN121579686A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of abstract generation, and discloses a deep semantic understanding text abstract generation method, which comprises the following steps of: carrying out hierarchical semantic feature extraction on a target text phrase sequence to obtain a multi-layer semantic feature coding result, and carrying out fusion processing on the multi-layer semantic feature coding result; constructing a domain knowledge gating module in combination with a domain term set, and performing domain term semantic enhancement on the multilayer semantic compression representation by using the domain knowledge gating module to obtain an enhanced multilayer semantic compression representation; and carrying out decoding processing for abstract extraction on the enhanced multilayer semantic compression representation, scoring candidate text abstracts by utilizing a consistency scoring function in a professional field, and selecting the text abstracts. According to the method, through hierarchical semantic modeling, domain knowledge enhancement and comparison scoring of multiple candidate text abstracts, intra-sentence, inter-sentence and global semantic structures are captured, domain term authority is introduced to complete professional knowledge alignment, and deep semantic understanding of professional texts and text abstract extraction for describing accurate information are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of semantic analysis technology, and more particularly to the field of summary generation, specifically a deep semantic understanding method for text summarization generation. Background Technology

[0002] With the rapid growth of data scale in professional fields such as medicine, law, scientific research, and e-commerce, text content is characterized by complex structure, dense information, and strong logical connections across paragraphs, leading to a continuous increase in the cost of manual reading and comprehension. How to automatically extract core information from lengthy and highly specialized texts has become a crucial link in knowledge management, intelligent decision-making, and information service systems. Text summarization technology aims to automatically compress and reorganize text while maintaining the semantic integrity of the original text and preserving key points. This can significantly reduce the information processing burden and improve the efficiency of information screening, clinical auxiliary judgment, and literature analysis in professional scenarios.

[0003] However, professional texts such as medical guidelines, case reports, legal clauses, scientific research papers, and product reviews generally contain a large number of technical terms, formulas, indicator parameters, causal chains, contextual dependencies, and implicit semantic interactions. As a result, the generated summaries often lack professional depth, have obvious missing important entities, and are highly generalized, failing to meet the requirements of professional application scenarios for accuracy, rigor, and information condensation.

[0004] Existing research often employs deep learning-based encoder-decoder structures, using attention mechanisms to extract key text content. For example, patent CN117271759B proposes a text summarization model training method, text summarization method, and apparatus. By introducing a training image set and constructing target loss and reconstruction loss, it improves the model's ability to express textual information and the accuracy of summarization generation. This method improves the robustness of the summarization model in general scenarios, but its core still relies on encoding local context and does not explicitly model long-distance dependencies, inter-sentence semantic logic, and domain knowledge. Therefore, it still faces significant challenges when dealing with highly specialized texts such as medical and legal texts.

[0005] To address this issue, this invention proposes a deep semantic understanding-based text summarization method to improve summarization quality and information coverage, thereby promoting the practical application of automatic summarization technology in high-knowledge-density scenarios such as medical reports, legal documents, and scientific research papers. Summary of the Invention

[0006] This invention proposes a deep semantic understanding-based text summarization method. Traditional summarization models often only capture local dependencies when faced with long texts, making it difficult to simultaneously model intra-sentence semantics, inter-sentence logic, and overall context, resulting in one-sided or fragmented summarization results. Step S2 extracts and fuses inter-sentence semantic features, whole-sentence semantic features, and global semantic features from the target text's word sequence, achieving multi-scale semantic fusion from short-range to long-range and from intra-sentence to whole-text, forming a multi-layered semantic compression representation with compressibility and abstraction, fundamentally solving the problem of capturing long-term semantics. Step S3 constructs a multi-domain terminology set and, through a domain knowledge gating module, explicitly injects highly authoritative terms from the main domain into the semantic representation, amplifying the focus on professional terms and significantly improving the professional accuracy and terminology consistency of the summary. Step S4 generates multiple sets of candidate text summaries during the decoding stage and proposes a professional domain consistency scoring function, which comprehensively scores the text summary based on indicators such as length reasonableness, domain authority, extraction probability, and key entity coverage, achieving an optimal balance between content density and professional depth.

[0007] To achieve the above objectives, this invention provides a deep semantic understanding-based text summarization method, comprising the following steps: S1: Preprocess the target text to be summarized to obtain a sequence of target text phrases; S2: Perform hierarchical semantic feature extraction on the target text word sequence, and fuse the multi-layer semantic feature encoding results to form a multi-layer semantic compressed representation corresponding to the target text word sequence; S3: Construct a domain terminology set, combine the domain terminology set to construct a domain knowledge gating module, and use the domain knowledge gating module to perform domain terminology semantic enhancement on the multi-layer semantic compressed representation to obtain the enhanced multi-layer semantic compressed representation; S4: Decode the enhanced multi-layer semantic compressed representation for summary extraction to obtain multiple candidate text summaries. Use a professional domain consistency scoring function to score the candidate text summaries and select the candidate text summary with the highest score as the text summary of the target text.

[0008] As a further improvement of the present invention: Further, step S1 includes: The target text to be used for generating the summary is obtained and preprocessed. This preprocessing includes encoding normalization, syntactic segmentation, text word segmentation, text cleaning, and named entity recognition. The preprocessing flow for the target text is as follows: The target text is encoded and normalized, which includes standardizing the target text to a standard encoding format, removing invisible characters and control characters, and standardizing the punctuation in the target text. Sentence boundaries are constructed based on standardized punctuation marks, dividing the target text into multiple sentences; The sentences are segmented using a word segmentation tool to obtain several word segments for each sentence. Word segments that are stop words are removed, and the word segments are sorted according to their order in the sentence to obtain a sequence of word segments. Named entity recognition model is used to perform named entity recognition on word segments in a word segment sequence, obtain the entity recognition result of each word segment, and label the word segments with entity categories. The named entity recognition model includes an input layer, an encoding layer, a conditional random field layer, and an output layer. The entity recognition result of the word segment includes the encoding vector of the word segment and the entity type. Based on the order in which sentences appear in the target text, the word segmentation sequence of multiple sentences after entity category labeling is sorted and used as the target text word segmentation sequence.

[0009] Specifically, the target text phrase sequence is represented as follows: ; in, Represents a sequence of words in the target text. Indicates the first in the target text The entity category tagging of each sentence followed by word segmentation and word group sequence. This indicates the total number of sentences in the target text. This represents the sequence of word segments after entity category tagging. In After tagging each entity category, word groups are segmented. This represents the sequence of word segments after entity category tagging. The first in After tagging each entity category, word groups are segmented. This represents the sequence of word segments after entity category tagging. The first in After tagging each entity category, word groups are segmented. , Indicates the first in the target text The number of word segments in a sentence. Including the first in the target text The first sentence Each word group , No. Each word group Encoding vector and entity type .

[0010] Furthermore, hierarchical semantic feature extraction is performed on the target text phrase sequence, including: Extract the word position, encoding vector, and entity type of each word segmentation word in the sentence from the target text word segmentation sequence. Calculate the inter-sentence attention of the word segmentation word based on the word position and entity type. Perform inter-sentence attention weighted encoding on the encoding vector of the word segmentation word as the inter-sentence semantic feature of the word segmentation word. Specifically, the first in the target text The first sentence Each word group The formula for generating inter-sentence attention is: ; ; ; in, Indicates the first in the target text The first sentence Each word group Inter-sentence attention, Indicates inter-sentence attention Intermediate computational costs during the calculation process. This represents an exponential function with the natural constant as its base. Indicate entity type Does it belong to the preset type set? The indicator function value, Indicate entity type Belongs to the set of preset types , Indicate entity type Not part of the preset type set Optionally, the preset type set can be set to include NUM (numerical value), FUN (function / effect), TERM (technical term), and FUL (degree description). Based on inter-sentence attention For the encoding vector Weighting is performed to obtain word segments. Inter-sentence semantic features ; The semantic features of all word segments in a sentence are fused to obtain the semantic features of the whole sentence for each sentence. The semantic features of each sentence are expanded by attention-weighted processing based on the preceding context to obtain the global semantic features of the target text phrase sequence; The inter-sentence semantic features of word segments, the whole-sentence semantic features of the sentences to which the word segments belong, and the global semantic features are used as multi-level semantic feature units of word segments. All multi-level semantic feature units of word segments are used as the multi-level semantic feature encoding results of the target text word segment sequence.

[0011] Furthermore, the results of multi-layer semantic feature encoding are fused, including: Multi-layer semantic feature units of word segmentation phrases are extracted. The inter-sentence semantic features, the whole-sentence semantic features of the sentence to which the word segmentation phrase belongs, and the global semantic features within these multi-layer semantic feature units are compressed and fused to obtain a multi-layer semantic compression vector for the word segmentation phrase. The compression and fusion formulas for the inter-sentence semantic features, the whole-sentence semantic features of the sentence to which the word segmentation phrase belongs, and the global semantic features are as follows: ; ; ; in, This represents a multi-layered semantic compression vector representing word segments. Indicates the normalization layer. Both represent trainable weight matrices. This represents the trainable bias. This indicates Hadamard multiplication. This represents the activation function. Represents multi-layered semantic feature units of word segmentation phrases. These represent the multi-layer semantic feature units in sequence. The semantic features between sentences, the semantic features of the whole sentence to which the word segmentation phrase belongs, and the global semantic features. This represents the intermediate compression amount during the multi-layer semantic compression vector calculation process; The multi-layer semantic compression vectors are sorted according to the order of word segments in the target text, and the sorting result is used as the multi-layer semantic compression representation corresponding to the word segment sequence in the target text.

[0012] Furthermore, the domain terminology set is constructed as follows: We gather authoritative corpora and common terminology databases from various fields, extract candidate terms from them, and calculate their domain authority. We then select candidate terms whose domain authority is higher than Z% of the candidate terms in their respective fields as domain terms. The domain terminology, the domain to which the domain terminology belongs, and the domain authority of the domain terminology in its domain are collected as a set of domain terminology data and added to the domain terminology set.

[0013] Furthermore, a domain knowledge gating module is constructed by combining a domain terminology set, including: The input layer is used to receive the target text phrase sequence and the corresponding multi-layer semantic compressed representation; The domain terminology matching module is used to calculate the degree of matching between word segments in the target text word sequence and domain terms in the domain terminology set; The main domain response module calculates the domain responses of the target text phrase sequence in different domains based on the matching degree, and selects the main domain; The gated network includes a main domain aggregation module and a gate function. The main domain aggregation module is used to add the domain authority of the successfully matched word segmentation terms in the main domain to the multi-layer semantic compression vector of the word segmentation, so as to obtain the multi-layer semantic compression vector of the main domain aggregation. The gate function is used to dynamically control the multi-layer semantic compression vector of the main domain aggregation with domain information, so as to obtain the gate weights corresponding to the multi-layer semantic compression vector of the main domain aggregation. The domain enhancement module performs domain term semantic enhancement on the multi-layer semantic compression vector based on gating weights, resulting in an enhanced multi-layer semantic compression vector. The enhanced multi-layer semantic compression vector is then sorted according to the order of word segments in the target text, and the sorting result is used as the enhanced multi-layer semantic compression representation corresponding to the word segment sequence in the target text.

[0014] Furthermore, a domain knowledge gating module is used to enhance the semantic meaning of the multi-layer semantic compression representation using domain terms. The enhancement process of the gating network and the domain enhancement module is as follows: The gating weights corresponding to the multi-layer semantic compression vectors of the main domain aggregation are calculated using the gating function: ; in, This represents a multi-layered semantic compression vector representing the aggregation of the main domain. Represents a multi-layer semantic compression vector The domain authority of the domain terms that are successfully matched by the corresponding word segmentation phrases in the main domain. Both represent gating weights. Both indicate gating bias, and T indicates transpose. Multi-level semantic compression vector representing main domain aggregation The corresponding gating weights; The domain enhancement module performs domain terminology semantic enhancement on multi-layer semantic compression vectors based on gating weights: ; in, Represents a multi-layer semantic compression vector The corresponding enhanced multi-layer semantic compression vector.

[0015] Furthermore, the enhanced multi-layer semantic compressed representation is decoded for summary extraction to obtain multiple sets of candidate text summaries, including: Extract the enhanced multi-layer semantic compression vector of each word segmentation group from the enhanced multi-layer semantic compression representation, and convert the enhanced multi-layer semantic compression vector into the summary extraction probability; Based on the probability of extracting the summary from the word segmentation group, word segments are extracted from the target text word segmentation sequence as summary word segments, and the summary word segments are combined into candidate text summaries; the process of extracting and combining summary word segments is repeated to obtain multiple different candidate text summaries.

[0016] Furthermore, the candidate text summaries are scored using a domain-specific consistency scoring function, the expression of which is: ; in, Represents candidate text summary The rating, This represents the professional domain consistency scoring function. Represents candidate text summary Length penalty item, This represents the length penalty coefficient. Represents candidate text summary The number of word segments in the abstract. Indicates the reference length of the candidate text summary. Represents an exponential function with the natural constant as its base; The candidate text summaries are represented in order. The average domain authority of the abstract segmented words in the main domain, the average probability of abstract extraction, and the proportion of abstract segmented words of key entity types.

[0017] Compared with existing technologies, this invention proposes a text summarization method based on deep semantic understanding, which has the following advantages: First, this invention introduces inter-sentence attention based on phrase position and entity type. By using a preset set of types (NUM, TERM, FUL, etc.) as saliency triggering factors, it can assign higher weights to key semantic components such as numerical values, technical terms, and degree modifiers, thereby effectively highlighting the core points in the target text. Combined with a Gaussian position weight function, it can achieve dynamic enhancement of important positions at the beginning and middle of the sentence, avoiding the traditional model from ignoring the key structural information in long sentences, thus obtaining inter-sentence attention. Then, it applies inter-sentence attention weighting to the word segmentation phrase encoding vector, so that each word segmentation phrase obtains inter-sentence semantic features that match its semantic importance.

[0018] Simultaneously, in the process of semantic enhancement of domain terms, this invention introduces a domain terminology set containing multi-domain professional terms and their domain authority to achieve explicit domain identification of the target text. The main domain is determined by the proportion of successfully matched word segments, which can obtain accurate domain constraints during semantic analysis and avoid semantic drift in professional texts caused by general semantic models. Specifically, the gating network embeds the domain authority of the main domain into the multi-layer semantic compression vector of word segments, and dynamically controls the domain information through the gating function, making the injection of domain knowledge adjustable and selective, avoiding semantic bias caused by over-enhancement. The domain enhancement module performs differentiated enhancement on the multi-layer semantic compression vector according to the gating weight, so that word segments highly related to the main domain receive stronger semantic weights, while unrelated word segments retain their original representations, effectively improving the model's ability to capture long texts, cross-sentence contexts, and professional terms, thereby improving the accuracy and stability of the domain summarization task. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating a deep semantic understanding-based text summarization method according to an embodiment of the present invention.

[0020] Figure 2 This is a flowchart of a named entity recognition process provided in an embodiment of the present invention.

[0021] Figure 3 This is a schematic diagram of a domain knowledge gating module structure provided in an embodiment of the present invention. Detailed Implementation

[0022] The realization of the objectives, functional characteristics, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0023] This invention provides a deep semantic understanding-based text summarization method. The execution entity of this deep semantic understanding-based text summarization method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this invention: a server, a terminal, etc. In other words, the deep semantic understanding-based text summarization method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.

[0024] Reference Figure 1 , Figure 2 as well as Figure 3 Embodiment 1 of the present invention is as follows: A text summarization method based on deep semantic understanding, the method comprising: S1: Preprocess the target text for which the summary is to be generated to obtain a sequence of target text phrases.

[0025] Obtain the target text for which the summary is to be generated, and preprocess the target text for which the summary is to be generated. The preprocessing includes encoding normalization, syntactic segmentation, text tokenization, text cleaning, and named entity recognition. The preprocessing process of the target text is as follows: Perform encoding normalization on the target text. The encoding normalization includes unifying the target text into a standard encoding format, removing invisible characters and control characters, and standardizing the punctuation in the target text; Specifically, the invisible characters refer to the invisible characters in text presentation, including zero-width characters, non-standard spaces (such as non-breaking spaces), etc., and the control characters are the characters used for format control, including ASCII control characters (such as form feed) and Unicode extended control characters (such as line separator), etc.; As an embodiment of the present invention, the standardization process of the punctuation is as follows: unify the Chinese full-width punctuation into the half-width form; unify the quotation marks, all unified into “” or ‘’; unify the dash, and unify the dash into “—”; unify the end-of-sentence symbol “.” into “.”; Construct sentence boundaries based on the standardized punctuation, and divide the target text into multiple sentences; Specifically, extract the end-of-sentence symbols “.”, “?”, “;”, and “!” in the standardized punctuation as the sentence boundary positions; Use a tokenization tool to perform tokenization on the divided sentences to obtain several tokenized phrases for each sentence, remove the tokenized phrases belonging to stop words, and sort them in the order of the tokenized phrases in the sentence to obtain a sequence of tokenized phrases; Optionally, the tokenization tool is the jieba tokenization tool, and the stop words include but are not limited to functional虚词类词项 (such as ‘的’, ‘了’), pronoun类词项 (such as ‘这’, ‘它’), high-frequency虚词 (such as ‘通常’, ‘能够’), punctuation, structural类词语 (such as ‘首先’, ‘因此’), etc.; Use a named entity recognition model to perform named entity recognition on the tokenized phrases in the sequence of tokenized phrases, obtain the entity recognition results of each tokenized phrase and perform entity category annotation on the tokenized phrases. The named entity recognition model includes an input layer, an encoding layer, a conditional random field layer, and an output layer. The entity recognition results of the tokenized phrases include the encoding vector and entity type of the tokenized phrases; As an embodiment of the present invention, refer to as Figure 2 shown in a named entity recognition flowchart, the process of using a named entity recognition model to perform named entity recognition on the tokenized phrases in the sequence of tokenized phrases is as follows: S101: The input layer receives the sequence of segmented phrase groups; S102: The encoding layer converts the segmented phrases in the sequence of segmented phrase groups into the form of word vectors as the encoding vectors of the segmented phrases; Optionally, the encoding layer adopts the Transformer model structure, and the BERT model can be selected; S103: The conditional random field layer maps the encoding vectors of the segmented phrases into the scores of the encoding vectors for different entity types, combines the scores of the encoding vectors of adjacent segmented phrases for different entity types, and defines the sequence score of the sequence of encoding vectors corresponding to the sequence of segmented phrases in the conditional random field manner. With the goal of maximizing the sequence score, the Viterbi algorithm is used to calculate the entity type sequence corresponding to the sequence of encoding vectors, and the entity types corresponding to the encoding vectors are extracted from the entity type sequence to form the entity recognition result of the segmented phrases associated with the encoding vectors; As an embodiment of the present invention, the conditional random field layer uses a linear mapping method to map and obtain the scores of the encoding vectors for different entity types, where the scores reflect the semantic fit degree of the encoding vectors with a certain entity type. The higher the score, the greater the possibility that the segmented phrase is determined to be of this entity type. For example, the score of the encoding vector corresponding to the segmented phrase "Beijing City" for the entity type LOC (location) is 3.2, the score for the entity type ORG (organization) is 1.1, and the score for the entity type PER (person name) is -0.8. Then it is considered that the probability of the entity type of "Beijing City" being LOC (location) is the highest; The conditional random field layer combines the transfer scores (i.e., the state transition probability between entity types) between the entity type scores of the encoding vectors of all segmented phrases and the entity type scores of adjacent segmented phrases, and calculates the sequence score of the entire sequence of segmented phrases under a certain entity type sequence. The higher the sequence score, the more consistent the entity type sequence is with the overall semantic structure of the whole sentence text and has higher global rationality; The entity types include LOC (location), ORG (organization), FUN (function / role), TIME (time), NUM (numerical value), TERM (professional term), FUL (degree description), etc.; Sort the sequence of segmented phrases with entity category annotations for multiple sentences according to the order of appearance of the sentences in the target text as the target text phrase sequence.

[0026] Specifically, the representation form of the target text phrase sequence is: ; where, represents the target text phrase sequence, represents the sequence of segmented phrases with entity category annotations for the th sentence in the target text, This indicates the total number of sentences in the target text. This represents the sequence of word segments after entity category tagging. In After tagging each entity category, word groups are segmented. This represents the sequence of word segments after entity category tagging. The first in After tagging each entity category, word groups are segmented. This represents the sequence of word segments after entity category tagging. The first in After tagging each entity category, word groups are segmented. , Indicates the first in the target text The number of word segments in a sentence. Including the first in the target text The first sentence Each word group , No. Each word group Encoding vector and entity type .

[0027] S2: Perform hierarchical semantic feature extraction on the target text phrase sequence, encode the multi-layer semantic features and fuse them to form a multi-layer semantic compressed representation corresponding to the target text phrase sequence.

[0028] Hierarchical semantic feature extraction is performed on the target text phrase sequence, including: Extract the word position, encoding vector, and entity type of each word segmentation word in the sentence from the target text word segmentation sequence. Calculate the inter-sentence attention of the word segmentation word based on the word position and entity type. Perform inter-sentence attention weighted encoding on the encoding vector of the word segmentation word as the inter-sentence semantic feature of the word segmentation word. As an embodiment of the present invention, the first in the target text The first sentence Each word group The formula for generating inter-sentence attention is: ; ; ; in, Indicates the first in the target text The first sentence Each word group Inter-sentence attention, Indicates inter-sentence attention Intermediate computational costs during the calculation process. This represents an exponential function with the natural constant as its base. Indicate entity type Does it belong to the preset type set? The indicator function value, Indicate entity type Belongs to the set of preset types , Indicate entity type Not part of the preset type set Optionally, the preset type set can be set to include NUM (numerical value), FUN (function / effect), TERM (technical term), and FUL (degree description). Based on inter-sentence attention For the encoding vector Weighting is performed to obtain word segments. Inter-sentence semantic features ; The semantic features of all word segments in a sentence are fused to obtain the semantic features of the whole sentence for each sentence. Specifically, the target text in the first The semantic features of the entire sentence are: : ; The semantic features of each sentence are expanded by attention-weighted processing based on the preceding context to obtain the global semantic features of the target text phrase sequence; As an embodiment of the present invention, the formula for generating the global semantic features is: ; ; ; in, Represents global semantic features. Indicates the first in the target text The implicit representation of a sentence. Represents the hyperbolic tangent function. Indicates the normalization layer. This represents a trainable weight matrix. This represents the trainable bias. This represents a zero vector whose length is the same as the semantic feature vector of the entire sentence. Indicates the first in the target text The semantic features of the entire sentence; Specifically, Normalization is performed on each feature dimension of the input vector; The inter-sentence semantic features of word segments, the whole-sentence semantic features of the sentences to which the word segments belong, and the global semantic features are used as multi-level semantic feature units of word segments. All multi-level semantic feature units of word segments are used as the multi-level semantic feature encoding results of the target text word segment sequence.

[0029] Furthermore, by introducing implicit representations based on a hierarchical recursive structure, semantic dependency modeling between consecutive sentences is achieved, improving the problem of cross-sentence information fragmentation. Then, all whole-sentence semantic features are nonlinearly compressed to generate global semantic features, resulting in global semantic features representing global semantics. Through the fusion of multi-layered semantic feature units, each segmented word group simultaneously possesses local, sentence-level, and global semantic information, thereby significantly improving the overall performance and generalization ability of downstream summarization tasks.

[0030] The results of multi-layer semantic feature encoding are fused, including: Multi-layer semantic feature units of word segmentation phrases are extracted. The inter-sentence semantic features, the whole-sentence semantic features of the sentence to which the word segmentation phrase belongs, and the global semantic features within these multi-layer semantic feature units are compressed and fused to obtain a multi-layer semantic compression vector for the word segmentation phrase. The compression and fusion formulas for the inter-sentence semantic features, the whole-sentence semantic features of the sentence to which the word segmentation phrase belongs, and the global semantic features are as follows: ; ; ; in, This represents a multi-layered semantic compression vector representing word segments. Indicates the normalization layer. Both represent trainable weight matrices. This represents the trainable bias. This indicates Hadamard multiplication. This represents the activation function. Represents multi-layered semantic feature units of word segmentation phrases. These represent the multi-layer semantic feature units in sequence. The semantic features between sentences, the semantic features of the whole sentence to which the word segmentation phrase belongs, and the global semantic features. This represents the intermediate compression amount during the multi-layer semantic compression vector calculation process; It should be noted that this invention utilizes two nonlinear transformation functions. as well as Generate the core semantics of multi-layer semantic feature units respectively and semantic gating By implementing dynamic semantic selection by dimension through Hadamard multiplication, it can adaptively retain key semantic information and filter redundant features. The core semantics is used to extract the key semantic components with the highest information density and most direct relevance to downstream summary generation from the multi-layer semantic feature units, while semantic gating is used to filter or enhance different components in the core semantics.

[0031] Optionally, the activation function can be set to the sigmoid function, and the sigmoid function can be used to... The elements in the array are processed sequentially; Specifically, by acquiring multiple training texts and labeling the summary phrases in the training texts as summaries, the goal is to minimize the similarity between the multi-layer semantic compression vectors of the summary phrases and the non-summary phrases (phrases in the training texts that are not summary phrases). A training loss function is constructed, and the gradient descent algorithm or Adam optimizer is used. The training loss function is combined with the trainable weight matrix and bias vector to train and optimize. The similarity calculation method is the cosine similarity algorithm. The multi-layer semantic compression vectors are sorted according to the order of word segments in the target text, and the sorting result is used as the multi-layer semantic compression representation corresponding to the word segment sequence in the target text.

[0032] S3: Construct a domain terminology set, combine the domain terminology set to construct a domain knowledge gating module, and use the domain knowledge gating module to perform domain term semantic enhancement on the multi-layer semantic compressed representation to obtain the enhanced multi-layer semantic compressed representation.

[0033] The domain terminology set is constructed as follows: We gather authoritative corpora and common terminology databases from various fields, extract candidate terms from them, and calculate their domain authority. We then select candidate terms whose domain authority is higher than Z% of the candidate terms in their respective fields as domain terms. Optionally, Z% is set to 80%, and the authoritative corpus includes industry white papers, guidelines, regulations, professional glossaries, etc., while the common terminology database includes legal entries, etc. The key terms marked in the authoritative corpus and the common terminology database are used as candidate terms. Specifically, the formula for calculating the domain authority of candidate terms is as follows: ; in, Indicate candidate terms Authority in the field Indicate candidate terms Word length, Represents the logarithmic function. Indicate candidate terms In terms of word frequency within the relevant field, Indicate candidate terms The field contains candidate terms And a larger set of candidate terms, Represents the set of candidate terms The number of candidate terms in the text. , e represents the set of candidate terms Any candidate term in, Indicate the word frequency of candidate term e; Indicates selection The maximum value in; Furthermore, if candidate terms If a term appears in multiple fields, then candidate terms are calculated separately for each field. Authority in different fields; It should be noted that this invention accurately quantifies the importance of candidate terms within their respective fields by constructing a domain authority calculation formula. Specifically, by applying logarithmic weighting to word length, specialized phrases composed of multiple words achieve higher authority in the authority assessment, avoiding interference from single characters or common words in authoritative corpora and common terminology databases, and also utilizing word frequency... Subtracting the average frequency of candidate terms as subordinate terms in longer terms can effectively measure the "independence" and "coreness" of terms. That is, if a word often appears as part of a longer term, its authority is suppressed; if it appears independently and frequently, its authority is enhanced. This causes candidate terms as core professional terms to automatically rise in the ranking, while subordinate or peripheral terms are weakened, thereby improving the purity and stability of the domain terminology database. The domain terminology, the domain to which the domain terminology belongs, and the domain authority of the domain terminology in its domain are collected as a set of domain terminology data and added to the domain terminology set.

[0034] A domain knowledge gating module is constructed by combining a domain terminology set, including: For reference Figure 3 The diagram shows a domain knowledge gating module structure, which includes an input layer, a domain terminology matching module, a main domain response module, a gating network, and a domain enhancement module. The input layer is used to receive the target text phrase sequence and the corresponding multi-layer semantic compressed representation; The domain terminology matching module is used to calculate the degree of matching between word segments in the target text word sequence and domain terms in the domain terminology set; Specifically, if the word segmentation phrase is completely consistent with the domain term, the matching degree between the two is 1, indicating that the two are successfully matched; otherwise, the matching degree between the two is 0. The main domain response module calculates the domain responses of the target text phrase sequence in different domains based on the matching degree, and selects the main domain; Specifically, the proportion of each segmented word in the target text word sequence that successfully matches with domain terms in different fields is calculated, which is taken as the domain response of the target text word sequence in the corresponding field, and the field with the highest domain response is selected as the main domain. The gated network includes a main domain aggregation module and a gate function. The main domain aggregation module is used to add the domain authority of the successfully matched word segmentation terms in the main domain to the multi-layer semantic compression vector of the word segmentation, so as to obtain the multi-layer semantic compression vector of the main domain aggregation. The gate function is used to dynamically control the multi-layer semantic compression vector of the main domain aggregation with domain information, so as to obtain the gate weights corresponding to the multi-layer semantic compression vector of the main domain aggregation. The domain enhancement module performs domain term semantic enhancement on the multi-layer semantic compression vector based on gating weights, resulting in an enhanced multi-layer semantic compression vector. The enhanced multi-layer semantic compression vector is then sorted according to the order of word segments in the target text, and the sorting result is used as the enhanced multi-layer semantic compression representation corresponding to the word segment sequence in the target text.

[0035] Domain knowledge gating modules are used to enhance the semantic meaning of multi-layer semantic compressed representations using domain terminology. The enhancement process of the gating network and the domain enhancement module is as follows: The gating weights corresponding to the multi-layer semantic compression vectors of the main domain aggregation are calculated using the gating function: ; in, This represents a multi-layered semantic compression vector representing the aggregation of the main domain. Represents a multi-layer semantic compression vector The domain authority of the domain terms that are successfully matched by the corresponding word segmentation phrases in the main domain. Both represent gating weights. Both indicate gating bias, and T indicates transpose. Multi-level semantic compression vector representing main domain aggregation The corresponding gating weights; The domain enhancement module performs domain terminology semantic enhancement on multi-layer semantic compression vectors based on gating weights: ; in, Represents a multi-layer semantic compression vector The corresponding enhanced multi-layer semantic compression vector.

[0036] S4: Decode the enhanced multi-layer semantic compressed representation for summary extraction to obtain multiple candidate text summaries. Use a professional domain consistency scoring function to score the candidate text summaries and select the candidate text summary with the highest score as the text summary of the target text.

[0037] The enhanced multi-layer semantic compressed representation is decoded for summary extraction to obtain multiple sets of candidate text summaries, including: Extract the enhanced multi-layer semantic compression vector of each word segmentation group from the enhanced multi-layer semantic compression representation, and convert the enhanced multi-layer semantic compression vector into the summary extraction probability; Specifically, the conversion formula for the abstract extraction probability is as follows: ; Where P represents the enhanced multi-layer semantic compression vector. The probability of extracting the transformed summary. Represents the nonlinear mapping coefficients. Represents the mapping constant; By acquiring multiple training texts and labeling the summary phrases in the training texts as summaries, a training loss function is constructed with the goal of maximizing the summary extraction probability of the summary phrases. The nonlinear mapping coefficients, mapping constants, gating weights, and gating biases are trained and optimized. Based on the probability of extracting the summary from the word segmentation group, word segments are extracted from the target text word segmentation sequence as summary word segments, and the summary word segments are combined into candidate text summaries; the process of extracting and combining summary word segments is repeated to obtain multiple different candidate text summaries.

[0038] Optionally, the summary word groups in the candidate text summary are sorted based on the entity type of the summary word group. The higher the priority of the entity type, the earlier the corresponding summary word group appears in the sorting process. The entity type order can be set as follows according to the priority of the entity type from high to low: professional terminology, degree description, function / effect, numerical value, and others.

[0039] Candidate text summaries are scored using a domain-specific consistency scoring function, the expression of which is: ; in, Represents candidate text summary The rating, This represents the professional domain consistency scoring function. Represents candidate text summary Length penalty item, Indicates the length penalty coefficient, set It is 0.2. Represents candidate text summary The number of word segments in the abstract. Indicates the reference length for the candidate text summary (e.g., set to 15); These represent, in order, the average domain authority of the summary word segments in the main domain, the average probability of summary extraction, and the proportion of summary word segments of key entity types in the candidate text summary. Optionally, key entity types can be set to include technical terms, degree descriptions, functions / roles, and numerical values.

[0040] It should be noted that by introducing a length penalty term, excessively long or short text summaries are automatically suppressed, making the scoring more consistent with the summary length range commonly used in the target domain, thus avoiding summary redundancy or insufficient information.

[0041] Example 2: As an embodiment of the present invention, taking the target text "This study explores the efficacy of a novel hypoglycemic drug in patients with type 2 diabetes. A total of 120 patients were randomly divided into two groups. The experimental group received the drug in addition to basic treatment for 12 weeks. The results showed that the HbA1c of the experimental group decreased significantly, and the adverse reactions were mild and tolerable" as an example, the abstract word segmentation group was extracted to form candidate abstract texts. The professional domain consistency scoring function was used to score the candidate text abstracts. For one candidate abstract text, the extracted abstract word segmentation group included "novel hypoglycemic drug", "type 2 diabetes", "included", "120 patients", "included drug", "significant decrease in HbA1c", "mild adverse reactions", and "efficacy". The resulting candidate text abstract was "Efficacy of novel hypoglycemic drug in type 2 diabetes: with the addition of the drug, HbA1c decreased significantly, adverse reactions were mild, and 120 patients were included." The score was 0.83.

[0042] It should be noted that the sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0043] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0044] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A text summarization method based on deep semantic understanding, characterized in that, The method includes: S1: Preprocess the target text to be summarized to obtain a sequence of target text phrases; S2: Perform hierarchical semantic feature extraction on the target text word sequence, and fuse the multi-layer semantic feature encoding results to form a multi-layer semantic compressed representation corresponding to the target text word sequence; S3: Construct a domain terminology set, combine the domain terminology set to construct a domain knowledge gating module, and use the domain knowledge gating module to perform domain terminology semantic enhancement on the multi-layer semantic compressed representation to obtain the enhanced multi-layer semantic compressed representation; S4: Decode the enhanced multi-layer semantic compressed representation for summary extraction to obtain multiple candidate text summaries. Use a professional domain consistency scoring function to score the candidate text summaries and select the candidate text summary with the highest score as the text summary of the target text.

2. The text summarization method based on deep semantic understanding as described in claim 1, characterized in that, Step S1 includes: The target text to be used for generating the summary is obtained and preprocessed. This preprocessing includes encoding normalization, syntactic segmentation, text word segmentation, text cleaning, and named entity recognition. The preprocessing flow for the target text is as follows: The target text is encoded and normalized, which includes standardizing the target text to a standard encoding format, removing invisible characters and control characters, and standardizing the punctuation in the target text. Sentence boundaries are constructed based on standardized punctuation marks, dividing the target text into multiple sentences; The sentences are segmented using a word segmentation tool to obtain several word segments for each sentence. Word segments that are stop words are removed, and the word segments are sorted according to their order in the sentence to obtain a sequence of word segments. Named entity recognition model is used to perform named entity recognition on word segments in a word segment sequence, obtain the entity recognition result of each word segment, and label the word segments with entity categories. The named entity recognition model includes an input layer, an encoding layer, a conditional random field layer, and an output layer. The entity recognition result of the word segment includes the encoding vector of the word segment and the entity type. Based on the order in which sentences appear in the target text, the word segmentation sequence of multiple sentences after entity category labeling is sorted and used as the target text word segmentation sequence.

3. The text summarization method based on deep semantic understanding as described in claim 2, characterized in that, Hierarchical semantic feature extraction is performed on the target text phrase sequence, including: Extract the word position, encoding vector, and entity type of each word segmentation word in the sentence from the target text word segmentation sequence. Calculate the inter-sentence attention of the word segmentation word based on the word position and entity type. Perform inter-sentence attention weighted encoding on the encoding vector of the word segmentation word as the inter-sentence semantic feature of the word segmentation word. The semantic features of all word segments in a sentence are fused to obtain the semantic features of the whole sentence for each sentence. The semantic features of each sentence are expanded by attention-weighted processing based on the preceding context to obtain the global semantic features of the target text phrase sequence; The inter-sentence semantic features of word segments, the whole-sentence semantic features of the sentences to which the word segments belong, and the global semantic features are used as multi-level semantic feature units of word segments. All multi-level semantic feature units of word segments are used as the multi-level semantic feature encoding results of the target text word segment sequence.

4. The text summarization method based on deep semantic understanding as described in claim 3, characterized in that, The results of multi-layer semantic feature encoding are fused, including: Multi-layer semantic feature units of word segmentation phrases are extracted. The inter-sentence semantic features, the whole-sentence semantic features of the sentence to which the word segmentation phrase belongs, and the global semantic features within these multi-layer semantic feature units are compressed and fused to obtain a multi-layer semantic compression vector for the word segmentation phrase. The compression and fusion formulas for the inter-sentence semantic features, the whole-sentence semantic features of the sentence to which the word segmentation phrase belongs, and the global semantic features are as follows: ; ; ; in, This represents a multi-layered semantic compression vector representing word segments. Indicates the normalization layer. Both represent trainable weight matrices. This represents the trainable bias. This indicates Hadamard multiplication. This represents the activation function. Represents multi-layered semantic feature units of word segmentation phrases. These represent the multi-layer semantic feature units in sequence. The semantic features between sentences, the semantic features of the whole sentence to which the word segmentation phrase belongs, and the global semantic features. This represents the intermediate compression amount during the multi-layer semantic compression vector calculation process; The multi-layer semantic compression vectors are sorted according to the order of word segments in the target text, and the sorting result is used as the multi-layer semantic compression representation corresponding to the word segment sequence in the target text.

5. The text summarization method based on deep semantic understanding as described in claim 1, characterized in that, The domain terminology set is constructed as follows: We gather authoritative corpora and common terminology databases from various fields, extract candidate terms from them, and calculate their domain authority. We then select candidate terms whose domain authority is higher than Z% of the candidate terms in their respective fields as domain terms. The domain terminology, the domain to which the domain terminology belongs, and the domain authority of the domain terminology in its domain are collected as a set of domain terminology data and added to the domain terminology set.

6. The text summarization method based on deep semantic understanding as described in claim 5, characterized in that, A domain knowledge gating module is constructed by combining a domain terminology set, including: The input layer is used to receive the target text phrase sequence and the corresponding multi-layer semantic compressed representation; The domain terminology matching module is used to calculate the degree of matching between word segments in the target text word sequence and domain terms in the domain terminology set; The main domain response module calculates the domain responses of the target text phrase sequence in different domains based on the matching degree, and selects the main domain; The gated network includes a main domain aggregation module and a gate function. The main domain aggregation module is used to add the domain authority of the successfully matched word segmentation terms in the main domain to the multi-layer semantic compression vector of the word segmentation, so as to obtain the multi-layer semantic compression vector of the main domain aggregation. The gate function is used to dynamically control the multi-layer semantic compression vector of the main domain aggregation with domain information, so as to obtain the gate weights corresponding to the multi-layer semantic compression vector of the main domain aggregation. The domain enhancement module performs domain term semantic enhancement on the multi-layer semantic compression vector based on gating weights, resulting in an enhanced multi-layer semantic compression vector. The enhanced multi-layer semantic compression vector is then sorted according to the order of word segments in the target text, and the sorting result is used as the enhanced multi-layer semantic compression representation corresponding to the word segment sequence in the target text.

7. The text summarization method for deep semantic understanding as described in claim 6, characterized in that, Domain knowledge gating modules are used to enhance the semantic meaning of multi-layer semantic compressed representations using domain terminology. The enhancement process of the gating network and the domain enhancement module is as follows: The gating weights corresponding to the multi-layer semantic compression vectors of the main domain aggregation are calculated using the gating function: ; in, This represents a multi-layered semantic compression vector representing the aggregation of the main domain. Represents a multi-layer semantic compression vector The domain authority of the domain terms that are successfully matched by the corresponding word segmentation phrases in the main domain. Both represent gating weights. Both indicate gating bias, and T indicates transpose. Multi-level semantic compression vector representing main domain aggregation The corresponding gating weights; The domain enhancement module performs domain terminology semantic enhancement on multi-layer semantic compression vectors based on gating weights: ; in, Represents a multi-layer semantic compression vector The corresponding enhanced multi-layer semantic compression vector.

8. The text summarization method based on deep semantic understanding as described in claim 1, characterized in that, The enhanced multi-layer semantic compressed representation is decoded for summary extraction to obtain multiple sets of candidate text summaries, including: Extract the enhanced multi-layer semantic compression vector of each word segmentation group from the enhanced multi-layer semantic compression representation, and convert the enhanced multi-layer semantic compression vector into the summary extraction probability; Based on the probability of extracting the summary from the word segmentation group, word segments are extracted from the target text word segmentation sequence as summary word segments, and the summary word segments are combined into candidate text summaries; the process of extracting and combining summary word segments is repeated to obtain multiple different candidate text summaries.

9. The text summarization method for deep semantic understanding as described in claim 8, characterized in that, Candidate text summaries are scored using a domain-specific consistency scoring function, the expression of which is: ; in, Represents candidate text summary The rating, This represents the professional domain consistency scoring function. Represents candidate text summary Length penalty item, This represents the length penalty coefficient. Represents candidate text summary The number of word segments in the abstract. Indicates the reference length of the candidate text summary. Represents an exponential function with the natural constant as its base; The candidate text summaries are represented in order. The average domain authority of the abstract segmented words in the main domain, the average probability of abstract extraction, and the proportion of abstract segmented words of key entity types.

Citation Information

Patent Citations

  • Text summary generation model training method, text summary generation method and device

    CN117271759B