A text data classification and grading method based on dynamic graph neural network

By constructing TextGraphRank importance scoring in dynamic graph neural networks and decoupling local node learning from global message passing, the problems of high computational and storage overhead in dynamic networks are solved, and efficient text classification and grading tasks are achieved.

CN119669471BActive Publication Date: 2025-09-23SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411727061.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-09-23
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

Existing graph neural network methods have high computational and storage overhead when processing dynamic networks and have difficulty accurately evaluating node importance, resulting in inaccurate predictions and low efficiency in text classification and grading tasks.

Method used

A text data classification method based on dynamic graph neural network is adopted. The text embedding features of each node are generated through offline training. The TextGraphRank importance score is constructed by combining the in-degree/out-degree ratio, time correlation and damping factor. The local node feature learning and global message passing are decoupled to achieve incremental update.

Benefits of technology

It improves the accuracy and efficiency of text classification in dynamic networks, reduces computing and storage costs, and adapts to real-time changes in large-scale dynamic networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669471B_ABST
    Figure CN119669471B_ABST
Patent Text Reader

Abstract

The present invention relates to a text data classification and grading method based on a dynamic graph neural network. The method comprises the following steps: S1. acquiring communication network data and pre-training a local node encoder and a local node predictor; S2. when a new node or edge is added to the network, updating the offline TextGraphRank importance of each node, selecting the top-k neighboring nodes, and having the local node encoder output the updated text embedding features of each node. The pre-trained local node predictor combines the updated text embedding features of each node itself and its top-k neighboring nodes to obtain a final classification result through weighted aggregation. Compared with the prior art, the present invention has the advantages of improving the accuracy of node importance assessment in the network, thereby improving the prediction accuracy of text classification, while reducing the computational cost of prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning, and in particular to a text data classification and grading method based on a dynamic graph neural network. Background Art

[0002] With the rapid development of information delivery networks such as social networks, email, and academic citations, the demand for processing and analyzing dynamic graph data has increased significantly. Dynamic information networks are typically composed of constantly changing nodes (such as users and messages) and edges (such as social interactions and email sending relationships), and the topology of these networks is frequently updated over time. Traditional text classification and grading methods are mostly based on the static graph assumption, which assumes that the network structure remains unchanged during the analysis process. However, in dynamic networks, the constant changes in nodes and edges may lead to information loss and inaccurate model predictions. To effectively utilize information in dynamic networks, graph learning methods that can adapt to changes in network structure are needed, which is crucial for capturing complex social and information dissemination patterns.

[0003] Graph Neural Networks (GNNs), a graph learning method that has developed rapidly in recent years, have demonstrated significant advantages in handling text classification and grading tasks. However, most GNN methods assume that the network structure is static, that is, the relationships between nodes and edges do not change during model training. Traditional GNNs integrate local node features and information about neighboring nodes through hierarchical message passing and embedding propagation to achieve tasks such as node classification, link prediction, and graph embedding. For static networks, this method performs well in terms of information integration; however, in dynamic networks, as the network topology changes, the model needs to be constantly retrained, resulting in high computational and storage overhead.

[0004] Currently, research on dynamic graphs falls into two main categories: time snapshot methods and dynamic models based on recursive updates. The time snapshot method divides the dynamic network into multiple static time slices and performs independent graph learning on each time slice. While this method can capture temporal changes to a certain extent, it incurs significant computational and storage requirements, especially in networks with frequent node and edge changes. Furthermore, the time slice method performs poorly in handling real-time updates and rapid responses, as the model must be retrained for each new time slice, and information continuity is broken between time slices, resulting in delayed prediction results and information loss.

[0005] Another type of dynamic model based on recursive updates attempts to cope with dynamic changes by gradually updating node embeddings and message passing. However, this type of approach still faces some limitations, such as the strong information dependence of neighbor nodes, which can easily lead to the "neighbor explosion" problem, that is, the number of model parameters increases exponentially as the network scale expands. Due to the frequent changes in the dynamic network structure, this recursive dependency will generate a huge memory and computational burden, and it is difficult to achieve real-time updates in large-scale dynamic networks. In addition, this type of approach usually relies on recursive message passing to maintain network consistency, which can easily lead to the inability to converge stably when the topology changes drastically, further affecting the efficiency and accuracy of the model.

[0006] In text classification and grading tasks on dynamic networks, the importance of nodes in the network (i.e., their influence) is often closely related to their in-degree, out-degree, and temporal correlation. Traditional static graph learning methods often use simple metrics, such as PageRank or centrality, to handle node importance. However, these static metrics are difficult to apply effectively in dynamic networks because they fail to account for the dynamic dependencies between nodes and the temporal evolution of the network. Furthermore, as the network scale grows, traditional methods also increase the number of model parameters, resulting in a sharp increase in memory and computational costs. This is particularly evident in large-scale dynamic networks (such as social media and online literature databases). Summary of the Invention

[0007] The purpose of the present invention is to provide a text data classification and grading method based on dynamic graph neural network in order to improve the evaluation accuracy of the importance of nodes in the network and thereby improve the prediction accuracy of text classification while reducing the computational cost of prediction.

[0008] The purpose of the present invention can be achieved by the following technical solutions:

[0009] A text data classification and grading method based on a dynamic graph neural network, the method comprising the following steps:

[0010] S1. Acquire communication network data, wherein the communication network data includes a dynamic graph neural network, wherein the graph neural network includes edges and nodes, each node is provided with corresponding text, and pre-train a local node encoder offline based on the text and the communication network data. The pre-trained local node encoder generates a text embedding feature for each node, and then calculates the offline TextGraphRank importance of each node of the communication network data. The offline TextGraphRank importance is constructed based on the ratio of in-degree to out-degree, time correlation, and damping factor. A local node predictor is weightedly aggregated according to the offline TextGraphRank importance, and the local node predictor is pre-trained according to the classification result obtained by the aggregation to obtain a pre-trained local node predictor;

[0011] S2. When new nodes or edges are added to the network, the updated communication network data is obtained, the TextGraphRank importance estimate of each node is updated based on the updated communication network data, the top-k neighbor nodes are selected based on the updated TextGraphRank importance estimate, the pre-trained local node encoder outputs the updated text embedding features of each node according to the updated communication network data, the updated text embedding features are input into the pre-trained local node predictor, the pre-trained local node predictor combines the updated text embedding features of each node itself and the top-k neighbor nodes, and obtains the final classification result through weighted aggregation.

[0012] Furthermore, the calculation formula of the offline TextGraphRank importance is:

[0013]

[0014] Among them, d represents the attention, t i represents the i-th node at time t, N in Indicates t i The neighbor set of v j Indicates N in The jth node in , ER represents v j The offline TextGraphRank value of ER is set to 1, and α and β are hyperparameters, which are set to 0.7 and 0.3 respectively. Represents node v j The node importance coefficient of Represents node v j The in-degree ratio coefficient of , N represents the total number of nodes.

[0015] Furthermore, the attention degree d is:

[0016]

[0017] Where t0 represents the starting time, Φ represents the damping factor, V represents the set of all nodes, and k represents the kth node in V.

[0018] Furthermore, node v j The node importance coefficient Specifically:

[0019]

[0020] Where in represents the in-degree and T represents the node v i and v j The time period that occurs simultaneously.

[0021] Furthermore, node v j The in-and-out ratio coefficient Specifically:

[0022]

[0023] Among them, out represents the out-degree, and IOR represents the in-degree ratio.

[0024] Furthermore, the specific steps of updating the TextGraphRank importance estimation value of each node based on the updated communication network data and selecting the top-k neighbor nodes based on the updated TextGraphRank importance estimation value are as follows:

[0025] Calculate and update the TextGraphRank importance estimate of each node, the importance estimate is:

[0026]

[0027] represents the estimated value of TextGraphRank, γ represents a hyperparameter with a value of 0.85, j represents the number of times node vj is visited during the random walk, and n represents the total number of random walks;

[0028] Given a node v i , by getting all i Adjacent nodes v j ∈in(v i ), select the k nodes with the largest importance estimates as the top-k neighbor nodes, and the importance estimates of the top-k neighbor nodes are used as the weights of the corresponding edges.

[0029] Furthermore, the TextGraphRank importance estimate is obtained based on random walks. During the random walk, the estimated number of random walks required at time t+1 is:

[0030]

[0031] where rv i (t)=1-|S i (t)| / VT i (t)

[0032] Among them, M t+1 Indicates the number of random walks required at time t+1, E represents the number of random walks required for M t+1 Estimates of ∈ represent hyperparameters, set to 0.15, N out Represents node v i The outgoing edge set, t represents the current time period, rv i =1-|S i (t)| / VT i (t), S i Represents all nodes passing through node v i Random walk ID, VT i Represents all nodes passing through node v i The number of random walks.

[0033] Furthermore, the local node encoder generates the text embedding features of each node as follows:

[0034] Get the text of each node, input the pre-trained word embedding model of the local node encoder into the text of the node, and the pre-trained word embedding model outputs the word embedding representation of the text j , word embedding representation em j Input the bidirectional long short-term memory network of the local node encoder, and the bidirectional long short-term memory network outputs the contextual dependency information of the text Context-dependent information Input the self-attention mechanism module of the local node encoder, and the self-attention mechanism module outputs the weight a of the word j , and then generate the overall text embedding representation Construct a local vocabulary graph, and generate local vocabulary graph features from the local vocabulary graph Embedding the entire text into a representation and local vocabulary graph features The text embedding features of each node are obtained by integration.

[0035] Furthermore, the overall text embedding representation for:

[0036]

[0037] Among them, em j Represents the initial word vector, n i represents the number of neurons, BiLSTM represents a bidirectional long short-term memory network, b a 、W a represents the learnable parameters, u j Represents em j The activation value, u a represents the reference word vector;

[0038] Local vocabulary graph features for:

[0039]

[0040] Among them, d k Indicates, Q represents the query matrix, MS represents the mask matrix, V represents the value matrix, K represents the key-value matrix, represents the learnable parameters, and EM represents the linear projection of Q in the first layer of the attention network.

[0041] Furthermore, the method further includes: in S1 and S2, calculating the offline TextGraphRank importance of each node and generating text embedding features in parallel on multiple processing units.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The present invention accurately quantifies the importance of nodes by combining the in-degree / out-degree ratio, time weight and damping factor, enabling the model to efficiently handle dynamically changing graph structures, reducing the amount of computation while improving the prediction accuracy of text classification, and demonstrating superior performance in scenarios with dynamic nodes and edges, such as social media, email exchanges, and academic citations. In addition, the present invention decouples the graph learning process into two independent parts: local node feature learning and topology-based global message passing. Under this decoupled structure, only specific components need to be updated when the network topology changes, achieving incremental updates and avoiding retraining of the entire model. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flow chart of the present invention;

[0045] Figure 2 This is a flowchart of offline training of the present invention;

[0046] Figure 3 The online reasoning and continuous updating flow chart of the present invention;

[0047] Figure 4 A flowchart for the node encoder and graph construction of the present invention. DETAILED DESCRIPTION

[0048] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0049] The present invention proposes a text data classification and grading method based on dynamic graph neural network. The flow chart of the method is as follows: Figure 1 The method shown includes the following steps:

[0050] S1. Acquire communication network data, wherein the communication network data includes a dynamic graph neural network, wherein the graph neural network includes edges and nodes, each node is provided with corresponding text, and pre-train a local node encoder offline based on the text and the communication network data. The pre-trained local node encoder generates a text embedding feature for each node, and then calculates the offline TextGraphRank importance of each node of the communication network data. The offline TextGraphRank importance is constructed based on the ratio of in-degree to out-degree, time correlation, and damping factor. A local node predictor is weightedly aggregated according to the offline TextGraphRank importance, and the local node predictor is pre-trained according to the classification result obtained by the aggregation to obtain a pre-trained local node predictor;

[0051] S2. When new nodes or edges are added to the network, the updated communication network data is obtained, the TextGraphRank importance estimate of each node is updated based on the updated communication network data, the top-k neighbor nodes are selected based on the updated TextGraphRank importance estimate, the pre-trained local node encoder outputs the updated text embedding features of each node according to the updated communication network data, the updated text embedding features are input into the pre-trained local node predictor, the pre-trained local node predictor combines the updated text embedding features of each node itself and the top-k neighbor nodes, and obtains the final classification result through weighted aggregation.

[0052] The present invention adopts the dynamic graph decoupling learning (Disentangled Graph Learning) method, that is, the disentangled graph learning model (Disentangled Graph Learning for Text Classification, referred to as DGTC), which aims to decouple the graph learning process into independent local node learning and topology-based global information transmission, so that when the network structure changes, only the affected nodes or areas are locally updated without the need to retrain the entire network model. This decoupled design can not only greatly reduce the computational and storage overhead of the model, but also adapt to the real-time changes of dynamic networks more flexibly. The core idea of ​​the DGTC model is to decouple the graph learning process into two independent parts: local node feature learning and topology-based global message transmission. Under this decoupled structure, only specific components need to be updated when the network topology changes, avoiding retraining of the entire model.

[0053] Local node feature learning: This part is responsible for encoding the text features of the node, including each node's local lexical information and grammatical dependencies. Specifically, the initial embedding representation of the text node is obtained through a pre-trained word embedding model (such as BERT or ELMo). It is further combined with a self-attention mechanism and a local lexical graph to extract the overall semantic features and some grammatical features of the text. This feature extraction method allows local models to be trained without relying on the global graph structure, significantly improving the model's scalability.

[0054] Topology-based global message passing: To address the computational overhead of dynamic graph learning, this paper proposes an automated node importance quantification mechanism called TextGraphRank. TextGraphRank isolates node influence scores from the graph, focusing only on information about neighboring nodes with significant communication value. It dynamically updates the TextGraphRank scores of nodes using an incremental ranking algorithm, enabling message passing across the entire network without recalculating each node's embedding when the topology changes.

[0055] The specific automatic quantification mechanism of TextGraphRank influence is:

[0056] In dynamic graphs, the influence of a node is often determined not only by the number of its connections, but also by temporal characteristics and message propagation relationships. To this end, the TextGraphRank algorithm quantifies the importance of a node based on the following factors:

[0057] In-degree / Out-degree Ratio (IOR): A node's in-degree / out-degree ratio is used to quantify the node's attention or frequency of mention. In a messaging network, nodes with high in-degree tend to have higher dissemination value. TextGraphRank increases the importance of a node in information diffusion by increasing its in-degree weight.

[0058] Concurrent Attention: In information delivery networks, the temporal relevance of messages is crucial. TextGraphRank introduces temporal weighting, which makes nodes that receive more attention within the same time period more influential, thus avoiding over-reliance on historical or new messages over time.

[0059] Damping Factor: TextGraphRank uses a damping factor combined with time to balance long-term and short-term attention. This damping factor gives new messages a higher influence in the early stages of dissemination, which gradually decreases over time, while the influence of long-standing, low-attention messages further decreases.

[0060] TextGraphRank generates a unique influence score for each node through a weighted calculation of the three metrics mentioned above. This score is dynamically updated as the network topology changes. Therefore, when new nodes or edges are added to the network, only the TextGraphRank score needs to be adjusted based on the new topology, without having to retrain the entire model. This mechanism significantly reduces the computational and storage costs of processing dynamic graphs, making the DGTC model more dynamic and adaptable.

[0061] DGTC model architecture:

[0062] The DGTC model is mainly divided into two stages: offline training and online inference and incremental update:

[0063] Offline training: During the offline training phase, DGTC first encodes the text features of each node to generate a local vocabulary embedding representation. Specifically, the local node encoder is responsible for embedding the content of the text node into a low-dimensional vector space, a process that is independent of the global topology. Given a known initial network topology, TextGraphRank calculates the most important neighboring nodes for each node and assigns weights. In this way, DGTC's offline training only requires training local encoders and node predictors (such as the SoftMax classification layer) and is independent of the topology structure. Therefore, it can be implemented in parallel, improving training efficiency.

[0064] Online Inference and Incremental Updates: In actual deployments, the DGTC model is capable of real-time inference and dynamically adjusts node importance scores via an incremental update module when the network structure changes. Specifically, when new nodes or edges are added to the network, TextGraphRank uses an incremental algorithm to calculate the TextGraphRank scores of the affected nodes and update the corresponding weights. Subsequently, the affected nodes are re-predicted using pre-trained local encoders and node predictors. This significantly reduces the computational burden by eliminating the need to retrain the entire model during the online inference phase.

[0065] Dynamic information transmission and node classification:

[0066] To achieve efficient information transfer in dynamic graphs, this paper proposes a local node importance aggregation mechanism based on TextGraphRank. Specifically, when performing information transfer, DGTC prioritizes highly influential neighbor nodes with high rankings, while ignoring less important neighbor nodes. This top-k important neighbor aggregation strategy not only effectively reduces the computational complexity of message transfer, but also ensures the accuracy of information transfer.

[0067] When performing text classification, DGTC combines local feature representations of nodes with aggregated information about important neighboring nodes. This fused classification approach enables the DGTC model to effectively integrate text content and network structure information when handling text classification tasks in dynamic networks, achieving highly accurate classification results. Furthermore, the DGTC model's design enables widespread application in scenarios such as social media, email networks, and academic citation networks, making it suitable for text classification and grading in large-scale dynamic networks.

[0068] like Figure 1 As shown in Figure 1, the DGTC model of the present invention consists of a local node encoder, the TextGraphRank influence quantification algorithm, a local predictor, and an incremental update module. The entire system is divided into two phases: offline training and online inference, aiming to achieve efficient text classification and grading in dynamic information networks. The following are the specific implementation steps of the model:

[0069] Offline training phase: Figure 2 As shown in the figure, in the initial stage, a local node encoder is pre-trained using a set of known text and communication network data to generate text embedding features for each node. The TextGraphRank influence quantification algorithm is then used to quantify the importance of nodes in the network, deriving an initial node influence score and identifying highly influential neighboring nodes. Finally, a local predictor is used to classify the node embedding features.

[0070] Online reasoning and incremental update phase: Figure 3 As shown in Figure 2, in real-world applications, network structures constantly change, such as by adding new nodes or edges. When such changes occur, TextGraphRank uses an incremental update module to update only the influence scores of the affected nodes, eliminating the need to retrain the model. Furthermore, information about new nodes or edges is transferred based on the updated TextGraphRank scores, enabling real-time reasoning and classification.

[0071] Local node encoder:

[0072] like Figure 4 As shown, the node encoder is responsible for feature extraction and encoding of the text content of each node. To improve the accuracy of text representation, the local node encoder of the present invention combines the following technologies:

[0073] Pre-trained word embeddings: Use pre-trained word embedding models such as BERT or ELMo to obtain an embedding vector for each word. For each node's text, first split it into several words and encode each word using a pre-trained word embedding model. This captures the underlying semantic information in the text.

[0074] Bidirectional Long Short-Term Memory (BiLSTM) network: To capture the contextual dependencies of text, the embedding of each word is input into a BiLSTM to obtain its semantic representation in context. BiLSTM can simultaneously capture semantic information in both the forward and backward directions, helping to improve accuracy in text classification.

[0075] Self-attention mechanism: Based on the contextual embedding generated by BiLSTM, the self-attention mechanism is applied to calculate the importance weight of each word. The self-attention mechanism can dynamically adjust the weight of different words based on the context, thereby enhancing the semantic expressiveness of the text representation.

[0076] Local Lexical Graph Features: This approach constructs a local lexical graph, where nodes represent words in the text and edges represent grammatical dependencies between words. A dependency parser computes the dependencies between each pair of words to generate a local lexical graph, which is then processed using a multi-head self-attention mechanism. Finally, local lexical graph features are fused with global semantic features to form a high-dimensional embedding representation of the text nodes.

[0077] By using local node encoders, we can obtain a text embedding representation for each node. Since this embedding process does not depend on the global network topology, nodes can be encoded and embedded in parallel during the offline phase, significantly improving the efficiency and scalability of model training.

[0078] TextGraphRank Quantizer:

[0079] extGraphRank is a key algorithm used in this paper to quantify node influence. Its purpose is to generate a dynamically changing influence score for each node in the graph based on its in-degree / out-degree ratio, temporal correlation, and damping factor. TextGraphRank scoring mainly involves the following steps:

[0080] In-degree / Out-degree Ratio (IOR) calculation: For each node, the ratio of its in-degree to its out-degree is calculated. Nodes with higher in-degree than out-degree are generally viewed by many nodes and have high potential for communication. The IOR is used to initially quantify a node's importance; a higher IOR indicates a greater influence on communication.

[0081] Concurrent Attention: Within the same time period, TextGraphRank assigns higher weights to nodes that receive more attention, ensuring the temporal correlation of attention. This avoids uneven weight distribution caused by the passage of time, such as over-reliance on old messages or underestimation of new messages.

[0082] Damping Factor: Combined with time, the damping factor balances the impact of long-term and short-term node attention, ensuring that recently released messages have a higher impact in the early stages of dissemination, while the influence of low-attention nodes gradually decreases over time. This damping factor further optimizes TextGraphRank's assessment of node importance at different points in time.

[0083] The TextGraphRank algorithm generates a unique influence score for each node in the initial stage, and the score can be dynamically updated when the network topology changes, thereby achieving efficient information dissemination between nodes.

[0084] Message propagation mechanism based on TextGraphRank:

[0085] In the DGTC model, the message propagation mechanism based on TextGraphRank only transmits information between neighboring nodes with high influence, reducing unnecessary computing overhead and storage requirements. The specific implementation is as follows:

[0086] Neighbor Selection (Top-k): Each node only interacts with its top k neighbor nodes in TextGraphRank when transmitting information. This top-k neighbor selection mechanism can significantly reduce the amount of computation while ensuring the quality of information transmission.

[0087] Neighborhood Information Aggregation: When predicting a node's category, the local node predictor not only uses the node's own textual features but also aggregates the features of its top-k neighboring nodes. Neighbors with higher TextGraphRank scores have a greater influence on the target node's prediction, and the final classification is achieved through weighted aggregation.

[0088] Distributed message passing: Since the calculation of TextGraphRank is independent of local node features, parallel message passing can be performed in a distributed environment, thereby improving the scalability of the model. In large networks, this mechanism can significantly reduce the memory and time costs required for each update.

[0089] Online Inference and Incremental Updates:

[0090] When the network structure changes, such as when new nodes or edges are added, the DGTC model can adjust the TextGraphRank scores of the affected nodes in real time through the incremental update module without retraining the entire model. The specific implementation is as follows:

[0091] Incremental addition of nodes or edges: When a new node or edge is added to the graph, the TextGraphRank incremental algorithm is used to calculate the score adjustment for the affected nodes. This incremental update algorithm only calculates the local area of ​​the newly added node or edge, so it is more efficient.

[0092] Random Walk Adjustment: During incremental updates, the TextGraphRank scores of nodes adjacent to new nodes or edges are updated through random walk simulations. This approach ensures accurate updates to local scores without resetting the scores of the entire network.

[0093] Continuous Reasoning: In practice, when processing a new query request, the DGTC model first checks whether new nodes or edges need to be added. If not, it directly uses the cached TextGraphRank scores for reasoning. If additions are required, it performs real-time reasoning using incrementally updated TextGraphRank scores. Due to the decoupling of the local node encoder and TextGraphRank scores, the reasoning process is highly real-time and accurate.

[0094] Efficiency and scalability of incremental update modules:

[0095] The incremental update module of the DGTC model maintains high computational efficiency and storage scalability as the network scale continues to expand. To adapt to large-scale networks, the present invention adopts the following optimization measures:

[0096] Random Walk Storage: A limited number of random walk paths are stored for each node. When adjusting routes, only the affected paths are updated, reducing the computational effort required to update the entire graph. For large networks, this further reduces storage requirements without compromising accuracy.

[0097] Fast updates based on approximation algorithms: Using an approximation algorithm to select the top-k neighbors for information aggregation, this reduces redundant computation during message passing. The top-k approximation algorithm exhibits good scalability in both memory usage and computation time for networks of varying sizes.

[0098] Efficient node status storage: The incremental update module only records the key status of the node (such as the number of visits, total in-degree, etc.) and stores it through efficient data structures (such as red-black trees or hash tables), ensuring that the time complexity of node status updates is O(1) or O(logn).

[0099] The method of the present invention may correspond to a system comprising: a local node encoder, a TextGraphRank influence automatic quantification module, a local predictor, and an incremental update module; wherein:

[0100] The local node encoder is used to pre-train and encode the text content of each node to generate the local semantic features of the node;

[0101] The TextGraphRank influence automatic quantification module is used to quantify the importance of each node based on the node's in-degree / out-degree ratio, time correlation, and damping factor;

[0102] The local predictor classifies and ranks nodes based on their local semantic features and TextGraphRank scores;

[0103] The incremental update module is used to dynamically adjust the TextGraphRank scores of affected nodes through an incremental update method when the network topology changes.

[0104] The local node encoder includes:

[0105] A pre-trained word embedding model for generating text embedding representations, given a word w j , and get its embedding representation em j ;

[0106] A bidirectional long short-term memory network (BiLSTM) to capture the contextual dependency information of the text,

[0107] Self-attention mechanism, used to dynamically adjust the importance weights of different words based on the context, a j ;

[0108] Embedded representation of the entire document Calculated by the following formula:

[0109]

[0110] Local vocabulary graph, which generates a vocabulary graph for representing the grammatical dependencies of the text through the dependency parser, and combines the multi-head self-attention mechanism to further enhance the semantic information of the text representation.

[0111]

[0112] The TextGraphRank influence automatic quantification module calculates the importance score of a node in the following way:

[0113] Based on the ratio of the node's in-degree to its out-degree, the node's IOR value is calculated, and nodes with higher in-degree are given higher influence;

[0114]

[0115] Combined with the time correlation parameter, nodes that receive more attention in the same time period are given higher weights;

[0116]

[0117] The damping factor is used to balance the long-term and short-term attention of nodes, ensuring that new nodes gain higher influence in the early stages of dissemination.

[0118]

[0119]

[0120] When the network topology changes, the TextGraphRank influence automatic quantification module uses the incremental update module to only update the TextGraphRank scores of the affected nodes without recalculating the entire network, reducing the computing resource requirements during the update process.

[0121] The local predictor predicts the category of the node through the following steps:

[0122] Generate an initial classification probability vector based on the local semantic features of the node;

[0123] Use TextGraphRank score to filter out top-k important neighbor nodes;

[0124] The final classification result is generated by weighted averaging the prediction results of important neighbor nodes and combining them with the initial classification probability of the target node.

[0125] The local predictor uses distributed message passing to process the local features of the node and the information of the top-k neighbor nodes in parallel on multiple processing units, improving the computational efficiency and scalability of the system.

[0126] The incremental update module includes:

[0127] The incremental addition module of nodes or edges dynamically updates the TextGraphRank scores of its connected neighbor nodes when a new node or edge joins the network;

[0128] The random walk adjustment module updates the TextGraphRank scores of affected neighboring nodes through random walk simulation to ensure that local changes do not affect the score accuracy of the entire network;

[0129]

[0130] where rv i (t)=1-|S i (t)| / VT i (t)

[0131] The storage module is used to record the random walk paths and historical access times of nodes in the network, optimizing the storage and access efficiency of node status.

[0132] The system also includes a top-k approximation algorithm for selecting the top-k most important neighbor nodes of each node through approximate calculation, thereby achieving efficient dissemination and aggregation of global information and reducing unnecessary computing and storage overhead.

[0133]

[0134] The top-k approximation algorithm combines the TextGraphRank score and distance threshold of the node when determining the top-k neighbor nodes, dynamically selects key nodes in information transmission, and thus improves the accuracy and processing speed of network information flow.

[0135] The system is applied to text classification and grading in the following scenarios: post classification in social media networks, topic analysis in email networks, document field classification in academic citation networks, and other text mining tasks in dynamically changing information dissemination networks; the system can process incremental updates of nodes in these scenarios in real time and automatically quantify the importance of nodes to adapt to various network sizes.

[0136] The technical innovation and advantages of this invention in dynamic graph learning are mainly reflected in the following aspects:

[0137] Decoupled graph learning structure: Decoupling the graph learning process into local node feature learning and global topology message passing greatly reduces computational overhead and memory requirements, allowing the model to only update a small amount of node information when the network structure changes.

[0138] The design of the TextGraphRank mechanism: By combining the in-degree / out-degree ratio, time weight and damping factor, the importance of nodes is automatically quantified and incremental updates are achieved, enabling the model to efficiently handle dynamically changing graph structures.

[0139] Dynamic adaptability and scalability: DGTC's local encoder and TextGraphRank ranking algorithm can be reused on different types of network data, thus having strong adaptability and scalability in various dynamic graph network scenarios.

[0140] Parallel training and inference: Since the DGTC model does not rely on the global topology structure in the offline phase, parallel training can be achieved. In practical applications, distributed computing can be used to improve the efficiency of processing large-scale network data.

[0141] The DGTC model is applicable to a variety of text classification tasks, particularly in scenarios with dynamic nodes and edges, such as social media, email exchanges, and academic citations. By decoupling local node learning from global topological message passing, DGTC maintains high-precision text classification results in large-scale dynamic networks and is capable of real-time updates.

[0142] This paper decouples the graph learning process into local node learning and topology-based message passing, making it applicable to dynamic information networks. The method involves encoding the textual features of nodes using a local node encoder and quantifying the importance of nodes using the TextGraphRank influence algorithm, thereby achieving efficient information transfer and real-time updates. Through an incremental update module, only the scores of affected nodes need to be adjusted when the network structure changes, eliminating the need for model retraining, significantly reducing computational and storage costs. This paper is applicable to large-scale dynamic information networks such as social media, email networks, and academic citations, demonstrating high efficiency and accuracy in text classification and grading tasks.

[0143] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.

Claims

1. A text data classification and grading method based on dynamic graph neural network, characterized in that: The method comprises the following steps: S1. Acquire communication network data, wherein the communication network data includes a dynamic graph neural network, wherein the graph neural network includes edges and nodes, each node is provided with corresponding text, and pre-train a local node encoder offline based on the text and the communication network data. The pre-trained local node encoder generates a text embedding feature for each node, and then calculates the offline TextGraphRank importance of each node of the communication network data. The offline TextGraphRank importance is constructed based on the ratio of in-degree to out-degree, time correlation, and damping factor. A local node predictor is weightedly aggregated according to the offline TextGraphRank importance, and the local node predictor is pre-trained according to the classification result obtained by the aggregation to obtain a pre-trained local node predictor; S2. When new nodes or edges are added to the network, the updated communication network data is obtained, the TextGraphRank importance estimate of each node is updated based on the updated communication network data, the top-k neighbor nodes are selected based on the updated TextGraphRank importance estimate, the pre-trained local node encoder outputs the updated text embedding features of each node according to the updated communication network data, the updated text embedding features are input into the pre-trained local node predictor, the pre-trained local node predictor combines the updated text embedding features of each node itself and the top-k neighbor nodes, and obtains the final classification result through weighted aggregation.

2. A text data classification and grading method based on dynamic graph neural network according to claim 1, characterized in that: The calculation formula of the offline TextGraphRank importance is: Among them, d represents the attention, t i represents the i-th node at time t, N in Indicates t i The neighbor set of v j Indicates N in The jth node in , ER represents v j The offline TextGraphRank value of ER is set to 1, and α and β are hyperparameters, which are set to 0.7 and 0.3 respectively. Represents node v j The node importance coefficient of Represents node v j The in-degree ratio coefficient of , N represents the total number of nodes.

3. A text data classification and grading method based on dynamic graph neural network according to claim 2, characterized in that: The attention degree d is: Where t0 represents the starting time, Φ represents the damping factor, V represents the set of all nodes, and k represents the kth node in V.

4. A text data classification and grading method based on dynamic graph neural network according to claim 3, characterized in that: Node v j The node importance coefficient Specifically: Where in represents the in-degree and T represents the node v i and v j The time period that occurs simultaneously.

5. A text data classification and grading method based on dynamic graph neural network according to claim 4, characterized in that: Node v j The in-and-out ratio coefficient Specifically: Among them, out represents the out-degree, and IOR represents the in-degree ratio.

6. A text data classification and grading method based on dynamic graph neural network according to claim 1, characterized in that: The specific steps of updating the TextGraphRank importance estimation value of each node based on the updated communication network data and selecting the top-k neighbor nodes based on the updated TextGraphRank importance estimation value are as follows: Calculate and update the TextGraphRank importance estimate of each node, the importance estimate is: represents the estimated value of TextGraphRank, γ represents the hyperparameter, which takes a value of 0.85, and j represents the node v j The number of times it is visited during the random walk, n represents the total number of random walks; Given a node v i , by getting all i Adjacent nodes v j ∈in(v i ), select the k nodes with the largest importance estimates as the top-k neighbor nodes, and the importance estimates of the top-k neighbor nodes are used as the weights of the corresponding edges.

7. A text data classification and grading method based on dynamic graph neural network according to claim 1, characterized in that: The TextGraphRank importance estimate is obtained based on random walks. During the random walk, the estimated number of random walks required at time t+1 is: Among them, M t+1 Indicates the number of random walks required at time t+1, E represents the number of random walks required for M t+1 Estimates of ∈ represent hyperparameters, set to 0.15, N out Represents node v i The outgoing edge set, t represents the current time period, rv i =1-|S i (t)| / VT i (t), S i Represents all nodes passing through node v i Random walk ID, VT i Represents all nodes passing through node v i The number of random walks.

8. A text data classification and grading method based on dynamic graph neural network according to claim 1, characterized in that: The local node encoder generates the text embedding features of each node as follows: Get the text of each node, input the pre-trained word embedding model of the local node encoder into the text of the node, and the pre-trained word embedding model outputs the word embedding representation of the text j , word embedding representation em j Input the bidirectional long short-term memory network of the local node encoder, and the bidirectional long short-term memory network outputs the contextual dependency information of the text Context-dependent information Input the self-attention mechanism module of the local node encoder, and the self-attention mechanism module outputs the weight a of the word j , and then generate the overall text embedding representation Construct a local vocabulary graph, and generate local vocabulary graph features from the local vocabulary graph Embedding the entire text into a representation and local vocabulary graph features The text embedding features of each node are obtained by integration.

9. A text data classification and grading method based on dynamic graph neural network according to claim 8, characterized in that: The overall text embedding representation for: Among them, em j Represents the initial word vector, n i represents the number of neurons, BiLSTM represents a bidirectional long short-term memory network, b a 、W a represents the learnable parameters, u j Represents em j The activation value, u a represents the reference word vector; Local vocabulary graph features for: Among them, d k Indicates, Q represents the query matrix, MS represents the mask matrix, V represents the value matrix, K represents the key value matrix, W p Q 、W p K 、W p V represents the learnable parameters, and EM represents the linear projection of Q in the first layer of the attention network.

10. A text data classification and grading method based on dynamic graph neural network according to claim 1, characterized in that: The method further includes: in S1 and S2, calculating the offline TextGraphRank importance of each node and generating text embedding features in parallel on multiple processing units.

Citation Information

Patent Citations

  • Graph neural network node classification method fusing local topological structure

    CN115081528A

  • Multi-label long text classification method based on BIGBIRD and graph attention network

    CN117851591A