Text correlation analysis method and system based on LSTM neural network and knowledge graph

By combining LSTM neural networks and knowledge graphs, a text topic knowledge graph is constructed to enhance the semantic connections between texts. This solves the problem that existing technologies cannot fully understand the relationships between texts, and enables efficient text topic analysis and classification.

CN120218076BActive Publication Date: 2026-04-14JINAN QUANFANG TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINAN QUANFANG TECH CO LTD
Filing Date
2025-03-07
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing LSTM networks cannot fully understand the relationships and semantic context between texts in text domain analysis, and the application of knowledge graphs in text topic analysis has not fully realized its potential.

Method used

By combining LSTM neural networks and knowledge graphs, a text topic knowledge graph is constructed. Multi-head attention mechanism and graph convolutional neural network are used to enhance the semantic relevance of text topics. Support vector machine is then used for text topic classification and analysis.

Benefits of technology

It significantly enhances the understanding of interrelationships and cross-domain knowledge between texts, can process massive amounts of text data, automatically identify and classify text topics, improve work efficiency, and can perform high-level inter-text relationship mining.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218076B_ABST
    Figure CN120218076B_ABST
Patent Text Reader

Abstract

The application discloses a text correlation analysis method and system based on an LSTM neural network and a knowledge graph, belongs to the technical field of text analysis, and specifically comprises the following steps: collecting text data of a text theme from a literature database, preprocessing the collected text theme text data, learning the preprocessed text theme text data through an LSTM network, generating a vector of the text theme with semantic correlation, constructing a text theme knowledge graph, and performing semantic enhancement on the vector of the text theme with semantic correlation based on the constructed text theme knowledge graph, and classifying and analyzing the text theme based on the output of the LSTM neural network and the knowledge graph; through model analysis, the application can perform higher-level reasoning, accurate classification, and potential cross-text field mining through the relationship between texts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of text analysis technology, specifically a text association method and system based on LSTM neural networks and knowledge graphs. Background Technology

[0002] With the development of information technology and the internet, academic resources have experienced explosive growth. Various types of academic content, such as academic documents, research papers, patents, and reports, are being generated and accumulated continuously. How to efficiently analyze and automatically classify text topics has become an important research topic in the fields of natural language processing and artificial intelligence.

[0003] In recent years, deep learning, especially Long Short-Term Memory (LSTM) networks, has achieved significant breakthroughs in natural language processing tasks due to its ability to effectively process sequential data and capture long- and short-term dependencies. LSTM networks, by introducing gating mechanisms, can effectively capture semantic information in long texts, overcoming the limitations of traditional methods in processing long texts, particularly in the analysis and classification of academic literature, where they can better understand the contextual relationships within the text. However, LSTM still has certain limitations when used alone, especially in text analysis tasks, where a single text representation method often cannot fully understand the relationships and semantic background between texts.

[0004] Knowledge graphs, as a technology that represents entities and their relationships through graph structures, have demonstrated their powerful capabilities in tasks such as semantic understanding, reasoning, and information retrieval. However, their application in text topic analysis remains relatively limited, failing to fully realize their potential. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention proposes a text association analysis method and system based on LSTM neural networks and knowledge graphs. This method can extract text topics from scientific research literature more accurately. By combining deep learning and knowledge graphs, it can not only effectively improve the accuracy and efficiency of text topic classification, but also enhance the reasoning ability between texts and the recognition of cross-text relationships.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] Text association analysis methods based on LSTM neural networks and knowledge graphs include:

[0008] Collect textual data on text topics from literature databases;

[0009] Preprocess the collected text data on the subject matter;

[0010] By using an LSTM network to learn from the preprocessed text topic data, a vector with semantic relevance to the text topic is generated.

[0011] Construct a text topic knowledge graph, and semantically enhance vectors with semantic relevance to text topics based on the constructed text topic knowledge graph;

[0012] Based on the output of LSTM neural network and knowledge graph, text topics are classified and analyzed.

[0013] Specifically, the step of learning from the preprocessed text topic data using an LSTM network to generate semantically related vectors for the text topics includes:

[0014] Construct an LSTM network, including: forget gate, input gate, and output gate;

[0015] Using a pre-trained word embedding model, preprocessed text topic data is converted into text topic word vectors;

[0016] The constructed LSTM network is trained, the loss function is optimized, and the trained LSTM network is obtained.

[0017] The text topic word vectors are input into the trained LSTM network. The output vectors of the multi-head attention mechanism, the output vector of the LSTM network at time t, and the output vector of semantic enhancement are concatenated or weighted to obtain a vector with semantic relevance of the text topic.

[0018] Specifically, the construction of the text topic knowledge graph includes:

[0019] Construct a text topic knowledge graph KG, denoted as: KG={E,G,J}, where E represents the entity set, G represents the relation set, and J represents the graph structure;

[0020] Starting from any node in the text topic knowledge graph KG and the neighboring nodes of the arbitrary node, record all nodes reached by k jumps determined by the reward function. Combine the semantic relevance vector of the neighboring nodes of the arbitrary node at the kth layer to update the embedding representation of the arbitrary node at the k+1th layer.

[0021] Specifically, the semantic enhancement of vectors with semantic relevance to text topics based on the construction of a text topic knowledge graph includes:

[0022] By utilizing the enhanced text topic knowledge graph and semantically related vectors of text topics, a text topic context relationship model is established, and a context relationship matrix between text topic entities is constructed.

[0023] Specifically, the analysis and classification of text topics based on the output of LSTM neural networks and knowledge graphs includes:

[0024] Using a support vector machine model, text topics are classified based on the outputs of an LSTM neural network and a knowledge graph;

[0025] The classification results of text topics are analyzed, and the relationships between texts are inferred by combining the entity and relationship information in the text topic knowledge graph, and the probability of overlapping text topics is calculated.

[0026] Specifically, the preprocessing of the collected text topic data includes:

[0027] Remove stop words from the text data, standardize the terms, and perform part-of-speech tagging and word segmentation.

[0028] Based on text domain knowledge and corpus, a text feature lexicon is constructed, which contains common terms, keywords and their semantic relationships in the text domain.

[0029] Specifically, the literature databases include: CNKI, Google Scholar, and PubMed.

[0030] The text association analysis system based on LSTM neural network and knowledge graph is used to implement the text association analysis method based on LSTM neural network and knowledge graph, including: data collection module, data preprocessing module, vector generation module, semantic enhancement module and classification and analysis module;

[0031] The data collection module is used to collect text data on text topics from the literature database;

[0032] The data preprocessing module is used to preprocess the collected text topic data;

[0033] The vector generation module is used to learn from the preprocessed text topic text data through an LSTM network to generate vectors with semantic relevance to the text topics.

[0034] The semantic enhancement module is used to construct a text topic knowledge graph and perform semantic enhancement on vectors that have semantic relevance to text topics based on the constructed text topic knowledge graph;

[0035] The classification and analysis module is used to classify and analyze text topics based on the output of LSTM neural networks and knowledge graphs.

[0036] Specifically, the vector generation module includes: an LSTM network construction unit, a training unit, and a vector generation unit;

[0037] The LSTM network building unit is used to build an LSTM neural network model;

[0038] The training unit is used to train the constructed LSTM network and optimize the loss function;

[0039] The vector generation unit is used to convert the preprocessed text topic text data into text topic word vectors and input them into the trained LSTM network to generate vectors with semantic relevance to the text topics.

[0040] Specifically, the semantic enhancement module includes: a knowledge graph construction unit, an enhancement unit, and an association unit;

[0041] The knowledge graph construction unit is used to construct a text topic knowledge graph;

[0042] The enhancement unit is used to enhance the expressive power of the text topic knowledge graph using a graph convolutional neural network;

[0043] The association unit is used to establish a text topic context relationship model and construct a context relationship matrix between text topic entities.

[0044] Compared with the prior art, the beneficial effects of the present invention are:

[0045] 1. This invention proposes a text association analysis method based on LSTM neural network and knowledge graph. By embedding entity and relationship information from knowledge graph into LSTM model, the model can significantly improve its understanding of the interrelationships, domain background and cross-domain knowledge between texts, and can handle complex situations of text intersection.

[0046] 2. This invention proposes a text association analysis method based on LSTM neural network and knowledge graph, which can process massive text data, has strong adaptability, and can completely eliminate manual intervention, automatically complete the identification and classification of text topics, and greatly improve work efficiency.

[0047] 3. This invention proposes a text association analysis method based on LSTM neural network and knowledge graph. Knowledge graph provides rich relationships between text domains. When combined with deep learning model, it can perform higher-level reasoning. Through model analysis, it can not only perform accurate classification, but also mine potential cross-text domains through the relationships between texts. Attached Figure Description

[0048] Figure 1 A flowchart of the method provided by the present invention;

[0049] Figure 2 This is a diagram of the LSTM network architecture provided by the present invention;

[0050] Figure 3 Example diagram of text topic knowledge graph provided by this invention;

[0051] Figure 4 The system architecture diagram provided for this invention. Detailed Implementation

[0052] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.

[0055] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the listed items.

[0056] Example 1

[0057] The method described in this application is applied to the correlation analysis of related subject topics.

[0058] Please see Figure 1-3 The present invention provides an embodiment of a text association analysis method based on LSTM neural networks and knowledge graphs, comprising the following specific steps:

[0059] Step S1: Collect text data on the text topic from literature databases (such as CNKI, Google Scholar, PubMed, etc.);

[0060] Step S2: Preprocess the collected text topic text data;

[0061] The specific steps of Step S2 are as follows:

[0062] Step S201: Remove stop words in the text topic text data, standardize terms, and perform part-of-speech reduction and word segmentation;

[0063] Specifically, remove stop words, such as irrelevant words like "de", "he", "shi", etc.; standardize terms, for example, "deep learning" and "deep neural network" can be unified as "deep learning";

[0064] Step S202: Based on text domain knowledge and a corpus, construct a text feature word library that includes common terms, keywords, and their semantic associations within this text domain.

[0065] Step S3: Use the LSTM network to learn the preprocessed text topic text data and generate vectors with semantic relevance for the text topic;

[0066] Step S301: Construct an LSTM network, including: a forget gate, an input gate, and an output gate;

[0067] The forget gate is used to control the proportion of information discarded, the input gate is used to control the addition of new information, and the output gate is used to determine the output of the hidden state at the current moment; through this mechanism, LSTM can learn complex context dependencies in the text, especially semantic information with long time spans;

[0068] Step S302: Use a pre-trained word embedding model to convert the preprocessed text topic text data into text topic word vectors;

[0069] The pre-trained word embedding model in Step S302 includes: Word2Vec, GloVe, or BERT, etc. Word2Vec and GloVe learn the dense vector representation of words based on the context window of words and are trained by minimizing the conditional probability of context vocabulary and target vocabulary. BERT is a pre-trained model based on Transformer that can dynamically generate the representation of vocabulary according to the context in a sentence;

[0070] Step S303: Train the constructed LSTM network, optimize the loss function, and obtain a trained LSTM network;

[0071] In this embodiment, the commonly used loss function is the cross-entropy loss function (for classification tasks) or the mean squared error loss function (for regression tasks). When training long sequences, LSTM can effectively alleviate the gradient vanishing and gradient explosion problems of traditional RNNs, but gradient clipping is still required to avoid excessive parameter updates. To prevent overfitting, a dropout layer can be introduced into the LSTM network to randomly discard some neurons to increase the generalization ability of the model.

[0072] Step S304: Input the text topic word vectors into the trained LSTM network to obtain semantically related vectors of the text topics. The specific formula is as follows:

[0073]

[0074] in, The vector representing the semantic relevance of the text topics, MultH(Atten(Q,V,K)) represents the output vector of the multi-head attention mechanism, Q represents the query vector, i.e., the query vector at the current time, K represents the key vector, the key-value vector used to match the query vector, and V represents the value vector, i.e., the value information associated with each key. LSTM(x t ,h t-1 Let x represent the output vector of the LSTM network at time t. t h represents the input vector, i.e., the text topic word vector. t-1 Represents the hidden state of the LSTM network at time t-1, EeEn(h t ) represents the semantically enhanced output vector, h t This represents the hidden state of the LSTM network at time t. This indicates vector concatenation or weighted summation.

[0075] Explanation and principle of the above formula: The multi-head self-attention mechanism MultH(Atten(Q,V,K)) is one of the core mechanisms of the Transformer architecture. It can compute attention weights in parallel in different subspaces, thereby capturing more contextual information. The specific formula is as follows:

[0076]

[0077] `Concat()` is a concatenation function used to concatenate multiple vectors; `sl` represents the number of attention heads; and `sm()` converts the similarity values ​​into a weight distribution function. Let Q represent the similarity between each query and all keys, where T represents the transpose of the vector, and the query vector Q is formed by the input x. t and / or the hidden state h from the previous time step t-1 Generated, usually R represents a real number, n represents the length of the input sequence, and d k This represents the dimension of the query vector. The key vector K has the same dimension as the query vector. d v Indicates the dimension of the value vector;

[0078] EeEn(h t The specific formula is: EeEn(h t ) = tanh(W h ×h t +W e ×e t +b), tanh() represents the hyperbolic tangent function, e t W represents the external semantic embedding at time t. h Used to h t Mapped to the same dimension weight matrix, W e Used to e t Mapped to the same dimension of the weight matrix, b represents the bias term. The semantically enhanced output vector is obtained by further processing the hidden state of the LSTM and using external semantic information to enhance the model's semantic perception ability. Specifically, the semantic understanding of the model is enhanced by introducing semantic embeddings (such as Word2Vec, GloVe or BERT embeddings). The enhanced output vector will contain more semantic information and can better help the model capture complex textual relationships.

[0079] Final output It is obtained by concatenating or weighting multiple parts, which aim to combine local information (LSTM), global information (multi-head self-attention), and external semantic information to generate a more refined and richer representation.

[0080] Step S4: Construct a text topic knowledge graph, and semantically enhance the vectors with semantic relevance to text topics based on the constructed text topic knowledge graph;

[0081] The specific steps of step S4 are as follows:

[0082] Step S401: Construct a text topic knowledge graph KG, represented as: KG={E,G,J}, where E represents the entity set, containing entities from all domains, G represents the relation set, which consists of various relations between entities, and J represents the graph structure, which consists of connections between entities;

[0083] In this embodiment, the knowledge graph is a graph structure composed of entities (such as people, places, things, concepts, etc.) and relations (such as "belongs to", "contains", "with...", etc.). Each node represents an entity, and the edges represent a certain relationship between entities. The main function of the knowledge graph is to provide the ability to reason about the semantic relationships between entities, and to supplement the implicit knowledge and information in text data. For example, in a knowledge graph of a text domain, nodes can be text terms such as "deep learning", "convolutional neural network", and "computer vision", while relations include "is", "contains", "belongs to", etc., such as "convolutional neural network" - "belongs to" "deep learning", "computer vision" - "contains" "convolutional neural network";

[0084] Step S402: For any node in the text topic knowledge graph, enhance the node's expressive power. The specific formula is as follows:

[0085]

[0086] in, Let σ(·) represent the embedding representation of node v at layer k+1, and let σ(·) represent the activation function. Let N(v) represent the embedding representation of node u at layer k, and let N(v) represent the set of neighboring nodes of node v. k Let N(u) represent all nodes reached from node v through k hops determined by the reward function. k W represents all nodes reached from node u in k hops determined by the reward function. k This represents the weight matrix, used for linear transformation of node information;

[0087] The principle behind the above formula: the embedding representation of node v at the (k+1)th layer. This is achieved by aggregating the k-hop neighbor information of node v. The goal of multi-hop neighbor aggregation is to gradually enhance the contextual information of the node representation by utilizing the k-hop neighbor information around node v. The k-hop neighbor information of node v is obtained through node hopping. That is, starting from node v, the node obtained by the first hop is the node connected to node v, the node obtained by the second hop is the node connected to the node obtained by the first hop, and so on until the kth hop, when the node obtained is the node connected to the node obtained by the (k-1)th hop. The hop direction and the update method of the node embedding representation are determined by the reward function. Aggregating all nodes yields the embedding representation of node v at the (k+1)th layer. N(u) kSimilarly, by selecting an action through the policy network, namely choosing which neighbor node to jump to and how to update the current node's embedding representation at layer k+1, and then adjusting the parameters of the policy network based on the reward signal from the environment, the optimal jump path and embedding update strategy can be learned to maximize the enhancement of the node's expressive power.

[0088] N(v) k By considering the multi-hop neighbors of a node, the model can obtain complex relationship information between nodes, rather than being limited to the relationship between single-hop neighbors. This aggregation of multi-hop information can help capture more complex graph structure features. This aggregation mechanism is particularly important when dealing with graph structures with long-range dependencies or complex relationships. By standardizing the weights of each neighbor's information, we can avoid the excessive influence of some nodes having too many connections on the aggregation result and ensure the fairness of each neighbor's information during aggregation.

[0089] The formula describes a multi-hop information aggregation process. The purpose is to gradually introduce the higher-order neighbor information (i.e., neighbors after multiple hops) into the node representation. Among many nodes, the direction of node hops is determined by the reward function. Some nodes with relatively low value need to be filtered to select the optimal node, thereby enhancing the expressive power of the node representation.

[0090] Step S403: Using the enhanced text topic knowledge graph and semantically related vectors of text topics, establish a text topic context relationship model and construct a context relationship matrix between text topic entities. The specific formula is as follows:

[0091]

[0092] Where S represents the contextual relationship matrix between text topic entities, rel(s p ,s q ) represents entity s p and entity s q The semantic relationship between them.

[0093] The principle behind the above formula is as follows: Matrix S is a square matrix whose dimensions are equal to the number of entities identified in the text. Each element in the matrix, rel(s) p ,s q ) represents entity s in the text p and entity s q The semantic relationship between entities, which is usually the actual association between entities extracted from the knowledge graph, or the similarity measured in some way, is rel(s) for each pair of entities. p ,s q () indicates the semantic relationship between them, such as "belongs to", "is located in", etc.;

[0094] Centralized representation of matrix S: 1) Binary relation: If there is a certain relationship between entities, such as an "is" relationship, then rel(s) p ,s q =1 otherwise 0; 2) Text-based similarity: In text, some entities may not have a direct relationship definition, but the relationship between them can be measured based on semantic similarity. For example, word vectors can be used to calculate the cosine similarity between entities in the text; 3) Weighted graph relations: If there are multiple relations in the knowledge graph, each relation can be weighted. For example, if s p and s q There are two relations, "belong to" and "contain", and the importance of these two relations in the knowledge graph is 0.7 and 0.3 respectively. Therefore, the elements in the relation matrix can be calculated as a weighted sum.

[0095] For example, suppose we have the following three entities: s1 = deep learning, s2 = convolutional neural network, and s3 = computer vision, and the following relationships: deep learning includes convolutional neural networks, and convolutional neural networks are a part of computer vision. Then the relationship matrix can be represented as: In this example, rel(s1,s2) = 1, indicating that there is an inclusion relationship between s1 and s2, and rel(s2,s3) = 0.8, indicating that there is a strong correlation between them.

[0096] Step S5: Analyze and classify the text topics based on the output of the LSTM neural network and knowledge graph.

[0097] The specific steps of step S5 are as follows:

[0098] Step S501: Using the Support Vector Machine (SVM) model, classify the text topics based on the output of the LSTM neural network and the knowledge graph;

[0099] Step S502: Analyze the classification results of the text topics, and combine the entity and relation information in the text topic knowledge graph to infer the relationships between the texts. The specific formula is as follows:

[0100]

[0101] Wherein, P(y cross |Z) represents the probability of a cross-text topic, that is, the combined probability of belonging to a cross-text topic given a semantic vector Z of a text topic, where Y represents the set of text topics, containing all possible text topics, and P(y) i |Z) represents the text topic y i The classification probability, P(y) j |Z) represents the text topic y jThe classification probability, rel(y) i |y j ) represents the text topic y i and text theme y j The semantic relationship between them Represents all text topic pairs (y i ,y j The summation of ) infers the probability of cross-text topics by considering the relationships between all possible text pairs.

[0102] The principle behind the above formula is as follows: The core idea is to infer the overlapping text topics involved in a text by utilizing the relationships between text topics. Traditional text classification methods typically only consider whether a text belongs to a single text. However, in actual scientific and academic texts, much content involves the intersection of multiple texts. For example, computer vision involves multiple text fields such as computer science and medicine. In this process, the formula combines the classification probability of each text topic with the relationship measure between texts to comprehensively infer the relationships between multiple texts that the text may involve, thereby deriving the probability of overlapping text topics. This method can effectively handle cases of overlapping texts, providing a richer text understanding than traditional single-text classification methods.

[0103] For example, through reasoning, the relationship between "deep learning" and "computer vision" can be identified, and then the cross-domain information can be inferred, such as "medical image analysis" belonging to the cross-domain of "computer vision" and "deep learning".

[0104] It should be noted that, Figure 3 This is just a partial example of the text-based topic knowledge graph.

[0105] Example 2

[0106] Please see Figure 4 Another embodiment of the present invention provides a text association analysis system based on LSTM neural network and knowledge graph, comprising: a data collection module, a data preprocessing module, a vector generation module, a semantic enhancement module, and a classification and analysis module;

[0107] The data collection module is used to collect text data on text topics from the literature database;

[0108] The data preprocessing module is used to preprocess the collected text topic data;

[0109] The vector generation module is used to learn from the preprocessed text topic text data through an LSTM network to generate vectors with semantic relevance to the text topics.

[0110] The semantic enhancement module is used to construct a text topic knowledge graph and perform semantic enhancement on vectors that have semantic relevance to text topics based on the constructed text topic knowledge graph;

[0111] The classification and analysis module is used to classify and analyze text topics based on the output of LSTM neural networks and knowledge graphs.

[0112] The vector generation module includes: an LSTM network building unit, a training unit, and a vector generation unit;

[0113] The LSTM network building unit is used to build an LSTM neural network model;

[0114] The training unit is used to train the constructed LSTM network and optimize the loss function;

[0115] The vector generation unit is used to convert the preprocessed text topic text data into text topic word vectors and input them into the trained LSTM network to generate vectors with semantic relevance to the text topics.

[0116] The semantic enhancement module includes: knowledge graph construction unit, enhancement unit, and association unit;

[0117] The knowledge graph construction unit is used to construct a text topic knowledge graph;

[0118] The enhancement unit is used to enhance the expressive power of the text topic knowledge graph using a graph convolutional neural network;

[0119] The association unit is used to establish a text topic context relationship model and construct a context relationship matrix between text topic entities.

[0120] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.

[0121] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A text association analysis method based on LSTM neural network and knowledge graph, characterized in that, include: Collect textual data on text topics from literature databases; Preprocess the collected text data on the text topics; The process involves using an LSTM neural network to learn from preprocessed text data related to a specific text topic, generating semantically related vectors for those topics. This includes: using a pre-trained word embedding model to convert the preprocessed text data into text topic word vectors; inputting these word vectors into a trained LSTM neural network; and concatenating or weighting the output vectors of the multi-head attention mechanism, the LSTM network at time t, and the semantically enhanced output vector to obtain a semantically related vector. The semantically enhanced output vector is obtained by linearly weighting and fusing an external semantic embedding with the hidden state of the LSTM at time t. Construct a text topic knowledge graph KG, represented as: Where E represents the entity set, G represents the relation set, and J represents the graph structure; For any node in the text topic knowledge graph (KG), a graph convolutional neural network is used to enhance the node's expressive power. Specifically, starting from any node in the KG and its neighboring nodes, all nodes reached by k jumps determined by the reward function are recorded. Combining this with the semantic association vectors of the neighboring nodes at layer k, the embedding representation of the arbitrary node at layer k+1 is updated. The specific formula is as follows: , in, This represents the embedding representation of node v at level k+1. This represents the activation function. This represents the embedding representation of node u at the k-th layer. This represents the set of neighboring nodes of node v. This represents all nodes reached from node v through k hops determined by the reward function. W represents all nodes reached from node u in k hops determined by the reward function. k Represents the weight matrix; Construct a context relation matrix between text topic entities; each element rel(s) in the context relation matrix p ,s q ) represents the text subject entity s p and text subject entities s q The semantic relationships between them; these semantic relationships are determined based on the association relationships between text topic entities in the text topic knowledge graph; If the text subject entity s p and text subject entities s q In knowledge graphs, there are multiple defined relations. A weighted sum is calculated based on the weights of different relations to obtain the context relation matrix element rel(s). p ,s q The value of ); Based on the output of LSTM neural networks and knowledge graphs, text topics are classified and analyzed, including: using a support vector machine model to classify text topics according to the output of LSTM neural networks and knowledge graphs; analyzing the classification results of text topics, and combining entity and relation information in the text topic knowledge graph to infer the relationships between text topics and calculate the probability of overlapping text topics, specifically including: calculating the probability of overlapping text topics based on the classification probability of text topic entities and the semantic relationships between text topic entities.

2. The text association analysis method based on LSTM neural network and knowledge graph as described in claim 1, characterized in that, The step of learning from the preprocessed text data of the text topics using an LSTM neural network to generate vectors with semantic relevance to the text topics includes: Constructing an LSTM neural network includes: a forget gate, an input gate, and an output gate; The constructed LSTM neural network is trained to obtain a trained LSTM neural network.

3. The text association analysis method based on LSTM neural network and knowledge graph as described in claim 1, characterized in that, The preprocessing of the collected text data on the text topics includes: Stop words are removed from the collected text data on the subject matter, terms are standardized, and part-of-speech tagging and word segmentation are performed. Based on text domain knowledge and corpus, a text feature lexicon is constructed, which contains common terms, keywords and their semantic relationships in the text domain.

4. The text association analysis method based on LSTM neural network and knowledge graph as described in claim 1, characterized in that, The literature databases include: CNKI, Google Scholar, and PubMed.

5. A text association analysis system based on LSTM neural network and knowledge graph, used to implement the text association analysis method based on LSTM neural network and knowledge graph as described in any one of claims 1-4, characterized in that, include: The system includes a data collection module, a data preprocessing module, a vector generation module, a semantic enhancement module, and a classification and analysis module. The data collection module is used to collect text data on text topics from the literature database; The data preprocessing module is used to preprocess the collected text data of the text topics. The vector generation module is used to learn from the preprocessed text data of the text topic through an LSTM neural network to generate vectors with semantic relevance to the text topic. The semantic enhancement module is used to construct a text topic knowledge graph and enhance the expressive power of the text topic knowledge graph; The classification and analysis module is used to classify and analyze text topics based on the output of LSTM neural networks and knowledge graphs.

6. The text association analysis system based on LSTM neural network and knowledge graph as described in claim 5, characterized in that, The vector generation module includes: an LSTM neural network construction unit, a training unit, and a vector generation unit; The LSTM neural network building unit is used to build an LSTM neural network model; The training unit is used to train the constructed LSTM neural network; The vector generation unit is used to convert the preprocessed text data of the text topic into text topic word vectors, and input them into the trained LSTM neural network to generate vectors with semantic relevance of the text topic.

7. The text association analysis system based on LSTM neural network and knowledge graph as described in claim 5, characterized in that, The semantic enhancement module includes: a knowledge graph construction unit, an enhancement unit, and an association unit; The knowledge graph construction unit is used to construct a text topic knowledge graph; The enhancement unit is used to enhance the expressive power of the text topic knowledge graph using a graph convolutional neural network; The association unit is used to construct a contextual relationship matrix between text subject entities.

Citation Information

Patent Citations

  • Text classification method based on bidirectional long-short-term memory model and knowledge graph

    CN115391532A