Long text information extraction and association analysis method and system based on large model

Through the long text information extraction and association analysis method based on large models, the problem of difficult to understand complex semantic association relationships in long texts is solved, high-quality information extraction and association analysis are realized, and the ability of deep semantic understanding is improved.

CN119761382AActive Publication Date: 2025-04-04BEIJING FEIRUI XINGTU TECH CO LTD

Patent Information

Application Number
CN202510263081.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-04-04
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

The prior art is difficult to accurately understand and express complex semantic correlations in long texts, resulting in low quality of information extraction and poor correlation, which cannot meet the needs of deep semantic understanding.

Method used

The method of long text information extraction and association analysis based on large models is adopted, and precise information extraction and high-quality association analysis of long texts are realized through technical means such as calculating semantic density values, block processing, tensor fusion, hierarchical clustering, semantic network construction, multi-head attention mechanism and adaptive graph network.

Benefits of technology

It improves the intelligence level of long text processing, enhances the accuracy and integrity of information extraction, effectively captures the deep semantic relationships between entities, and improves the reliability and interpretability of the correlation path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761382A_ABST
    Figure CN119761382A_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for extracting and analyzing long text information and association based on a large model, which relates to the technical field of natural language processing, including determining sliding window parameters based on semantic density values ​​to divide long text into blocks, extracting feature vectors of text blocks and calculating semantic relevance, and constructing a hierarchical clustering feature matrix to merge text blocks to obtain semantic fragments. Afterwards, the semantic fragments are syntactically analyzed to construct a semantic dependency tree, and the semantic network is extracted and the entity relationship strength value is calculated to construct a semantic association graph. Finally, the node features are extracted using a pre-trained large model, the semantic representation is fused through a hierarchical attention mechanism, the features are enhanced by propagating an adaptive graph network, and candidate paths are generated through a hierarchical decision network, the optimal path is selected, and the associated path and probability distribution are output. The present invention can effectively extract key information from long texts and analyze the association relationship between entities, thereby improving the accuracy and efficiency of information extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to natural language processing technology, and in particular to a method and system for extracting and analyzing long text information based on a large model. Background Art

[0002] Existing text information extraction methods are mainly based on word frequency statistics and shallow semantic analysis, which makes it difficult to accurately understand and express the complex semantic associations in long texts, resulting in low quality and weak relevance of the extracted information, which cannot meet the needs of deep semantic understanding.

[0003] Traditional association analysis methods usually use artificial rules or simple statistical models, which lack full utilization of text semantic structure and contextual information. When processing long texts, they are prone to problems such as semantic fragmentation and association loss, and it is difficult to accurately identify and express the deep semantic relationships between entities.

[0004] With the development of large-scale pre-trained language models, new technical means have been provided for text information extraction and association analysis. However, there is still little research on the application of large models in long text processing. How to effectively combine the semantic understanding ability of large models with the structured representation advantages of graph networks to achieve accurate information extraction and high-quality association analysis of long texts still faces many challenges. Therefore, a long text information extraction and association analysis method based on large models is urgently needed to improve the intelligent level of long text processing. Summary of the invention

[0005] The embodiment of the present invention provides a method and system for long text information extraction and association analysis based on a large model, which can solve the problems in the prior art.

[0006] According to a first aspect of the embodiments of the present invention, A method for extracting and analyzing long text information based on a large model is provided, including: Receive the input long text, calculate the semantic density value of the long text, determine the sliding window parameters based on the density value to divide the text into multiple text blocks, extract the word frequency distribution matrix and syntactic dependency tree features in each text block, perform tensor fusion to obtain the text block feature vector, calculate the semantic relevance of the feature vectors of adjacent text blocks, construct a hierarchical clustering feature matrix, and merge the text blocks according to the hierarchical clustering feature matrix to obtain semantic fragments; Perform syntactic analysis on semantic fragments to construct semantic units, build a semantic dependency tree with semantic units as nodes, extract entity nodes and inter-entity relationships from the semantic dependency tree to obtain a semantic network, extract contextual features of entity nodes in the semantic network, generate entity semantic vectors through a multi-head attention mechanism, calculate entity relationship strength values, and combine them with semantic density values ​​to construct a semantic association graph; Based on the pre-trained large model, multi-perspective feature extraction is performed on the entity nodes in the semantic association graph to obtain node features, and the node features are input into the large model to obtain semantic representation. The semantic representation is fused with the entity semantic vector to obtain enhanced features. The enhanced features are propagated using an adaptive graph network to obtain semantic association features, which are input into a hierarchical decision network to generate candidate paths. The candidate paths are encoded at multiple granularities to obtain path vectors, the path scores are calculated to select the optimal path, and the associated paths and probability distributions are output after verification by the large model.

[0007] In an optional embodiment, Receive the input long text, calculate the semantic density value of the long text, determine the sliding window parameters based on the density value, and divide the text into blocks to obtain multiple text blocks including: Receive an input long text, construct a word position sequence for the long text, use a multi-scale sliding window to perform wavelet decomposition on the word position sequence to obtain a word frequency change coefficient and a word frequency baseline coefficient, construct a word mutation feature based on the word frequency change coefficient, construct a word steady-state feature based on the word frequency baseline coefficient, combine the word mutation feature and the word steady-state feature to obtain a word distribution feature, construct a co-occurrence matrix based on the word distribution feature, use a random walk algorithm to calculate the transition probability of a word node to obtain a word association network, perform modularity clustering on the word association network to obtain a word association group, and calculate the network topology entropy of the word association group to obtain a word distribution entropy; Constructing a multi-layer dependency syntax tree for the long text, extracting a core path and a branch path from the multi-layer dependency syntax tree, calculating a depth weighted value of the core path and a width weighted value of the branch path, and inputting the depth weighted value and the width weighted value into a multi-layer perceptron to obtain syntax complexity; Constructing an adaptive fusion network, inputting the word distribution entropy and syntactic complexity into the adaptive fusion network, dynamically weighting through a feature weight matrix and optimizing the residual connection to obtain a semantic density value; A density distribution curve is constructed for the semantic density value, and piecewise cubic spline interpolation is used for fitting to obtain a density aggregation interval. A dynamic programming algorithm is used based on an interval merging cost matrix to obtain a density threshold. The semantic density value is compared with the density threshold. According to the comparison result, a basic window size and a basic overlap rate are mapped to window parameters of multiple gears to obtain a sliding window size and an overlap rate parameter. The sliding window size and the overlap rate parameter are used to divide the long text into blocks to obtain multiple text blocks.

[0008] In an optional embodiment, Extract the word frequency distribution matrix and syntactic dependency tree features from each text block and perform tensor fusion to obtain the text block feature vector, calculate the semantic relevance of the feature vectors of adjacent text blocks, construct a hierarchical clustering feature matrix, and merge the text blocks according to the hierarchical clustering feature matrix to obtain semantic fragments including: Extract the local word frequency distribution of the text block to obtain the bottom-level features, calculate the semantic similarity between words to construct word clustering groups to obtain middle-level features, use the distribution probability of words in the word clustering groups as top-level features, combine the bottom-level features, middle-level features and top-level features to construct a hierarchical word frequency matrix, and use a bidirectional semantic propagation network to perform feature adjustment on the hierarchical word frequency matrix to obtain the word frequency distribution matrix; Identify sentence units in a text block by using sentence boundary identifiers, calculate the syntactic dependency strength between words in the sentence units, construct a syntactic dependency topology map using the syntactic dependency strength, extract syntactic dependency chains between sentence units from the syntactic dependency topology map, calculate semantic weights of word nodes on the syntactic dependency chain, and combine the semantic weights with the syntactic dependency chain to obtain a syntactic dependency tree feature; Inputting the word frequency distribution matrix and the syntactic dependency tree features into a probability density estimation model, the probability density estimation model includes a feature distribution learning unit and a density prediction unit, the feature distribution learning unit establishes a probability distribution model based on the word frequency distribution matrix and the syntactic dependency tree features, the density prediction unit calculates the probability density value of the feature based on the probability distribution model, and uses the probability density value to perform tensor fusion on the word frequency distribution matrix and the syntactic dependency tree features to obtain a text block feature vector; Constructing a semantic attenuation function based on the position distribution of the text block in the full text and the distribution of the feature vector of the text block, inputting the feature vectors of adjacent text blocks into the semantic attenuation function to obtain an attenuation coefficient, and using the attenuation coefficient to weight the similarity of the feature vectors of adjacent text blocks to obtain the semantic relevance; Inputting the text block feature vector into a bidirectional evaluation unit, the bidirectional evaluation unit includes an upward fusion subunit and a downward splitting subunit, the upward fusion subunit calculates the semantic consistency coefficient of text block merging, the downward splitting subunit calculates the information loss coefficient of text block splitting, taking the ratio of the semantic consistency coefficient to the information loss coefficient as a merging constraint coefficient, and combining the merging constraint coefficient with the semantic relevance to construct a hierarchical clustering feature matrix; The local benefit value of text block merging is calculated based on the hierarchical clustering feature matrix, the global impact value of the merging operation is calculated based on the local benefit value, the optimal merging sequence is determined according to the local benefit value and the global impact value, and the text blocks are progressively merged based on the optimal merging sequence to obtain semantic fragments.

[0009] In an optional embodiment, The semantic fragments are parsed to construct semantic units, and a semantic dependency tree is constructed with the semantic units as nodes. The entity nodes and the relationships between entities are extracted from the semantic dependency tree to obtain a semantic network including: Constructing a multi-granularity semantic dictionary based on a syntactic dependency tree, mapping words in the syntactic dependency tree to the multi-granularity semantic dictionary to obtain concept level codes of the words, calculating semantic associations between words based on the concept level codes, and performing hierarchical clustering on the semantic associations to obtain a semantic concept tree; Mapping the word nodes in the syntactic dependency tree to the semantic concept tree to obtain concept level features, calculating the hierarchical semantic weights between the word nodes according to the concept level features, constructing the hierarchical semantic weights as a semantic propagation tensor, calculating the semantic coverage of the word nodes in the semantic propagation tensor based on a random walk algorithm, and constructing a dynamic attention mask according to the semantic coverage; Based on the dynamic attention mask, the semantic representation of the word node is selectively propagated and updated, and the updated semantic representation is input into the adaptive semantic combination model, and the adaptive semantic combination model adjusts the combination parameters according to the semantic combination mode of the word node; Calculating the combination probability of the word nodes after being processed by the adaptive semantic combination model, constructing the word nodes whose combination probability is higher than a preset probability threshold as semantic units, and obtaining the target semantic units by applying context constraints and concept consistency constraints to the semantic units; Extracting semantic features, position features and concept features of the target semantic unit, inputting them into a multi-task learning model for entity recognition and entity disambiguation, and obtaining an entity node with a unique concept reference; Constructing a heterogeneous semantic dependency tree, taking the entity node as a main node, taking the concept node in the semantic concept tree as an auxiliary node, and constructing the association relationship between the main node and the auxiliary node as a heterogeneous edge; A graph attention network is applied on the heterogeneous semantic dependency tree to transfer information, the feature representations of the main node and the auxiliary node are fused, the semantic relationship between the entity nodes is judged based on the fused feature representation, the entity nodes are used as network nodes, and the semantic relationship is used as the connecting edge to construct a semantic network, and the semantic network is optimized to obtain a target semantic network.

[0010] In an optional embodiment, Contextual features are extracted from entity nodes in the semantic network, and entity semantic vectors are generated through a multi-head attention mechanism. The entity relationship strength value is calculated and combined with the semantic density value to construct a semantic association graph, including: Obtaining the original semantic vector of the entity node in the semantic network, projecting the original semantic vector into the multi-scale feature space to obtain the multi-scale node representation, extracting the direct adjacent nodes in each feature space based on the multi-scale node representation to construct a local semantic graph, and extracting multi-order adjacent nodes to construct a global structure graph; In the local semantic graph, the position distances between node pairs are calculated to obtain a spatial distance matrix, the semantic similarity is calculated based on the node semantic vectors to obtain a semantic similarity matrix, the spatial distance matrix and the semantic similarity matrix are adaptively combined to obtain an attention weight matrix, and the node semantic vectors are weighted and aggregated based on the attention weight matrix to obtain local context features, wherein the local context features include structural relationship information and semantic interaction information of the nodes in the local semantic graph; In the global structure graph, an attenuation coefficient matrix is ​​constructed based on the order distance between nodes, and the attenuation coefficient matrix and node features are recursively transferred in multiple levels. Feature selection and information filtering are performed based on the semantic similarity between nodes during each level of transfer to obtain global context features containing multi-order structural information; Inputting the original semantic vector, local context features and global context features into a self-calibrated multi-head attention network, the self-calibrated multi-head attention network performs feature transformation on the three features to obtain a query vector, a key vector and a value vector, calculates the dot product of the query vector and the key vector to obtain an attention score matrix, calculates the attention confidence based on the entropy value of the attention score matrix, adaptively adjusts the attention score matrix according to the attention confidence, and multiplies the adjusted attention score matrix with the value vector to obtain a calibrated attention feature; Adaptively weighted fusion of multiple calibrated attention features is performed to obtain enhanced entity semantic vectors, and the cosine similarity of enhanced entity semantic vectors between entity node pairs is calculated to obtain the entity relationship strength value; Constructing a deep information aggregation network, encoding the topological structure of the entity node in the local semantic graph into a structural encoding vector, encoding the original semantic vector into a semantic encoding vector, and encoding the propagation path of the entity node in the global structural graph into a context encoding vector; Designing a gated update unit to calculate a feature importance score based on the structure encoding vector, the semantic encoding vector, and the context encoding vector, and adaptively fusing the three encoding vectors according to the feature importance score to obtain a fused feature vector; Calculate the modulus of the fused feature vector to obtain the node semantic density value, construct a density distribution matrix based on the semantic density values ​​between node pairs, calculate the distribution difference of node pairs in the density distribution matrix to obtain the structural complexity coefficient, and perform weighted combination of the entity relationship strength value and the node semantic density value to obtain the edge weight value; use the entity node as a graph node, establish connecting edges for node pairs whose edge weight values ​​are greater than a preset weight threshold, and use the corresponding edge weight values ​​as the weights of the connecting edges to construct a semantic association graph.

[0011] In an optional embodiment, Based on the pre-trained large model, multi-view feature extraction is performed on the entity nodes in the semantic association graph to obtain node features, the node features are input into the large model to obtain semantic representation, the semantic representation is fused with the entity semantic vector to obtain enhanced features, and the adaptive graph network is used to propagate enhanced features to obtain semantic association features, which are input into the hierarchical decision network to generate candidate paths including: Based on the pre-trained large model, multi-view feature extraction is performed on the entity nodes in the semantic association graph, including extracting the text semantic features, structural features and context features of the nodes, fusing the extracted features to obtain node features, performing multi-level decomposition on the node features to obtain hierarchical features, and progressively combining the hierarchical features with the entity semantic vector to obtain semantic representation; Constructing multi-dimensional features of nodes based on the semantic representation, wherein the multi-dimensional features include local semantics, global context and topological structure information, adaptively weighting the multi-dimensional features through a hierarchical attention mechanism to obtain enhanced features, inputting the enhanced features into a feature optimization module, the feature optimization module calculating the semantic relevance between node pairs, constructing an information propagation matrix based on the semantic relevance, iteratively propagating the enhanced features using an adaptive graph network, introducing residual connections in each round of iteration to retain the original feature information, and obtaining semantic association features; Based on the semantic association features, multi-scale similarities between node pairs are calculated, including direct semantic similarity and path-based migration similarity, the multi-scale similarities are adaptively fused to obtain comprehensive similarity, the association strength between nodes is constructed based on the comprehensive similarity, a probability transfer matrix is ​​constructed according to the association strength, a random walk strategy with directional constraints is designed based on the probability transfer matrix, depth-restricted path sampling is performed on each starting node through the random walk strategy, and the semantic coherence score of the path is calculated using the semantic association features; The sampled path is input into a hierarchical decision network, the local semantic similarity of adjacent node pairs on the path is calculated, the global semantic consistency is evaluated based on the node feature sequence of the entire path, and the local semantic similarity and global semantic consistency are combined through adaptive weights to obtain a path quality score; The candidate paths are sorted in descending order according to the path quality scores, and the structural overlap and semantic redundancy between the paths are calculated for deduplication filtering, and finally the path with the highest score and meeting the difference threshold is selected to construct a candidate path set.

[0012] In an optional embodiment, The candidate paths are multi-granularly encoded to obtain path vectors, and the path scores are calculated to select the optimal path. After verification by the large model, the associated paths and probability distribution are output, including: Acquire semantic association features of entity nodes in the candidate path, use a bidirectional gated recursive network to encode the entity node sequence in the candidate path to obtain a node-level feature representation, use a sliding window to divide the candidate path into multiple sub-paths and extract local features to obtain a sub-path-level representation, and use a multi-layer attention mechanism to fuse the node-level feature representation with the sub-path-level representation to obtain a path vector; Calculating the internal consistency score between nodes based on the path vector, calculating the relevance score between the path vector and the semantic association feature, calculating the path diversity score based on the path vector, and weightedly fusing the internal consistency score, the relevance score and the diversity score using adaptive weights to obtain a path comprehensive score; According to the path comprehensive score, the candidate paths are sorted in descending order, a preset number of paths with the highest scores are selected to construct an initial path set, high-quality path fragments are extracted from the initial path set to be reorganized to generate new candidate paths, the path comprehensive score is calculated for the new candidate paths, the newly generated candidate paths with higher scores than the original paths are updated to the path set, and the path reorganization and score update are repeated until the score improvement of the path set is less than a preset score threshold; Each path in the path set is converted into a natural language description, a verification prompt template including verification instructions and constraints is constructed based on the natural language description, the verification prompt template is input into a pre-trained language model for multiple rounds of interactive verification, the associated paths that pass the verification are screened based on the results of the multiple rounds of interactive verification, the comprehensive score of the path is converted into a probability distribution to obtain the confidence of each associated path, and the associated path and its corresponding confidence distribution are output.

[0013] According to a second aspect of the embodiments of the present invention, A long text information extraction and association analysis system based on a large model is provided, including: The first unit is used to receive an input long text, calculate the semantic density value of the long text, determine the sliding window parameter based on the density value to perform block processing on the text to obtain multiple text blocks, extract the word frequency distribution matrix and syntactic dependency tree features in each text block to perform tensor fusion to obtain a text block feature vector, calculate the semantic relevance of feature vectors of adjacent text blocks, construct a hierarchical clustering feature matrix, and merge the text blocks according to the hierarchical clustering feature matrix to obtain semantic fragments; The second unit is used to perform syntactic analysis on semantic fragments to construct semantic units, construct a semantic dependency tree with semantic units as nodes, extract entity nodes and inter-entity relationships from the semantic dependency tree to obtain a semantic network, extract contextual features of entity nodes in the semantic network, generate entity semantic vectors through a multi-head attention mechanism, calculate entity relationship strength values, and combine them with semantic density values ​​to construct a semantic association graph; The third unit is used to perform multi-perspective feature extraction on entity nodes in the semantic association graph based on the pre-trained large model to obtain node features, input the node features into the large model to obtain semantic representation, fuse the semantic representation with the entity semantic vector to obtain enhanced features, use an adaptive graph network to propagate the enhanced features to obtain semantic association features, input the hierarchical decision network to generate candidate paths, perform multi-granularity encoding on the candidate paths to obtain path vectors, calculate the path score to select the optimal path, and output the associated path and probability distribution after verification by the large model.

[0014] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0015] A fourth aspect of the embodiments of the present invention is: A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0016] In this embodiment, through the adaptive sliding window mechanism and hierarchical clustering algorithm based on semantic density value, semantic fragments in long texts can be more accurately identified and divided, avoiding omissions or misjudgments of long text information processing by traditional methods, thereby improving the accuracy and completeness of information extraction. By constructing a semantic network using syntactic analysis and semantic dependency trees, and generating entity semantic vectors in combination with contextual features and attention mechanisms, the semantic associations between entities can be captured more effectively, and multi-perspective features can be integrated through adaptive graph networks and hierarchical attention mechanisms to further enhance the effectiveness and depth of semantic association analysis. Based on pre-trained large models and hierarchical decision networks, candidate paths can be intelligently inferred and generated, and the optimal path can be selected through multi-granularity encoding and progressive optimization. Finally, the output association path and probability distribution are verified by the large model to achieve reasoning and verification of complex semantic relationships and improve the reliability and interpretability of association paths. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of a flow chart of a method for extracting and analyzing long text information based on a large model according to an embodiment of the present invention; Figure 2 It is a structural diagram of a long text information extraction and association analysis system based on a large model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0020] Figure 1 FIG. 1 is a flow chart of a method for extracting and analyzing long text information based on a large model according to an embodiment of the present invention. Figure 1 As shown, the method includes: S101. receiving an input long text, calculating a semantic density value of the long text, determining a sliding window parameter based on the density value to perform block processing on the text to obtain a plurality of text blocks, extracting a word frequency distribution matrix and a syntactic dependency tree feature in each text block to perform tensor fusion to obtain a text block feature vector, calculating the semantic relevance of feature vectors of adjacent text blocks, constructing a hierarchical clustering feature matrix, and merging text blocks according to the hierarchical clustering feature matrix to obtain semantic fragments; S102. Perform syntactic analysis on the semantic fragments to construct semantic units, construct a semantic dependency tree with the semantic units as nodes, extract entity nodes and inter-entity relationships from the semantic dependency tree to obtain a semantic network, extract context features from the entity nodes in the semantic network, generate entity semantic vectors through a multi-head attention mechanism, calculate entity relationship strength values, and construct a semantic association graph by combining them with semantic density values; S103. Based on the pre-trained large model, multi-perspective feature extraction is performed on the entity nodes in the semantic association graph to obtain node features, the node features are input into the large model to obtain semantic representation, the semantic representation is fused with the entity semantic vector to obtain enhanced features, an adaptive graph network is used to propagate the enhanced features to obtain semantic association features, the candidate paths are input into the hierarchical decision network to generate candidate paths, the candidate paths are multi-granularly encoded to obtain path vectors, the path scores are calculated to select the optimal path, and the associated paths and probability distributions are output after verification by the large model.

[0021] In an optional implementation, receiving an input long text, calculating a semantic density value of the long text, and determining a sliding window parameter based on the density value to perform block processing on the text to obtain a plurality of text blocks includes: Receive an input long text, construct a word position sequence for the long text, use a multi-scale sliding window to perform wavelet decomposition on the word position sequence to obtain a word frequency change coefficient and a word frequency baseline coefficient, construct a word mutation feature based on the word frequency change coefficient, construct a word steady-state feature based on the word frequency baseline coefficient, combine the word mutation feature and the word steady-state feature to obtain a word distribution feature, construct a co-occurrence matrix based on the word distribution feature, use a random walk algorithm to calculate the transition probability of a word node to obtain a word association network, perform modularity clustering on the word association network to obtain a word association group, and calculate the network topology entropy of the word association group to obtain a word distribution entropy; Constructing a multi-layer dependency syntax tree for the long text, extracting a core path and a branch path from the multi-layer dependency syntax tree, calculating a depth weighted value of the core path and a width weighted value of the branch path, and inputting the depth weighted value and the width weighted value into a multi-layer perceptron to obtain syntax complexity; Constructing an adaptive fusion network, inputting the word distribution entropy and syntactic complexity into the adaptive fusion network, dynamically weighting through a feature weight matrix and optimizing the residual connection to obtain a semantic density value; A density distribution curve is constructed for the semantic density value, and piecewise cubic spline interpolation is used for fitting to obtain a density aggregation interval. A dynamic programming algorithm is used based on an interval merging cost matrix to obtain a density threshold. The semantic density value is compared with the density threshold. According to the comparison result, a basic window size and a basic overlap rate are mapped to window parameters of multiple gears to obtain a sliding window size and an overlap rate parameter. The sliding window size and the overlap rate parameter are used to divide the long text into blocks to obtain multiple text blocks.

[0022] Taking a long text as input, the semantic density value of the text is first calculated, and then the parameters of text segmentation are dynamically adjusted according to the semantic density value, and finally the long text is segmented into multiple text blocks. This method can adaptively process long texts of different themes and styles, and improve the accuracy and efficiency of subsequent text analysis tasks.

[0023] First, the input long text is preprocessed, including removing punctuation marks, converting to lowercase, etc. For example, the input long text is "The quick brown fox jumps over the lazy dog. This is a testsentence.", which becomes "the quick brown fox jumps over the lazy dog ​​this is atest sentence" after preprocessing.

[0024] Next, the word distribution entropy is calculated. A word position sequence is constructed to record the position of each word in the text. For example, "the" appears twice in the above example, at positions 1 and 9 respectively. Then, a multi-scale sliding window is used to perform wavelet decomposition on the word position sequence to obtain the word frequency change coefficient and the word frequency baseline coefficient. For example, assuming the window size is 3, the first window contains "the", "quick" and "brown", and their word frequency changes and baselines can be calculated. Based on the word frequency change coefficient, a word mutation feature is constructed to reflect the frequency change of words in local areas. Based on the word frequency baseline coefficient, a word steady-state feature is constructed to reflect the distribution of words in the entire text. The word mutation feature and the word steady-state feature are combined to obtain the word distribution feature. Then a co-occurrence matrix is ​​constructed. For example, if "the" and "quick" appear in the same window, the corresponding element values ​​in the co-occurrence matrix are added by 1. The random walk algorithm is used to calculate the transition probability of word nodes to simulate the semantic association between words. Finally, modularity clustering is performed on the word association network to obtain word association groups, and the network topological entropy of the word association groups is calculated as the word distribution entropy.

[0025] At the same time, calculate the syntactic complexity. Construct a multi-layer dependency syntactic tree for the long text. For example, in the dependency syntactic tree of "The quick brownfox jumps over the lazy dog", "jumps" is the root node, "fox" is the subject, "over" is the preposition, and "dog" is the object of the preposition. Extract the core path and branch path in the multi-layer dependency syntactic tree. For example, "foxjumps over dog" is a core path. Calculate the depth weighted value of the core path, for example, weight it according to the depth of the nodes in the path. Calculate the width weighted value of the branch path, for example, weight it according to the number of branch paths. Input the depth weighted value and the width weighted value into the multi-layer perceptron to obtain the syntactic complexity.

[0026] Then, the word distribution entropy and syntactic complexity are input into the adaptive fusion network. The network contains a feature weight matrix, which is used to dynamically adjust the weights of word distribution entropy and syntactic complexity. For example, if the topic of the text is more abstract, the weight of word distribution entropy will be higher. The semantic density value is obtained by dynamic weighting through the feature weight matrix and residual connection optimization.

[0027] Next, the sliding window parameters are determined according to the semantic density value. A density distribution curve is constructed for the semantic density value, and piecewise cubic spline interpolation is used for fitting to obtain a density clustering interval. For example, if the semantic density value is relatively concentrated between 0.5 and 0.7, this is a density clustering interval. Based on the interval merging cost matrix, a dynamic programming algorithm is used to obtain the density threshold. The semantic density value is compared with the density threshold. For example, if the semantic density value is higher than the density threshold, it is considered that the amount of information in this part of the text is large. According to the comparison results, the basic window size and the basic overlap rate are mapped to window parameters of multiple gears to obtain the sliding window size and overlap rate parameters. For example, if the semantic density value is high, a smaller window size and a larger overlap rate are selected to divide the text more finely.

[0028] Finally, the sliding window size and overlap ratio parameters are used to divide the long text into blocks to obtain multiple text blocks. For example, if the window size is 10 and the overlap ratio is 5, the first text block contains the first 10 words, the second text block contains the 6th to 15th words, and so on.

[0029] In this embodiment, through multi-scale sliding window and wavelet decomposition, not only can the steady-state characteristics and mutation characteristics of word frequency in the text be captured accurately, but also a word association network can be constructed to deeply reveal the semantic association and co-occurrence pattern between words. Combined with the depth and width weighted analysis of the multi-layer dependency syntax tree, the syntactic complexity is effectively measured, thereby more comprehensively characterizing the structural characteristics of the text. The introduction of the adaptive fusion network, through residual connection and dynamic weighting mechanism, fuses the word distribution entropy and syntactic complexity into a semantic density value, thereby improving the expressive ability of text semantic information. The combination of density distribution curve and piecewise cubic spline interpolation not only realizes the smooth fitting of the density aggregation interval, but also efficiently determines the density threshold through dynamic programming, thereby adaptively adjusting the block parameters in long texts of different themes and styles. This adaptive text block method significantly improves the accuracy and efficiency of text analysis, and is particularly suitable for natural language processing tasks that require refined processing and in-depth understanding.

[0030] In an optional implementation, extracting the word frequency distribution matrix and the syntactic dependency tree features in each text block and performing tensor fusion to obtain a text block feature vector, calculating the semantic relevance of the feature vectors of adjacent text blocks, constructing a hierarchical clustering feature matrix, and merging the text blocks according to the hierarchical clustering feature matrix to obtain semantic fragments includes: Extract the local word frequency distribution of the text block to obtain the bottom-level features, calculate the semantic similarity between words to construct word clustering groups to obtain middle-level features, use the distribution probability of words in the word clustering groups as top-level features, combine the bottom-level features, middle-level features and top-level features to construct a hierarchical word frequency matrix, and use a bidirectional semantic propagation network to perform feature adjustment on the hierarchical word frequency matrix to obtain the word frequency distribution matrix; Identify sentence units in a text block by using sentence boundary identifiers, calculate the syntactic dependency strength between words in the sentence units, construct a syntactic dependency topology map using the syntactic dependency strength, extract syntactic dependency chains between sentence units from the syntactic dependency topology map, calculate semantic weights of word nodes on the syntactic dependency chain, and combine the semantic weights with the syntactic dependency chain to obtain a syntactic dependency tree feature; Inputting the word frequency distribution matrix and the syntactic dependency tree features into a probability density estimation model, the probability density estimation model includes a feature distribution learning unit and a density prediction unit, the feature distribution learning unit establishes a probability distribution model based on the word frequency distribution matrix and the syntactic dependency tree features, the density prediction unit calculates the probability density value of the feature based on the probability distribution model, and uses the probability density value to perform tensor fusion on the word frequency distribution matrix and the syntactic dependency tree features to obtain a text block feature vector; Constructing a semantic attenuation function based on the position distribution of the text block in the full text and the distribution of the feature vector of the text block, inputting the feature vectors of adjacent text blocks into the semantic attenuation function to obtain an attenuation coefficient, and using the attenuation coefficient to weight the similarity of the feature vectors of adjacent text blocks to obtain the semantic relevance; Inputting the text block feature vector into a bidirectional evaluation unit, the bidirectional evaluation unit includes an upward fusion subunit and a downward splitting subunit, the upward fusion subunit calculates the semantic consistency coefficient of text block merging, the downward splitting subunit calculates the information loss coefficient of text block splitting, taking the ratio of the semantic consistency coefficient to the information loss coefficient as a merging constraint coefficient, and combining the merging constraint coefficient with the semantic relevance to construct a hierarchical clustering feature matrix; The local benefit value of text block merging is calculated based on the hierarchical clustering feature matrix, the global impact value of the merging operation is calculated based on the local benefit value, the optimal merging sequence is determined according to the local benefit value and the global impact value, and the text blocks are progressively merged based on the optimal merging sequence to obtain semantic fragments.

[0031] Exemplarily, first, the word frequency distribution matrix and syntactic dependency tree features are extracted for each text block. The word frequency distribution matrix is ​​constructed in a hierarchical manner, integrating bottom-level, middle-level and top-level features. The bottom-level feature is the local word frequency distribution of the text block, which counts the number of times each word appears in the text block. The middle-level feature is a word clustering group constructed based on the semantic similarity between words. For example, a knowledge base such as WordNet is used to calculate the semantic similarity between words, and then a clustering algorithm (such as k-means) is used to aggregate semantically similar words together. The top-level feature is the distribution probability of words in the word clustering group, which indicates the possibility that a word belongs to different semantic groups. The features of these three levels are combined to construct a hierarchical word frequency matrix. Then, a bidirectional semantic propagation network is used to adjust the features of the hierarchical word frequency matrix, and finally a word frequency distribution matrix is ​​obtained.

[0032] The steps for extracting syntactic dependency tree features are as follows: First, sentence boundary identifiers (such as periods, question marks, and exclamation marks) are used to identify sentence units in a text block. Then, for each sentence unit, the strength of the syntactic dependency relationship between the words is calculated. For example, tools such as Stanford CoreNLP can be used for syntactic analysis to obtain the dependency relationship and dependency type between words. Next, a syntactic dependency topology graph is constructed using the syntactic dependency strength. The nodes in the graph represent words, the edges represent the dependency relationship between words, and the weight of the edge represents the dependency strength. Finally, the syntactic dependency chain between sentence units is extracted from the syntactic dependency topology graph, and the semantic weight of the word node on the syntactic dependency chain is calculated. For example, different weights can be assigned according to the position of the word in the dependency chain and the dependency type. The semantic weight is combined with the syntactic dependency chain to obtain the syntactic dependency tree feature.

[0033] Next, the word frequency distribution matrix and the syntactic dependency tree features are input into the probability density estimation model for tensor fusion. The model includes a feature distribution learning unit and a density prediction unit. The feature distribution learning unit establishes a probability distribution model based on the input features. For example, a Gaussian mixture model can be used to fit the distribution of features. The density prediction unit calculates the probability density value of the feature based on the probability distribution model. The word frequency distribution matrix and the syntactic dependency tree features are tensor fused using the probability density value to obtain the text block feature vector. For example, the probability density value can be used as a weight to perform a weighted summation on the word frequency distribution matrix and the syntactic dependency tree features.

[0034] Then, the semantic relevance of the feature vectors of adjacent text blocks is calculated. First, a semantic attenuation function is constructed based on the position distribution of the text blocks in the full text and the distribution of the feature vectors of the text blocks. For example, the attenuation function can be defined based on the distance between the text blocks and the cosine similarity between the feature vectors. The feature vectors of adjacent text blocks are input into the semantic attenuation function to obtain the attenuation coefficient. The similarity of the feature vectors of adjacent text blocks is weighted using the attenuation coefficient to obtain the semantic relevance. For example, the attenuation coefficient can be multiplied by the cosine similarity between the feature vectors.

[0035] Next, a hierarchical clustering feature matrix is ​​constructed. The feature vector of the text block is input into a bidirectional evaluation unit, which includes an upward fusion subunit and a downward splitting subunit. The upward fusion subunit calculates the semantic consistency coefficient of the text block merger. For example, the similarity between the feature vector of the merged text block and the average value of the feature vector of the original text block can be calculated. The downward splitting subunit calculates the information loss coefficient of the text block split. For example, the degree of difference between the feature vector of the text block after the split and the feature vector of the original text block can be calculated. The ratio of the semantic consistency coefficient to the information loss coefficient is used as the merger constraint coefficient. The merger constraint coefficient is combined with the semantic relevance to construct a hierarchical clustering feature matrix.

[0036] Finally, the text blocks are merged according to the hierarchical clustering feature matrix to obtain semantic fragments. The local benefit value of text block merging is calculated based on the hierarchical clustering feature matrix. For example, the semantic relevance can be used as the local benefit value. The global impact value of the merge operation is calculated based on the local benefit value. For example, the impact of the merge operation on the subsequent merge steps can be considered. The optimal merge sequence is determined based on the local benefit value and the global impact value. For example, a greedy algorithm or a dynamic programming algorithm can be used to find the optimal merge sequence. The text blocks are progressively merged based on the optimal merge sequence to obtain semantic fragments.

[0037] Suppose there are two adjacent text blocks, "I like to eat apples" and "Apples are fruits". The word frequency distribution matrix can be expressed as the number of occurrences of each word in the two text blocks. The syntactic dependency tree feature can be expressed as a subject-predicate relationship between "I" and "eat", a verb-object relationship between "eat" and "apple", etc. Through the probability density estimation model, these two features can be fused into a text block feature vector. The semantic decay function can calculate the decay coefficient based on the position and feature vector of the two text blocks in the full text. Assume that the semantic relevance is 0.8 and the merge constraint coefficient is 0.9. Then the hierarchical clustering feature matrix can be expressed as the possibility of merging between the two text blocks. According to the hierarchical clustering feature matrix, the two text blocks can be merged into a semantic segment "I like to eat apples, apples are fruits".

[0038] In this embodiment, by fusing word frequency distribution and syntactic dependency tree features, and using semantic decay function and bidirectional evaluation unit, the semantic relationship between text blocks can be captured more accurately, thereby improving the accuracy of semantic segment merging. The construction process of hierarchical word frequency matrix and syntactic dependency tree features is clear and transparent, making the model more interpretable. The semantic decay function can effectively reduce the impact of noise and improve the robustness of the model.

[0039] In an optional implementation, performing syntactic analysis on the semantic fragments to construct semantic units, constructing a semantic dependency tree with the semantic units as nodes, and extracting entity nodes and relationships between entities from the semantic dependency tree to obtain a semantic network includes: Constructing a multi-granularity semantic dictionary based on a syntactic dependency tree, mapping words in the syntactic dependency tree to the multi-granularity semantic dictionary to obtain concept level codes of the words, calculating semantic associations between words based on the concept level codes, and performing hierarchical clustering on the semantic associations to obtain a semantic concept tree; Mapping the word nodes in the syntactic dependency tree to the semantic concept tree to obtain concept level features, calculating the hierarchical semantic weights between the word nodes according to the concept level features, constructing the hierarchical semantic weights as a semantic propagation tensor, calculating the semantic coverage of the word nodes in the semantic propagation tensor based on a random walk algorithm, and constructing a dynamic attention mask according to the semantic coverage; Based on the dynamic attention mask, the semantic representation of the word node is selectively propagated and updated, and the updated semantic representation is input into the adaptive semantic combination model, and the adaptive semantic combination model adjusts the combination parameters according to the semantic combination mode of the word node; Calculating the combination probability of the word nodes after being processed by the adaptive semantic combination model, constructing the word nodes whose combination probability is higher than a preset probability threshold as semantic units, and obtaining the target semantic units by applying context constraints and concept consistency constraints to the semantic units; Extracting semantic features, position features and concept features of the target semantic unit, inputting them into a multi-task learning model for entity recognition and entity disambiguation, and obtaining an entity node with a unique concept reference; Constructing a heterogeneous semantic dependency tree, taking the entity node as a main node, taking the concept node in the semantic concept tree as an auxiliary node, and constructing the association relationship between the main node and the auxiliary node as a heterogeneous edge; A graph attention network is applied on the heterogeneous semantic dependency tree to transfer information, the feature representations of the main node and the auxiliary node are fused, the semantic relationship between the entity nodes is judged based on the fused feature representation, the entity nodes are used as network nodes, and the semantic relationship is used as the connecting edge to construct a semantic network, and the semantic network is optimized to obtain a target semantic network.

[0040] For example, first, the input text is segmented and POS tagged, and then a syntactic dependency tree is constructed using a dependency syntactic analysis tool, which describes the syntactic relationship between words in a sentence. For example, for the sentence "Cats like to eat fish", in the constructed syntactic dependency tree, "like" is the root node, "cat" is the subject of "like", and "fish" is the object of "like".

[0041] Next, a multi-granularity semantic dictionary is constructed. This dictionary contains concepts at different levels. For example, "animal" contains subordinate concepts such as "cat" and "fish", and "food" contains subordinate concepts such as "fish". By mapping the words in the syntactic dependency tree to the dictionary, the conceptual hierarchical encoding of the words can be obtained. For example, the encoding of "cat" can be "animal-cat", and the encoding of "fish" can be "animal-fish" and "food-fish". Based on these encodings, the semantic association between words can be calculated. For example, the semantic association between "cat" and "fish" is higher than the semantic association between "cat" and "table". Hierarchical clustering of semantic associations is performed to obtain a semantic concept tree. For example, "cat" and "fish" may be clustered under the "animal" node.

[0042] By mapping the word nodes in the syntactic dependency tree to the semantic concept tree, we can obtain the concept hierarchy features. Based on these features, we calculate the hierarchical semantic weights between the word nodes. For example, the semantic weight between "cat" and "like" is higher than the semantic weight between "cat" and "table". These weights are constructed as a semantic propagation tensor. In this tensor, the semantic coverage of the word nodes is calculated using a random walk algorithm. For example, the semantic coverage of "like" may include "cat" and "fish". A dynamic attention mask is constructed based on the semantic coverage to selectively propagate and update the semantic representation of the word nodes.

[0043] The updated semantic representation is input into the adaptive semantic combination model. The model adjusts the combination parameters according to the semantic combination pattern of the word nodes. For example, for "like to eat fish", the model will pay more attention to the combination of "like" and "eat", and the combination of "eat" and "fish". The combination probability of the word nodes after being processed by the model is calculated, and the word nodes with a combination probability higher than the preset probability threshold are constructed as semantic units. For example, "like to eat" and "eat fish" may be constructed as semantic units. By imposing context constraints and concept consistency constraints on semantic units, for example, judging from the context that "like to eat" refers to "cats like to eat", and "eat fish" refers to the action of "eating fish", the target semantic unit "cats like to eat fish" is obtained.

[0044] The semantic features, positional features, and conceptual features of the target semantic unit are extracted and input into the multi-task learning model for entity recognition and entity disambiguation. For example, "cat" and "fish" are identified as entities, and the concept of "fish" is disambiguated as "animal-fish" or "food-fish", and finally the entity nodes "cat (animal)" and "fish (food)" with unique concept references are obtained.

[0045] Construct a heterogeneous semantic dependency tree, taking the entity node as the main node and the concept node in the semantic concept tree as the auxiliary node, and construct the association relationship between the main node and the auxiliary node as a heterogeneous edge, for example, construct an edge between "cat (animal)" and "animal". Apply the graph attention network to the heterogeneous semantic dependency tree for information transmission, and fuse the feature representations of the main node and the auxiliary node. Determine the semantic relationship between the entity nodes based on the fused feature representation, for example, determine that there is a "like to eat" relationship between "cat" and "fish". Construct a semantic network using the entity nodes as network nodes and the semantic relationship as the connecting edge, for example, construct a semantic network containing the nodes "cat" and "fish" and the connecting edge "like to eat". Finally, optimize the semantic network, for example, remove redundant edges or nodes, and obtain the target semantic network.

[0046] In this embodiment, by integrating syntactic, semantic and conceptual information, the semantics of the text can be understood more accurately, thereby more accurately identifying entities and judging the relationship between entities. By constructing a heterogeneous semantic dependency tree and applying a graph attention network, the association between entities and concepts can be better captured, thereby building a more expressive semantic network. By using a multi-granularity semantic dictionary and an adaptive semantic combination model, the computational complexity can be effectively reduced, thereby improving the efficiency of constructing a semantic network.

[0047] In an optional implementation, context features are extracted from entity nodes in the semantic network, entity semantic vectors are generated through a multi-head attention mechanism, entity relationship strength values ​​are calculated, and a semantic association graph is constructed by combining the entity relationship strength values ​​with the semantic density values, including: Obtaining the original semantic vector of the entity node in the semantic network, projecting the original semantic vector into the multi-scale feature space to obtain the multi-scale node representation, extracting the direct adjacent nodes in each feature space based on the multi-scale node representation to construct a local semantic graph, and extracting multi-order adjacent nodes to construct a global structure graph; In the local semantic graph, the position distances between node pairs are calculated to obtain a spatial distance matrix, the semantic similarity is calculated based on the node semantic vectors to obtain a semantic similarity matrix, the spatial distance matrix and the semantic similarity matrix are adaptively combined to obtain an attention weight matrix, and the node semantic vectors are weighted and aggregated based on the attention weight matrix to obtain local context features, wherein the local context features include structural relationship information and semantic interaction information of the nodes in the local semantic graph; In the global structure graph, an attenuation coefficient matrix is ​​constructed based on the order distance between nodes, and the attenuation coefficient matrix and node features are recursively transferred in multiple levels. Feature selection and information filtering are performed based on the semantic similarity between nodes during each level of transfer to obtain global context features containing multi-order structural information; Inputting the original semantic vector, local context features and global context features into a self-calibrated multi-head attention network, the self-calibrated multi-head attention network performs feature transformation on the three features to obtain a query vector, a key vector and a value vector, calculates the dot product of the query vector and the key vector to obtain an attention score matrix, calculates the attention confidence based on the entropy value of the attention score matrix, adaptively adjusts the attention score matrix according to the attention confidence, and multiplies the adjusted attention score matrix with the value vector to obtain a calibrated attention feature; Adaptively weighted fusion of multiple calibrated attention features is performed to obtain enhanced entity semantic vectors, and the cosine similarity of enhanced entity semantic vectors between entity node pairs is calculated to obtain the entity relationship strength value; Constructing a deep information aggregation network, encoding the topological structure of the entity node in the local semantic graph into a structural encoding vector, encoding the original semantic vector into a semantic encoding vector, and encoding the propagation path of the entity node in the global structural graph into a context encoding vector; Designing a gated update unit to calculate a feature importance score based on the structure encoding vector, the semantic encoding vector, and the context encoding vector, and adaptively fusing the three encoding vectors according to the feature importance score to obtain a fused feature vector; Calculate the modulus of the fused feature vector to obtain the node semantic density value, construct a density distribution matrix based on the semantic density values ​​between node pairs, calculate the distribution difference of node pairs in the density distribution matrix to obtain the structural complexity coefficient, and perform weighted combination of the entity relationship strength value and the node semantic density value to obtain the edge weight value; use the entity node as a graph node, establish connecting edges for node pairs whose edge weight values ​​are greater than a preset weight threshold, and use the corresponding edge weight values ​​as the weights of the connecting edges to construct a semantic association graph.

[0048] Exemplarily, first, obtain the initial semantic vector of each entity node in the semantic network. For example, a word embedding vector or a pre-trained entity representation can be used as the initial vector. Suppose there are two entity nodes "apple" and "fruit", and their initial semantic vectors are [0.2, 0.5, 0.8] and [0.3, 0.6, 0.7], respectively. Then, these initial semantic vectors are projected into feature spaces of multiple scales to obtain multi-scale node representations. For example, the original vectors can be multiplied by different transformation matrices to obtain feature representations at different dimensions or granularities.

[0049] Next, based on the multi-scale node representation, the neighbor information of the node is extracted in each feature space. For the local semantic graph, directly adjacent nodes are extracted. For example, the neighbor nodes of "apple" can be "fruit", "red", and "sweet". For the global structure graph, multi-order adjacent nodes are extracted. For example, the two-hop neighbor nodes of "apple" can be extracted, including the one-hop neighbors of "fruit", such as "food" and "nutrition".

[0050] In the local semantic graph, the spatial distance and semantic similarity between pairs of nodes are calculated. The spatial distance can be defined as the shortest path length of a node in the graph, for example, the distance between "apple" and "red" is 1. The semantic similarity can be calculated based on the semantic vector of the node, for example, the semantic similarity between "apple" and "fruit" is calculated using cosine similarity. The spatial distance and semantic similarity are adaptively combined to obtain an attention weight matrix. For example, the similarity can be weighted according to the distance, and the closer the distance, the greater the weight. Then, the semantic vectors of the nodes are weighted and aggregated based on the attention weight matrix to obtain local context features.

[0051] In the global structure graph, the attenuation coefficient matrix is ​​constructed according to the order distance between nodes. For example, the greater the distance, the smaller the attenuation coefficient. The attenuation coefficient matrix and the node features are recursively transferred in multiple levels. When transferring at each level, feature selection and information filtering are performed according to the semantic similarity between nodes to obtain global context features containing multi-order structural information.

[0052] The original semantic vector, local context features, and global context features are input into the self-calibrated multi-head attention network. The network performs feature transformation on the three features to obtain the query vector, key vector, and value vector. The dot product of the query vector and the key vector is calculated to obtain the attention score matrix. The attention confidence is calculated based on the entropy value of the attention score matrix, and the attention score matrix is ​​adaptively adjusted according to the attention confidence. The adjusted attention score matrix is ​​multiplied by the value vector to obtain the calibrated attention feature.

[0053] Adaptively weight the fusion of multiple calibrated attention features to obtain an enhanced entity semantic vector. For example, the features can be weighted according to the confidence of each attention head. The cosine similarity of the enhanced entity semantic vectors between pairs of entity nodes is calculated to obtain the entity relationship strength value. For example, the cosine similarity of the enhanced semantic vectors of "apple" and "fruit" is 0.9.

[0054] A deep information aggregation network is constructed to encode the topological structure of entity nodes in the local semantic graph into a structural encoding vector, the original semantic vector is encoded into a semantic encoding vector, and the propagation path of the entity node in the global structural graph is encoded into a context encoding vector.

[0055] Design a gated update unit to calculate the feature importance score based on the structure encoding vector, semantic encoding vector, and context encoding vector. For example, a fully connected layer can be used to perform a weighted sum of the three vectors to obtain the importance score. Adaptively fuse the three encoding vectors based on the feature importance score to obtain a fused feature vector.

[0056] Calculate the modulus of the fused feature vector to obtain the node semantic density value. For example, the semantic density value of "apple" is 0.8. Construct a density distribution matrix based on the semantic density values ​​between node pairs. Calculate the distribution difference of node pairs in the density distribution matrix to obtain the structural complexity coefficient. Perform a weighted combination of the entity relationship strength value and the node semantic density value to obtain the edge weight value. For example, the edge weight value of "apple" and "fruit" is 0.85. Take the entity nodes as graph nodes, establish connecting edges for node pairs whose edge weight values ​​are greater than the preset weight threshold (for example, 0.5), use the corresponding edge weight values ​​as the weights of the connecting edges, and construct a semantic association graph.

[0057] In this embodiment, through multi-scale feature extraction and attention mechanism, the local and global context information of the entity can be captured more comprehensively, thereby generating a more expressive entity semantic vector and improving the accuracy of entity representation. Combining semantic density and structural complexity to construct edge weights can more accurately reflect the strength of semantic associations between entities, thereby enhancing the reliability of the semantic association graph. More accurate entity representation and more reliable semantic association graphs can effectively improve the performance of downstream tasks, such as knowledge graph completion, relationship extraction, etc.

[0058] In an optional implementation, multi-view feature extraction is performed on entity nodes in a semantic association graph based on a pre-trained large model to obtain node features, the node features are input into the large model to obtain semantic representation, the semantic representation is fused with the entity semantic vector to obtain enhanced features, an adaptive graph network is used to propagate the enhanced features to obtain semantic association features, and the candidate paths are generated by inputting into a hierarchical decision network, including: Based on the pre-trained large model, multi-view feature extraction is performed on the entity nodes in the semantic association graph, including extracting the text semantic features, structural features and context features of the nodes, fusing the extracted features to obtain node features, performing multi-level decomposition on the node features to obtain hierarchical features, and progressively combining the hierarchical features with the entity semantic vector to obtain semantic representation; Constructing multi-dimensional features of nodes based on the semantic representation, wherein the multi-dimensional features include local semantics, global context and topological structure information, adaptively weighting the multi-dimensional features through a hierarchical attention mechanism to obtain enhanced features, inputting the enhanced features into a feature optimization module, the feature optimization module calculating the semantic relevance between node pairs, constructing an information propagation matrix based on the semantic relevance, iteratively propagating the enhanced features using an adaptive graph network, introducing residual connections in each round of iteration to retain the original feature information, and obtaining semantic association features; Based on the semantic association features, multi-scale similarities between node pairs are calculated, including direct semantic similarity and path-based migration similarity, the multi-scale similarities are adaptively fused to obtain comprehensive similarity, the association strength between nodes is constructed based on the comprehensive similarity, a probability transfer matrix is ​​constructed according to the association strength, a random walk strategy with directional constraints is designed based on the probability transfer matrix, depth-restricted path sampling is performed on each starting node through the random walk strategy, and the semantic coherence score of the path is calculated using the semantic association features; The sampled path is input into a hierarchical decision network, the local semantic similarity of adjacent node pairs on the path is calculated, the global semantic consistency is evaluated based on the node feature sequence of the entire path, and the local semantic similarity and global semantic consistency are combined through adaptive weights to obtain a path quality score; The candidate paths are sorted in descending order according to the path quality scores, and the structural overlap and semantic redundancy between the paths are calculated for deduplication filtering, and finally the path with the highest score and meeting the difference threshold is selected to construct a candidate path set.

[0059] Exemplarily, first, multi-view feature extraction is performed on the entity nodes in the semantic association graph. The text semantic features, structural features and context features of the nodes are extracted respectively using the pre-trained large model. The text semantic features capture the semantic information of the node name and the descriptive text, the structural features reflect the topological structure of the node in the graph, and the context features consider the influence of the neighboring nodes around the node. For example, for the node "apple", the text feature can be "a kind of fruit", "red or green", the structural feature can be its degree, centrality, etc., and the context feature can be its connection relationship with nodes such as "fruit", "tree", and "food". The three extracted features are spliced ​​and fused to obtain the initial feature representation of the node. In order to better capture the hierarchy of node features, the node features are decomposed at multiple levels, for example, the feature vector can be decomposed into multiple sub-vectors, each of which represents semantic information at different levels. Then the decomposed hierarchical features are progressively combined with the pre-trained entity semantic vector, for example, the bottom layer features are combined with the entity vector, and then the combination result is combined with the upper layer features, and so on, and finally the semantic representation of the node is obtained.

[0060] Next, multi-dimensional features of the nodes are constructed based on the semantic representation. These multi-dimensional features contain local semantics, global context and topological structure information. Local semantic features reflect the semantic information of the node itself, global context features capture the semantic context of the node in the entire graph, and topological structure features describe the structural role of the node in the graph. For example, local semantic features can be the semantic representation of the node, global context features can be the embedding vector of the node in the graph, and topological structure features can be the degree, centrality, etc. of the node. The multi-dimensional features are adaptively weighted fused through the hierarchical attention mechanism to obtain enhanced features. The hierarchical attention mechanism can dynamically adjust the weights according to the importance of features of different dimensions, for example, local semantic features have higher weights and global context features have lower weights. The enhanced features are input into the feature optimization module to calculate the semantic relevance between node pairs. The feature optimization module can be a simple similarity calculation function, such as cosine similarity. An information propagation matrix is ​​constructed based on the semantic relevance, and an adaptive graph network is used to iteratively propagate the enhanced features. In each iteration, the features of the node are updated according to the information propagation matrix, and residual connections are introduced to retain the original feature information to prevent information loss. Finally, the semantic association feature is obtained, which combines the features of the node itself and the features of neighboring nodes.

[0061] Then, the multi-scale similarity between node pairs is calculated based on the semantic association features. Multi-scale similarity includes direct semantic similarity and path-based migration similarity. Direct semantic similarity measures the degree of semantic association between two nodes, and path-based migration similarity considers whether there are other path connections between the two nodes. For example, the direct semantic similarity of nodes "apple" and "pear" is high, while the direct semantic similarity of "apple" and "mobile phone" is low, but if there is a path "apple" -> "Jobs" -> "mobile phone", their path-based migration similarity will be high. The multi-scale similarities are adaptively fused to obtain the comprehensive similarity, and the association strength between nodes is constructed based on the comprehensive similarity. A probability transfer matrix is ​​constructed based on the association strength to guide path search. A random walk strategy with directional constraints is designed based on the probability transfer matrix. The random walk strategy starts from the starting node and selects the next node according to the probability transfer matrix until the maximum path length or the end node is reached. During the random walk process, the semantic coherence score of the path is calculated using the semantic association features, for example, the sum of the semantic similarities of adjacent nodes on the path can be calculated.

[0062] Finally, the sampled paths are input into the hierarchical decision network to calculate the local semantic similarity of adjacent node pairs on the path, and the global semantic consistency is evaluated based on the node feature sequence of the entire path. The local semantic similarity and global semantic consistency are combined through adaptive weights to obtain the path quality score. For example, the path "apple" -> "fruit" -> "food" has high local semantic similarity and global semantic consistency, so the path quality score is also high. The candidate paths are sorted in descending order according to the path quality score, and the structural overlap and semantic redundancy between the paths are calculated for deduplication filtering. Finally, the path with the highest score and meeting the difference threshold is selected to construct the candidate path set. For example, if the node overlap of two paths is high, they are considered redundant and only the path with the higher score is retained.

[0063] Suppose there is a semantic association graph containing nodes "apple", "fruit", "food", "red", "green", "jobs", "mobile phone", and "company". Through the above method, some high-quality paths can be found, such as "apple" -> "fruit" -> "food", "apple" -> "red", "apple" -> "green", "apple" -> "jobs" -> "mobile phone" -> "company".

[0064] In this embodiment, the semantic information of the node, the graph structure information and the path coherence are comprehensively considered to discover high-quality paths with richer semantics and more coherent logic. The random walk strategy is used to generate candidate paths, and combined with the deduplication filtering mechanism, the diversity of the paths can be effectively improved to avoid generating repeated or similar paths. The hierarchical attention mechanism and the adaptive graph network can effectively reduce the computational complexity and improve the efficiency of path discovery.

[0065] In an optional implementation, the candidate paths are multi-granularly encoded to obtain path vectors, the path scores are calculated to select the optimal path, and the associated paths and probability distributions are output after verification by a large model, including: Acquire semantic association features of entity nodes in the candidate path, use a bidirectional gated recursive network to encode the entity node sequence in the candidate path to obtain a node-level feature representation, use a sliding window to divide the candidate path into multiple sub-paths and extract local features to obtain a sub-path-level representation, and use a multi-layer attention mechanism to fuse the node-level feature representation with the sub-path-level representation to obtain a path vector; Calculating the internal consistency score between nodes based on the path vector, calculating the relevance score between the path vector and the semantic association feature, calculating the path diversity score based on the path vector, and weightedly fusing the internal consistency score, the relevance score and the diversity score using adaptive weights to obtain a path comprehensive score; According to the path comprehensive score, the candidate paths are sorted in descending order, a preset number of paths with the highest scores are selected to construct an initial path set, high-quality path fragments are extracted from the initial path set to be reorganized to generate new candidate paths, the path comprehensive score is calculated for the new candidate paths, the newly generated candidate paths with higher scores than the original paths are updated to the path set, and the path reorganization and score update are repeated until the score improvement of the path set is less than a preset score threshold; Each path in the path set is converted into a natural language description, a verification prompt template including verification instructions and constraints is constructed based on the natural language description, the verification prompt template is input into a pre-trained language model for multiple rounds of interactive verification, the associated paths that pass the verification are screened based on the results of the multiple rounds of interactive verification, the comprehensive score of the path is converted into a probability distribution to obtain the confidence of each associated path, and the associated path and its corresponding confidence distribution are output.

[0066] Exemplarily, first, obtain candidate paths and semantic association features. Candidate paths can be obtained by performing breadth-first search or depth-first search on the knowledge graph. For example, searching for the association path between "Apple" and "Jobs" can obtain a set of candidate paths, such as "Apple-founder-Jobs", "Apple-CEO-Jobs", etc. Semantic association features refer to information such as keywords, attributes, categories, etc. related to two entities. For example, the semantic association features of "Apple" can include "technology company", "electronic products", "innovation", etc., and the semantic association features of "Jobs" can include "entrepreneur", "innovator", "designer", etc. These features can be obtained through entity linking tools or knowledge bases.

[0067] Next, the candidate path is multi-granularly encoded to obtain the path vector. The entity node sequence in the candidate path is encoded using a bidirectional gated recurrent network. For example, the node sequence of the path "Apple-Founder-Steve Jobs" is ["Apple", "Founder", "Steve Jobs"]. The word vector of each node is input into the bidirectional gated recurrent network to obtain the node-level feature representation of each node. The candidate path is divided into multiple sub-paths using a sliding window and local features are extracted to obtain the sub-path level representation. For example, the path "Apple-Founder-Steve Jobs" can be divided into two sub-paths ["Apple-Founder"] and ["Founder-Steve Jobs"]. The node-level feature representation of each sub-path is averaged or concatenated to obtain the sub-path level representation. The multi-layer attention mechanism is used to fuse the node-level feature representation with the sub-path level representation to obtain the path vector. The node-level feature representation and the sub-path level feature representation are taken as input, and the weights between them are calculated through the multi-layer attention mechanism, and they are weighted summed to obtain the final path vector.

[0068] Then, the path score is calculated based on the path vector and the semantic association features. The internal consistency score between nodes is calculated based on the path vector, for example, the cosine similarity between adjacent nodes in the path vector is calculated as the internal consistency score. The relevance score is calculated between the path vector and the semantic association features, for example, the cosine similarity between the path vector and the semantic association feature vectors of two entities is calculated as the relevance score. The path diversity score is calculated based on the path vector, for example, the average distance between the path vector and other path vectors is calculated as the diversity score. The internal consistency score, relevance score and diversity score are weightedly fused using adaptive weights to obtain a comprehensive path score. The weights of the three scores are adaptively adjusted according to the characteristics of different tasks and data sets. For example, grid search or Bayesian optimization methods can be used to determine the optimal weight combination.

[0069] After that, the optimal path is selected by progressive optimization. The candidate paths are sorted in descending order according to the comprehensive path score, and a preset number of paths with the highest scores are selected to construct an initial path set, for example, the 10 paths with the highest scores are selected. High-quality path fragments are extracted from the initial path set and reorganized to generate new candidate paths. For example, the fragments "Apple-Founder-Jobs" and "Apple-CEO-Jobs" in the paths "Apple-Founder" and "Apple-CEO-Jobs" are reorganized into a new path "Apple-Founder-CEO-Jobs". The comprehensive path score is calculated for the new candidate path, and the newly generated candidate path with a higher score than the original path is updated to the path set. The path reorganization and score update are repeated until the score improvement of the path set is less than the preset score threshold, for example, it is repeated 10 times or until the score improvement is less than 0.01.

[0070] Finally, after verification by the large model, the associated paths and probability distribution are output. Each path in the path set is converted into a natural language description, for example, the path "Apple-Founder-Steve Jobs" is converted into "Steve Jobs is the founder of Apple". A verification prompt template containing verification instructions and constraints is constructed based on the natural language description, for example, "Please verify whether the following statement is correct: Steve Jobs is the founder of Apple". The verification prompt template is input into the pre-trained language model for multiple rounds of interactive verification, for example, using the GPT-3 model for verification. Based on the results of multiple rounds of interactive verification, the associated paths that have passed the verification are screened, for example, the paths that the GPT-3 model determines to be correct are selected. The comprehensive score of the path is converted into a probability distribution to obtain the confidence of each associated path, for example, the comprehensive score of the path is converted into a probability distribution using the softmax function. The associated path and its corresponding confidence distribution are output, for example, "Apple-Founder-Steve Jobs" and its confidence 0.8 are output.

[0071] In this embodiment, through multi-granularity encoding, semantic association features and progressive optimization, the association paths between entities can be more accurately identified, reducing the impact of noise and erroneous paths. Through progressive optimization and pre-trained language model verification, the amount of calculation and manual verification costs can be reduced, and the efficiency of association path mining can be improved. By converting the path into a natural language description, it is easier to understand the meaning and logic of the association path, and the interpretability of the association path is improved.

[0072] Figure 2 FIG. 1 is a schematic diagram of a long text information extraction and association analysis system based on a large model according to an embodiment of the present invention. Figure 2 As shown, the system comprises: The first unit is used to receive an input long text, calculate the semantic density value of the long text, determine the sliding window parameter based on the density value to perform block processing on the text to obtain multiple text blocks, extract the word frequency distribution matrix and syntactic dependency tree features in each text block to perform tensor fusion to obtain a text block feature vector, calculate the semantic relevance of feature vectors of adjacent text blocks, construct a hierarchical clustering feature matrix, and merge the text blocks according to the hierarchical clustering feature matrix to obtain semantic fragments; The second unit is used to perform syntactic analysis on semantic fragments to construct semantic units, construct a semantic dependency tree with semantic units as nodes, extract entity nodes and inter-entity relationships from the semantic dependency tree to obtain a semantic network, extract contextual features of entity nodes in the semantic network, generate entity semantic vectors through a multi-head attention mechanism, calculate entity relationship strength values, and combine them with semantic density values ​​to construct a semantic association graph; The third unit is used to perform multi-perspective feature extraction on entity nodes in the semantic association graph based on the pre-trained large model to obtain node features, input the node features into the large model to obtain semantic representation, fuse the semantic representation with the entity semantic vector to obtain enhanced features, use an adaptive graph network to propagate the enhanced features to obtain semantic association features, input the hierarchical decision network to generate candidate paths, perform multi-granularity encoding on the candidate paths to obtain path vectors, calculate the path score to select the optimal path, and output the associated path and probability distribution after verification by the large model.

[0073] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0074] A fourth aspect of the embodiments of the present invention is: A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0075] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for extracting and analyzing long text information based on a large model, characterized in that: include: Receive the input long text, calculate the semantic density value of the long text, determine the sliding window parameters based on the density value to divide the text into multiple text blocks, extract the word frequency distribution matrix and syntactic dependency tree features in each text block, perform tensor fusion to obtain the text block feature vector, calculate the semantic relevance of the feature vectors of adjacent text blocks, construct a hierarchical clustering feature matrix, and merge the text blocks according to the hierarchical clustering feature matrix to obtain semantic fragments; Perform syntactic analysis on semantic fragments to construct semantic units, build a semantic dependency tree with semantic units as nodes, extract entity nodes and inter-entity relationships from the semantic dependency tree to obtain a semantic network, extract contextual features of entity nodes in the semantic network, generate entity semantic vectors through a multi-head attention mechanism, calculate entity relationship strength values, and combine them with semantic density values ​​to construct a semantic association graph; Based on the pre-trained large model, multi-perspective feature extraction is performed on the entity nodes in the semantic association graph to obtain node features, and the node features are input into the large model to obtain semantic representation. The semantic representation is fused with the entity semantic vector to obtain enhanced features. The enhanced features are propagated using an adaptive graph network to obtain semantic association features, which are input into a hierarchical decision network to generate candidate paths. The candidate paths are encoded at multiple granularities to obtain path vectors, the path scores are calculated to select the optimal path, and the associated paths and probability distributions are output after verification by the large model.

2. The method according to claim 1, characterized in that Receive the input long text, calculate the semantic density value of the long text, determine the sliding window parameters based on the density value, and divide the text into blocks to obtain multiple text blocks including: Receive an input long text, construct a word position sequence for the long text, use a multi-scale sliding window to perform wavelet decomposition on the word position sequence to obtain a word frequency change coefficient and a word frequency baseline coefficient, construct a word mutation feature based on the word frequency change coefficient, construct a word steady-state feature based on the word frequency baseline coefficient, combine the word mutation feature and the word steady-state feature to obtain a word distribution feature, construct a co-occurrence matrix based on the word distribution feature, use a random walk algorithm to calculate the transition probability of a word node to obtain a word association network, perform modularity clustering on the word association network to obtain a word association group, and calculate the network topology entropy of the word association group to obtain a word distribution entropy; Constructing a multi-layer dependency syntax tree for the long text, extracting a core path and a branch path from the multi-layer dependency syntax tree, calculating a depth weighted value of the core path and a width weighted value of the branch path, and inputting the depth weighted value and the width weighted value into a multi-layer perceptron to obtain syntax complexity; Constructing an adaptive fusion network, inputting the word distribution entropy and syntactic complexity into the adaptive fusion network, dynamically weighting through a feature weight matrix and optimizing the residual connection to obtain a semantic density value; A density distribution curve is constructed for the semantic density value, and piecewise cubic spline interpolation is used for fitting to obtain a density aggregation interval. A dynamic programming algorithm is used based on an interval merging cost matrix to obtain a density threshold. The semantic density value is compared with the density threshold. According to the comparison result, a basic window size and a basic overlap rate are mapped to window parameters of multiple gears to obtain a sliding window size and an overlap rate parameter. The sliding window size and the overlap rate parameter are used to divide the long text into blocks to obtain multiple text blocks.

3. The method according to claim 1, characterized in that Extract the word frequency distribution matrix and syntactic dependency tree features from each text block and perform tensor fusion to obtain the text block feature vector, calculate the semantic relevance of the feature vectors of adjacent text blocks, construct a hierarchical clustering feature matrix, and merge the text blocks according to the hierarchical clustering feature matrix to obtain semantic fragments including: Extract the local word frequency distribution of the text block to obtain the bottom-level features, calculate the semantic similarity between words to construct word clustering groups to obtain middle-level features, use the distribution probability of words in the word clustering groups as top-level features, combine the bottom-level features, middle-level features and top-level features to construct a hierarchical word frequency matrix, and use a bidirectional semantic propagation network to perform feature adjustment on the hierarchical word frequency matrix to obtain the word frequency distribution matrix; Identify sentence units in a text block by using sentence boundary identifiers, calculate the syntactic dependency strength between words in the sentence units, construct a syntactic dependency topology map using the syntactic dependency strength, extract syntactic dependency chains between sentence units from the syntactic dependency topology map, calculate semantic weights of word nodes on the syntactic dependency chain, and combine the semantic weights with the syntactic dependency chain to obtain a syntactic dependency tree feature; Inputting the word frequency distribution matrix and the syntactic dependency tree features into a probability density estimation model, the probability density estimation model includes a feature distribution learning unit and a density prediction unit, the feature distribution learning unit establishes a probability distribution model based on the word frequency distribution matrix and the syntactic dependency tree features, the density prediction unit calculates the probability density value of the feature based on the probability distribution model, and uses the probability density value to perform tensor fusion on the word frequency distribution matrix and the syntactic dependency tree features to obtain a text block feature vector; Constructing a semantic attenuation function based on the position distribution of the text block in the full text and the distribution of the feature vector of the text block, inputting the feature vectors of adjacent text blocks into the semantic attenuation function to obtain an attenuation coefficient, and using the attenuation coefficient to weight the similarity of the feature vectors of adjacent text blocks to obtain the semantic relevance; Inputting the text block feature vector into a bidirectional evaluation unit, the bidirectional evaluation unit includes an upward fusion subunit and a downward splitting subunit, the upward fusion subunit calculates the semantic consistency coefficient of text block merging, the downward splitting subunit calculates the information loss coefficient of text block splitting, taking the ratio of the semantic consistency coefficient to the information loss coefficient as a merging constraint coefficient, and combining the merging constraint coefficient with the semantic relevance to construct a hierarchical clustering feature matrix; The local benefit value of text block merging is calculated based on the hierarchical clustering feature matrix, the global impact value of the merging operation is calculated based on the local benefit value, the optimal merging sequence is determined according to the local benefit value and the global impact value, and the text blocks are progressively merged based on the optimal merging sequence to obtain semantic fragments.

4. The method according to claim 1, characterized in that: The semantic fragments are parsed to construct semantic units, and a semantic dependency tree is constructed with the semantic units as nodes. The entity nodes and the relationships between entities are extracted from the semantic dependency tree to obtain a semantic network including: Constructing a multi-granularity semantic dictionary based on a syntactic dependency tree, mapping words in the syntactic dependency tree to the multi-granularity semantic dictionary to obtain concept level codes of the words, calculating semantic associations between words based on the concept level codes, and performing hierarchical clustering on the semantic associations to obtain a semantic concept tree; Mapping the word nodes in the syntactic dependency tree to the semantic concept tree to obtain concept level features, calculating the hierarchical semantic weights between the word nodes according to the concept level features, constructing the hierarchical semantic weights as a semantic propagation tensor, calculating the semantic coverage of the word nodes in the semantic propagation tensor based on a random walk algorithm, and constructing a dynamic attention mask according to the semantic coverage; Based on the dynamic attention mask, the semantic representation of the word node is selectively propagated and updated, and the updated semantic representation is input into the adaptive semantic combination model, and the adaptive semantic combination model adjusts the combination parameters according to the semantic combination mode of the word node; Calculating the combination probability of the word nodes after being processed by the adaptive semantic combination model, constructing the word nodes whose combination probability is higher than a preset probability threshold as semantic units, and obtaining the target semantic units by applying context constraints and concept consistency constraints to the semantic units; Extracting semantic features, position features and concept features of the target semantic unit, inputting them into a multi-task learning model for entity recognition and entity disambiguation, and obtaining an entity node with a unique concept reference; Constructing a heterogeneous semantic dependency tree, taking the entity node as a main node, taking the concept node in the semantic concept tree as an auxiliary node, and constructing the association relationship between the main node and the auxiliary node as a heterogeneous edge; A graph attention network is applied on the heterogeneous semantic dependency tree to transfer information, the feature representations of the main node and the auxiliary node are fused, the semantic relationship between the entity nodes is judged based on the fused feature representation, the entity nodes are used as network nodes, and the semantic relationship is used as the connecting edge to construct a semantic network, and the semantic network is optimized to obtain a target semantic network.

5. The method according to claim 1, characterized in that Contextual features are extracted from entity nodes in the semantic network, and entity semantic vectors are generated through a multi-head attention mechanism. The entity relationship strength value is calculated and combined with the semantic density value to construct a semantic association graph, including: Obtaining the original semantic vector of the entity node in the semantic network, projecting the original semantic vector into the multi-scale feature space to obtain the multi-scale node representation, extracting the direct adjacent nodes in each feature space based on the multi-scale node representation to construct a local semantic graph, and extracting multi-order adjacent nodes to construct a global structure graph; In the local semantic graph, the position distances between node pairs are calculated to obtain a spatial distance matrix, the semantic similarity is calculated based on the node semantic vectors to obtain a semantic similarity matrix, the spatial distance matrix and the semantic similarity matrix are adaptively combined to obtain an attention weight matrix, and the node semantic vectors are weighted and aggregated based on the attention weight matrix to obtain local context features, wherein the local context features include structural relationship information and semantic interaction information of the nodes in the local semantic graph; In the global structure graph, an attenuation coefficient matrix is ​​constructed based on the order distance between nodes, and the attenuation coefficient matrix and node features are recursively transferred in multiple levels. Feature selection and information filtering are performed based on the semantic similarity between nodes during each level of transfer to obtain global context features containing multi-order structural information; Inputting the original semantic vector, local context features and global context features into a self-calibrated multi-head attention network, the self-calibrated multi-head attention network performs feature transformation on the three features to obtain a query vector, a key vector and a value vector, calculates the dot product of the query vector and the key vector to obtain an attention score matrix, calculates the attention confidence based on the entropy value of the attention score matrix, adaptively adjusts the attention score matrix according to the attention confidence, and multiplies the adjusted attention score matrix with the value vector to obtain a calibrated attention feature; Adaptively weighted fusion of multiple calibrated attention features is performed to obtain enhanced entity semantic vectors, and the cosine similarity of enhanced entity semantic vectors between entity node pairs is calculated to obtain the entity relationship strength value; Constructing a deep information aggregation network, encoding the topological structure of the entity node in the local semantic graph into a structural encoding vector, encoding the original semantic vector into a semantic encoding vector, and encoding the propagation path of the entity node in the global structural graph into a context encoding vector; Designing a gated update unit to calculate a feature importance score based on the structure encoding vector, the semantic encoding vector, and the context encoding vector, and adaptively fusing the three encoding vectors according to the feature importance score to obtain a fused feature vector; Calculate the modulus of the fused feature vector to obtain the node semantic density value, construct a density distribution matrix based on the semantic density values ​​between node pairs, calculate the distribution difference of node pairs in the density distribution matrix to obtain the structural complexity coefficient, and perform weighted combination of the entity relationship strength value and the node semantic density value to obtain the edge weight value; use the entity node as a graph node, establish connecting edges for node pairs whose edge weight values ​​are greater than a preset weight threshold, and use the corresponding edge weight values ​​as the weights of the connecting edges to construct a semantic association graph.

6. The method according to claim 1, characterized in that Based on the pre-trained large model, multi-view feature extraction is performed on the entity nodes in the semantic association graph to obtain node features, the node features are input into the large model to obtain semantic representation, the semantic representation is fused with the entity semantic vector to obtain enhanced features, and the adaptive graph network is used to propagate enhanced features to obtain semantic association features, which are input into the hierarchical decision network to generate candidate paths including: Based on the pre-trained large model, multi-view feature extraction is performed on the entity nodes in the semantic association graph, including extracting the text semantic features, structural features and context features of the nodes, fusing the extracted features to obtain node features, performing multi-level decomposition on the node features to obtain hierarchical features, and progressively combining the hierarchical features with the entity semantic vector to obtain semantic representation; Constructing multi-dimensional features of nodes based on the semantic representation, wherein the multi-dimensional features include local semantics, global context and topological structure information, adaptively weighting the multi-dimensional features through a hierarchical attention mechanism to obtain enhanced features, inputting the enhanced features into a feature optimization module, the feature optimization module calculating the semantic relevance between node pairs, constructing an information propagation matrix based on the semantic relevance, iteratively propagating the enhanced features using an adaptive graph network, introducing residual connections in each round of iteration to retain the original feature information, and obtaining semantic association features; Based on the semantic association features, multi-scale similarities between node pairs are calculated, including direct semantic similarity and path-based migration similarity, the multi-scale similarities are adaptively fused to obtain comprehensive similarity, the association strength between nodes is constructed based on the comprehensive similarity, a probability transfer matrix is ​​constructed according to the association strength, a random walk strategy with directional constraints is designed based on the probability transfer matrix, depth-restricted path sampling is performed on each starting node through the random walk strategy, and the semantic coherence score of the path is calculated using the semantic association features; The sampled path is input into a hierarchical decision network, the local semantic similarity of adjacent node pairs on the path is calculated, the global semantic consistency is evaluated based on the node feature sequence of the entire path, and the local semantic similarity and global semantic consistency are combined through adaptive weights to obtain a path quality score; The candidate paths are sorted in descending order according to the path quality scores, and the structural overlap and semantic redundancy between the paths are calculated for deduplication filtering, and finally the path with the highest score and meeting the difference threshold is selected to construct a candidate path set.

7. The method according to claim 1, characterized in that The candidate paths are multi-granularly encoded to obtain path vectors, and the path scores are calculated to select the optimal path. After verification by the large model, the associated paths and probability distribution are output, including: Acquire semantic association features of entity nodes in the candidate path, use a bidirectional gated recursive network to encode the entity node sequence in the candidate path to obtain a node-level feature representation, use a sliding window to divide the candidate path into multiple sub-paths and extract local features to obtain a sub-path-level representation, and use a multi-layer attention mechanism to fuse the node-level feature representation with the sub-path-level representation to obtain a path vector; Calculating the internal consistency score between nodes based on the path vector, calculating the relevance score between the path vector and the semantic association feature, calculating the path diversity score based on the path vector, and weightedly fusing the internal consistency score, the relevance score and the diversity score using adaptive weights to obtain a path comprehensive score; According to the path comprehensive score, the candidate paths are sorted in descending order, a preset number of paths with the highest scores are selected to construct an initial path set, high-quality path fragments are extracted from the initial path set to be reorganized to generate new candidate paths, the path comprehensive score is calculated for the new candidate paths, the newly generated candidate paths with higher scores than the original paths are updated to the path set, and the path reorganization and score update are repeated until the score improvement of the path set is less than a preset score threshold; Each path in the path set is converted into a natural language description, a verification prompt template including verification instructions and constraints is constructed based on the natural language description, the verification prompt template is input into a pre-trained language model for multiple rounds of interactive verification, the associated paths that pass the verification are screened based on the results of the multiple rounds of interactive verification, the comprehensive score of the path is converted into a probability distribution to obtain the confidence of each associated path, and the associated path and its corresponding confidence distribution are output.

8. A long text information extraction and association analysis system based on a large model, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to receive an input long text, calculate the semantic density value of the long text, determine the sliding window parameter based on the density value to perform block processing on the text to obtain multiple text blocks, extract the word frequency distribution matrix and syntactic dependency tree features in each text block to perform tensor fusion to obtain a text block feature vector, calculate the semantic relevance of feature vectors of adjacent text blocks, construct a hierarchical clustering feature matrix, and merge the text blocks according to the hierarchical clustering feature matrix to obtain semantic fragments; The second unit is used to perform syntactic analysis on semantic fragments to construct semantic units, construct a semantic dependency tree with semantic units as nodes, extract entity nodes and inter-entity relationships from the semantic dependency tree to obtain a semantic network, extract contextual features of entity nodes in the semantic network, generate entity semantic vectors through a multi-head attention mechanism, calculate entity relationship strength values, and combine them with semantic density values ​​to construct a semantic association graph; The third unit is used to perform multi-perspective feature extraction on entity nodes in the semantic association graph based on the pre-trained large model to obtain node features, input the node features into the large model to obtain semantic representation, fuse the semantic representation with the entity semantic vector to obtain enhanced features, use an adaptive graph network to propagate the enhanced features to obtain semantic association features, input the hierarchical decision network to generate candidate paths, perform multi-granularity encoding on the candidate paths to obtain path vectors, calculate the path score to select the optimal path, and output the associated path and probability distribution after verification by the large model.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Combination optimization automatic modeling-oriented training data generation method and system

    CN119294403A

  • Domain speech recognition method and system based on RAG

    CN119296516A

  • Systems and methods for assessing speech, language, and social skills

    US20230377749A1

  • Explainable adaptable artificial intelligence networks

    WO2025029526A2

Cited By

  • Semantic association analysis method and system based on academic literature

    CN120337936A

  • Letter text analysis method driven by multilayer dynamic aggregation large language model

    CN120387459A

  • A multi-layer dynamic aggregated large language model driven letter text analysis method

    CN120387459B

  • Text partitioning method and device, storage medium and electronic equipment

    CN120448524A

  • Fragmentation method, system and device based on information entropy and Transform

    CN120449880A