A Deep Semantic Understanding-Based Text Summarization Method
Patent Information
- Application Number
- CN202511775147.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2045-11-28
AI Technical Summary
该方法在通用场景中提升了摘要模型的鲁棒性,但其核心仍依赖对局部上下文的编码,且未对长距离依赖关系、句间语义逻辑及领域知识进行显式建模,因此在面对医学、法律等高专业度文本时仍存在显著挑战
首先,本发明通过引入基于词组位置与实体类型的句间注意力,通过将预设类型集合(NUM、TERM、FUL等)作为显著性触发因子,能够对数值、专业名词、程度修饰等关键语义成分赋予更高权重,从而有效突出目标文本中的核心要点,结合高斯型位置权重函数,可实现对句首、句中重要位置的动态增强,避免传统模型忽略长句中的结构性关键信息,得到句间注意力,进而对分词词组编码向量进行句间注意力加权,使每个分词词组获得与其语义重要性匹配的句间语义特征。
Smart Images

Figure CN121579686B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of semantic analysis technology, and more particularly to the field of summarization 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 preset type set , 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. 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: Preprocessing a target text for which an abstract is to be generated to obtain a target text phrase sequence.
[0025] Obtaining the target text for which an abstract is to be generated, and preprocessing the target text for which an abstract is to be generated, wherein the preprocessing comprises code normalization, syntactic segmentation, text word segmentation, text cleaning and named entity recognition, and the preprocessing flow of the target text is as follows: Performing code normalization on the target text, wherein the code normalization comprises unifying the target text to a standard coding format, removing invisible characters and control characters, and standardizing punctuation marks in the target text; Specifically, the invisible characters refer to characters that are invisible in text presentation, including zero-width characters, non-standard spaces (such as non-breaking spaces) and the like, and the control characters are characters used for format control, including ASCII control characters (such as page breaks) and Unicode extended control characters (such as line separators) and the like; As an embodiment of the present invention, the normalization processing flow of punctuation marks is: unifying Chinese full-width punctuation marks into half-width form; unifying quotation mark symbols, all unified into “” or ‘’; unifying dashes, unifying dashes into “—”; unifying the end-of-sentence mark “。” to “.”; Constructing sentence boundaries based on the standardized punctuation marks, and dividing the target text into a plurality of sentences; Specifically, extracting end-of-sentence marks “.”, “?”, “;” and “!” from the standardized punctuation marks as sentence boundary positions; Performing word segmentation processing on the divided sentences by using a word segmentation tool to obtain a plurality of word segmentation phrases for each sentence, removing word segmentation phrases belonging to stop words, and sorting according to the order of the word segmentation phrases in the sentences to obtain a word segmentation phrase sequence; Optionally, the word segmentation tool is a jieba word segmentation tool, and the stop words include, but are not limited to, functional function word terms (such as ‘的’ and ‘了’), pronoun terms (such as ‘这’ and ‘它’), high-frequency function words (such as ‘usually’ and ‘can’), punctuation marks, structural words (such as ‘firstly’ and ‘therefore’) and the like; Performing named entity recognition on word segmentation phrases in the word segmentation phrase sequence by using a named entity recognition model to obtain an entity recognition result of each word segmentation phrase and marking entity categories for the word segmentation phrases, wherein the named entity recognition model comprises an input layer, a coding layer, a conditional random field layer and an output layer, and the entity recognition result of the word segmentation phrases comprises a coding vector of the word segmentation phrase and an entity type; As an embodiment of the present invention, referring to Figure 2 shown flow chart of named entity recognition, the flow of performing named entity recognition on word segmentation phrases in a word segmentation phrase sequence by using a named entity recognition model is as follows: S101: an input layer receives a sequence of word segmentation phrases; S102: an encoding layer converts the word segmentation phrases in the sequence of word segmentation phrases into word vector forms, which are used as encoding vectors of the word segmentation phrases; Optionally, the encoding layer adopts a Transformer model structure, and a BERT model can be selected; S103: a conditional random field layer maps the encoding vectors of the word segmentation phrases to scores of the encoding vectors corresponding to different entity types, combines the scores of encoding vectors of adjacent word segmentation phrases corresponding to different entity types, defines the sequence score of the encoding vector sequence corresponding to the word segmentation phrase sequence in a conditional random field manner, takes maximizing the sequence score as a target, calculates an entity type sequence corresponding to the encoding vector sequence by adopting a Viterbi algorithm, extracts the entity type corresponding to each encoding vector from the entity type sequence, and forms an entity recognition result of the word segmentation phrase associated with the encoding vector; As an embodiment of the present invention, the conditional random field layer adopts a linear mapping manner to obtain the scores of the encoding vectors corresponding to different entity types, wherein the score reflects the semantic matching degree between an encoding vector and a certain entity type, and a higher score indicates a higher probability that the word segmentation phrase is determined as the entity type. For example, the score of the encoding vector corresponding to the word segmentation phrase "Beijing City" for entity type LOC (location) is 3.2, the score for ORG (organization) is 1.1, and the score for PER (person name) is -0.8, then it is considered that the probability that the entity type of "Beijing City" is LOC (location) is the highest; The conditional random field layer combines the entity type scores of encoding vectors of all word segmentation phrases and the transition scores between entity type scores of adjacent word segmentation phrases (i.e., the state transition probability between entity types) to calculate the sequence score of the whole word segmentation phrase sequence under a certain entity type sequence. A higher sequence score indicates that the entity type sequence is more consistent 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 / effect), TIME (time), NUM (numerical value), TERM (professional noun), FUL (degree description), etc.; According to the occurrence order of sentences in the target text, the word segmentation phrase sequences after entity category annotation of a plurality of sentences are sorted, and used as a target text phrase sequence.
[0026] Specifically, the representation form of the target text phrase sequence is: ; wherein, represents the target text phrase sequence, represents the word segmentation phrase sequence after entity category annotation of 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 preset type set , 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. 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 subordinate frequency of candidate terms in longer terms can effectively measure the "independence" and "coreness" of terms. That is, if a word often appears as a component of a long term, its authority is suppressed; if it appears independently and frequently, its authority is enhanced. This causes candidate terms that are 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, resulting in 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 extraction probability of 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 scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection 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 the 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. 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. 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.
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, 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. 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.
4. 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.
5. The text summarization method based on deep semantic understanding as described in claim 4, 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.
6. The text summarization method based on deep semantic understanding as described in claim 5, 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.
7. 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, resulting in 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.
Citation Information
Patent Citations
Text summary generation model training method, text summary generation method and device
CN117271759B
Document abstract method based on domain knowledge and multi-granularity graph network
CN119623617A
Long text information extraction and association analysis method and system based on large model
CN119761382A