A method and system for heterogeneous graph representation learning based on relational vectors
By constructing a dynamic change model and a meta-learning model for heterogeneous graphs, the problems of insufficient capture of temporal evolution characteristics and cross-task adaptability of heterogeneous graphs in dynamic graph structure processing are solved, and more efficient node representation and link prediction are achieved.
Patent Information
- Application Number
- CN202511604320.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies cannot effectively capture the dynamic evolution characteristics of graph structures and lack cross-task adaptive optimization capabilities when processing heterogeneous graphs, resulting in insufficient adaptability and robustness in scenarios with few samples.
By constructing a dynamic change model of heterogeneous graphs, calculating the relation vectors of frames and generating a dynamic relation vector sequence, and combining a meta-learning model and a dynamic learning rate adjustment strategy, the node representation and link prediction tasks are optimized.
It improves the modeling accuracy and robustness of heterogeneous graph representation learning in the time dimension, enhances cross-task adaptability, and accurately reflects the dynamic changes of graph structure.
Smart Images

Figure CN123033019A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent information processing technology, and in particular to a heterogeneous graph representation learning method and system based on relation vectors. Background Technology
[0002] Heterogeneous graphs refer to graphs in which connected nodes have significantly different attributes, and are widely used in social networks, recommender systems, knowledge graphs, and other fields. In heterogeneous graph representation learning tasks, traditional methods mainly rely on static graph structures for node embedding, obtaining low-dimensional vector representations through the product of adjacency matrices and feature matrices, combined with shallow neural networks or matrix factorization techniques. In recent years, Graph Neural Networks (GNNs) and their variants have been widely applied to learning tasks with graph-structured data. Models such as Graph Convolutional Networks (GCNs) and Graph Attention Networks (GATs) can effectively fuse node features and topological information, improving the quality of graph representations. For heterogeneous graphs, existing research has attempted to alleviate the information transmission difficulties caused by differences in node attributes through multi-hop neighbor aggregation mechanisms or the design of specific attention weights, thereby improving the performance of downstream tasks such as node classification and link prediction.
[0003] However, in processing heterogeneous graphs, existing methods often ignore the dynamic evolution of the graph structure, only considering static graph modeling under a single time frame, making it difficult to capture the complex patterns of node and edge changes over time. In addition, most methods use a fixed parameter update mechanism, lacking support for generalization ability across different tasks, which limits their adaptability and robustness in low-sample scenarios. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a heterogeneous graph representation learning method based on relation vectors to solve the problems of existing technologies being unable to effectively capture temporal evolution characteristics and lacking cross-task adaptive optimization capabilities when processing dynamic graph structures.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a heterogeneous graph representation learning method based on relation vectors, which includes, Collect and preprocess the time-series data of the original heterographs to obtain a multi-frame heterograph sequence; Based on a multi-frame heterogeneous mapping sequence, a dynamic change model of heterogeneous mapping is constructed and the relationship vector of the frame is calculated. The relationship vector of the future time period is predicted, and a dynamic relationship vector sequence is generated. Based on dynamic relation vector sequences, we obtain training data sources for meta-learning, construct meta-learning models, and train them. Based on time-series data and the trained meta-learning model, combined with a dynamic learning rate adjustment strategy, an optimized dynamic relation vector is generated. Based on the optimized dynamic relation vector, the task of classifying and predicting links of nodes in multi-frame heterogeneous mapping sequences is performed, and cross-validation is used for testing. The meta-learning model is dynamically optimized based on the test results.
[0007] As a preferred embodiment of the heterogeneous graph representation learning method based on relation vectors described in this invention, the time-series data of the original heterogeneous graph includes node attribute changes, edge relation evolution, and time-related behavioral events. The preprocessing includes cleaning and normalizing the time-series data of the original heterogeneous mapping; The preprocessed time series data is divided using the sliding window method to obtain snapshots of heterogeneous maps at multiple time steps, and a multi-frame heterogeneous map sequence is constructed.
[0008] As a preferred embodiment of the heterogeneous graph representation learning method based on relation vectors described in this invention, the construction of the heterogeneous graph dynamic change model involves extracting dynamic features of nodes and edges from a multi-frame heterogeneous graph sequence and training a time series model. Through an attention mechanism, attention weights are used in the time series model to focus on time steps and perform bidirectional processing to capture past and future information, thereby forming the heterogeneous graph dynamic change model.
[0009] As a preferred embodiment of the heterogeneous graph representation learning method based on relation vectors described in this invention, wherein: the relation vectors for calculating frames are analyzed using a heterogeneous graph dynamic change model to predict the relation vectors for future time periods; By integrating historical relation vectors and relation vectors for future time periods through a dynamic graph attention network, a dynamic relation vector sequence is generated.
[0010] As a preferred embodiment of the heterogeneous graph representation learning method based on relation vectors described in this invention, wherein: the training data source for meta-learning is obtained based on the dynamic relation vector sequence, a meta-learning model is constructed and trained; Based on the temporal characteristics of dynamic relation vector sequences and the requirements for task partitioning, the dynamic relation vector sequences are divided into multiple subsets, each subset corresponds to a task learning sample, and each task is assigned a unique label information. Based on the task learning samples corresponding to each subset and the label information of each task, obtain the training data source for meta-learning; As a preferred embodiment of the heterogeneous graph representation learning method based on relation vectors described in this invention, wherein the method constitutes a meta-learning model, Based on the training data source of meta-learning, a meta-learning model architecture is selected, consisting of meta-learning algorithms and meta-learning components, and trained using the training data source of meta-learning to form a meta-learning model.
[0011] As a preferred embodiment of the heterogeneous graph representation learning method based on relation vectors described in this invention, the following steps are taken: Based on temporal data and a meta-learning model, combined with a dynamic learning rate adjustment strategy, an optimized dynamic relation vector is generated; the static learning rate of the meta-learning model is converted into a dynamic learning rate through the dynamic learning rate adjustment strategy to generate a dynamic meta-learning model; multi-task feature extraction is performed on the temporal data under an encoder-decoder structure; and dynamic relation vectors are obtained by using a self-attention mechanism and the aggregation of graph neural networks. Based on the dynamic relation vector, an optimized dynamic relation vector is generated through multimodal hybrid enhanced retrieval by extracting and fusing features from graph neural networks and temporal models.
[0012] As a preferred embodiment of the heterogeneous graph representation learning method based on relation vectors described in this invention, wherein: the task of classifying and predicting links of nodes in a multi-frame heterogeneous graph sequence is performed; Define a dynamic graph sequence, and generate multiple multi-frame dynamic graphs by cutting the original time-series data through a time window; Based on multi-frame dynamic graphs, each multi-frame dynamic graph is processed by a graph neural network to obtain the nodes and edges of each multi-frame dynamic graph and assign them dynamic vectors. The dynamic vectors of neighboring nodes are then integrated with the results of the local classifier to obtain node labels and predict future edges. Based on the node features of each multi-frame dynamic graph, a local classifier is generated through a self-attention mechanism to identify the category labels of nodes and edges in each multi-frame dynamic graph. The dynamic vectors of neighboring nodes are aggregated with the category labels of nodes and edges in each multi-frame dynamic graph to generate an enhanced node representation. At the same time, a link prediction task is performed based on the enhanced node representation. As a preferred embodiment of the heterogeneous graph representation learning method based on relation vectors described in this invention, the method is based on the task of classifying and predicting the links of nodes in a multi-frame heterogeneous graph sequence, and cross-validation is used for testing. The meta-learning model is then dynamically optimized based on the test results. The link prediction task was tested through cross-validation to obtain feedback parameters and meta-update strategies. The dynamic meta-learning model was then dynamically optimized using the meta-gradient descent method.
[0013] Secondly, the present invention provides a heterogeneous graph representation learning system based on relation vectors, comprising, Data acquisition module, relation vector generation module, meta-learning model module, relation vector optimization module, cross-validation module; The data acquisition module is used to collect the time-series data of the original heterogeneous mapping and perform preprocessing to obtain a multi-frame heterogeneous mapping sequence; The relation vector generation module is used to construct a time series model based on a multi-frame heterogeneous mapping sequence, calculate the relation vectors of the frames, predict the future changes of the relation vectors, and generate a dynamic relation vector sequence. The meta-learning model module is used to obtain training data sources for meta-learning based on dynamic relation vector sequences, construct meta-learning models, and train them. The relation vector optimization module is used to generate optimized dynamic relation vectors based on time series data and the trained meta-learning model, combined with a dynamic learning rate adjustment strategy. The cross-validation module is used to classify and predict the links of nodes in a multi-frame heterogeneous mapping sequence based on the optimized dynamic relation vector, and to test the model using cross-validation. The meta-learning model is then dynamically optimized based on the test results.
[0014] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the heterogeneous graph representation learning method based on relation vectors as described in the first aspect of the present invention.
[0015] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the heterogeneous graph representation learning method based on relation vectors as described in the first aspect of the present invention.
[0016] The beneficial effects of this invention are as follows: by constructing a dynamic change model of heterogeneous graphs and calculating the relation vectors of frames, and by constructing a meta-learning model based on the dynamic relation vector sequence for training, the effect of heterogeneous graph representation learning is improved from two dimensions: temporal modeling of graph structure and task generalization ability. This improves the modeling accuracy of heterogeneous graphs in the time dimension, more accurately reflects the dynamic changes of graph structure, and enhances the robustness and cross-task adaptability of the model. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a flowchart of a heterogeneous graph representation learning method based on relation vectors.
[0019] Figure 2A schematic diagram of a heterogeneous graph representation learning system based on relation vectors.
[0020] Figure 3 This is a flowchart of heterogeneous time-series data processing and dynamic relation vector generation.
[0021] Figure 4 Flowchart of meta-learning model training and dynamic relation vector optimization. Detailed Implementation
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0025] Reference Figures 1-4 This is one embodiment of the present invention, which provides a heterogeneous graph representation learning method based on relation vectors, including the following steps: S1. Collect the time series data of the original heterologous mapping and perform preprocessing; The time-series data of the original heterogeneous graph includes changes in node attributes, evolution of edge relationships, and time-related behavioral events; It should be noted that the graph is divided into multiple frames by time windows, and each frame is processed by a dynamic graph neural network to capture the temporal dynamic characteristics of nodes and edges and assign them dynamic vector representations.
[0026] Preprocessing includes cleaning and normalizing the time-series data of the original heterogeneous mapping; It should be noted that cleaning the time-series data of the original heterogeneous graph involves removing noise and outliers, while normalization is achieved by linearly transforming node attributes and edge weights to the [0,1] interval. Time-related behavioral events in the time series data of the original heterogeneous graph refer to activities or changes that occur at a specific point in time or within a time period and are directly related to the nodes and edges in the graph, such as dynamic interactive behaviors such as users buying goods, adding friends or sending messages in social networks. The preprocessed time series data is divided using the sliding window method to obtain snapshots of heterogeneous maps at multiple time steps, and a multi-frame heterogeneous map sequence is constructed.
[0027] S2. Based on the multi-frame heterogeneous mapping sequence, construct a dynamic change model of heterogeneous mapping and calculate the relationship vector of the frames, predict the relationship vector of future time periods, and generate a dynamic relationship vector sequence. Based on a multi-frame heterogeneous graph sequence, dynamic features of nodes and edges are extracted and a time series model is trained. Through an attention mechanism, attention weights are used in the time series model to focus on time steps and perform bidirectional processing to capture information from the past and future, thus constructing a heterogeneous graph dynamic change model that can reflect the dynamic changes of heterogeneous graphs. It should be noted that, based on a multi-frame sequence of heterogeneous graphs, dynamic features of nodes and edges in each heterogeneous graph are extracted and converted into vector form as time-series input data. A time-series model is trained using this input data, and an attention mechanism is used to assign attention weights to each time step within the model to focus on that time step and perform bidirectional processing to capture information from the past and future. Based on this process, a dynamic change model of the heterogeneous graphs is constructed that reflects their dynamic changes. For example, if processing data from 10 time frames, the dynamic features of nodes and edges generated in each time frame will be sequentially input into the time-series model for learning and prediction.
[0028] The dynamic change model of heterogeneous plots is used to analyze the relationship vectors in future time periods and predict the relationship vectors in future time periods. It should be noted that a heterogeneous graph dynamic change model is used to analyze the relation vectors within future time periods. The trained heterogeneous graph dynamic change model is applied to the dynamic features of nodes and edges in the last known time frame, outputting the relation vector of the current time frame. This relation vector is used as input to predict the relation vector for the next time step through the heterogeneous graph dynamic change model. This process is repeated to predict the relation vector for each future time step in a progressive manner until the desired prediction time period length is reached. A dynamic graph attention network is then used to integrate the historical relation vectors and the relation vectors for future time periods to generate a dynamic relation vector sequence.
[0029] Capturing information from the past and future refers to the dynamic characteristics and trends of nodes and edges at all time steps in the past and future, obtained through a bidirectional processing mechanism in a time series model.
[0030] The dynamic changes reflected in heterogeneous graphs are specifically manifested by processing the dynamic features of nodes and edges at each time step in a multi-frame heterogeneous graph sequence, using a time series model to capture the evolution patterns of node and edge features over time, and using an attention mechanism to assign weights to each time step to focus on important information. At the same time, bidirectional processing is performed to comprehensively consider the changes in nodes and edges before and after a certain time point.
[0031] The expression for constructing the dynamic change model of the heterogeneous map is: ; in, Indicates at time step The time relation vector, Indicates time step The characteristic matrix of all edges at time, This represents the update function for the dynamic change model of the heterogeneous map. The parameters represent the dynamic change model of the heterogeneous map. Indicates a step in the future time. The relational vector at time.
[0032] It should be noted that the update function includes a modeling mechanism that supports heterogeneous nodes and edges through edge features and type awareness; it uses GRU to update node states in a temporal manner to capture changes in graph structure over time; it uses attention coefficients to focus the model on key neighbor nodes, thereby improving semantic expressiveness; and it forms a richer node representation by fusing node features, edge features, and historical states.
[0033] Based on a multi-frame heterogeneous mapping sequence, the relationship vector of the frames is calculated, and its expression is as follows:
[0034] in, This represents a multilayer perceptron used to fuse information and generate the final relation vector. It is a time step upper node and Relationship vectors Represents a node At time step Feature representation; Represents a node At time step Feature representation; It is a node and Edge features between them.
[0035] S3. Based on the dynamic relation vector sequence, obtain the training data source for meta-learning, and construct a meta-learning model for training; Based on the temporal characteristics of dynamic relation vector sequences and the requirements for task partitioning, the dynamic relation vector sequences are divided into multiple subsets, each subset corresponds to a task learning sample, and each task is assigned a unique label information. It should be noted that the dynamic relation vector sequence is divided into multiple subsets according to time order and task characteristics. Each subset contains relation vectors within a specific time period, which serve as task learning samples. Based on the task type corresponding to each subset, unique label information is assigned to each task. The model is trained using task learning samples with label information. For example, the relation vectors of 10 consecutive time frames are divided into a subset and assigned label information for a specific task, resulting in a series of learning samples optimized for different tasks and their corresponding unique label information.
[0036] Based on the task learning samples corresponding to each subset and the label information of each task, obtain the training data source for meta-learning; It should be noted that, based on the task learning samples corresponding to each subset and the label information of each task, each task learning sample is bound to its corresponding unique label information to form labeled task data; each labeled task data is sampled to construct a support set and a query set as the basic input unit for meta-learning; the support sets and query sets of all tasks are integrated into the training data source for meta-learning. Based on the training data source for meta-learning, a meta-learning model architecture of meta-learning algorithms and components is selected and trained through the training data source to form the meta-learning model.
[0037] Each subset corresponds to a task, which means that the sequence is divided into several subsets according to the characteristics of the dynamic relation vector sequence and the specific task requirements, and each subset is specifically used to train a specific task.
[0038] S4. Based on the time series data and the meta-learning model, and combined with the dynamic learning rate adjustment strategy, generate the optimized dynamic relation vector; The static learning rate of the meta-learning model is transformed into a dynamic learning rate by using a dynamic learning rate adjustment strategy, thus generating a dynamic meta-learning model. It should be noted that the static learning rate of the meta-learning model is transformed into a dynamic learning rate through a dynamic learning rate adjustment strategy. The adaptive adjustment rule is determined based on performance indicators during training, such as changes in the loss value. This rule is then applied to calculate the specific learning rate value to be used in each training stage or each iteration, updating the learning rate settings of the meta-learning model. The updated dynamic learning rate is then used to update the parameters of the meta-learning model, optimizing the training process. The resulting meta-learning model with a dynamic learning rate adjustment mechanism is generated based on the above steps.
[0039] By using a dynamic meta-learning model, multi-task feature extraction is performed on time-series data under an encoding-decoding structure. Dynamic relation vectors are obtained by using self-attention mechanism and graph neural network aggregation. Furthermore, a dynamic meta-learning model is used to extract multi-task features from temporal data under an encoder-decoder structure. The temporal data is input into the encoder, where a self-attention mechanism is used to calculate the correlation between different time steps and generate a time-enhanced hidden layer representation. In the decoder, the aggregation operation of a graph neural network is combined to fuse information from the historical states of nodes and their neighbors to extract multi-task features related to the current task. These multi-task features are then passed as intermediate outputs to subsequent processing modules and used to generate dynamic relationship vectors. For example, when processing user-product interaction data, the encoder extracts the temporal patterns of user behavior, while the decoder combines the association structure between products to fuse multi-task features, thereby obtaining a more accurate dynamic relationship vector.
[0040] Based on the dynamic relation vector, an optimized dynamic relation vector is generated through multimodal hybrid enhanced retrieval by extracting and fusing features from graph neural networks and temporal models. It should be noted that, based on the dynamic relationship vector, feature extraction and fusion of graph neural networks and temporal models are achieved through multimodal hybrid augmented retrieval. The dynamic relationship vector is input into the graph neural network for information aggregation operations on nodes and their neighbors, generating node representations containing structural information. These node representations, along with the original dynamic relationship vector, are then input into the temporal model. The temporal model captures change patterns over time, achieving time-series processing of features. The features extracted from the graph neural network and temporal model are further fused and optimized using the multimodal hybrid augmented retrieval method to enhance feature expressive power and generate optimized dynamic relationship vectors. For example, when processing social network data, the influence of users' social relationships is first calculated using a graph neural network, then the trend of user behavior over time is analyzed using a temporal model, and finally, the outputs of both are combined for comprehensive optimization to obtain a more accurate dynamic relationship vector as the final result.
[0041] Based on the dynamic relation vector, the expression for generating the optimized dynamic relation vector is:
[0042] in, This indicates that after optimization, at the time step Next node With nodes The dynamic relationship vector between them; This indicates the optimized node. Enhanced feature representation; This indicates the optimized node. Enhanced feature representation; For the edge At time step The optimized feature vector; This represents the weight matrix of node features after optimization using a dynamic learning rate adjustment strategy. The weight matrix of the edge features after optimization using a dynamic learning rate adjustment strategy. This represents the weight matrix used to generate the final relation vector by adjusting the learning rate dynamically. This is the activation function.
[0043] The activation function ReLU achieves nonlinear transformation through a simple mechanism of "keeping values greater than 0 and setting values less than or equal to 0 to zero".
[0044] S5. Based on the optimized dynamic relation vector, perform node classification and link prediction tasks in multi-frame heterogeneous mapping sequences, and use cross-validation for testing. Optimize the meta-learning model dynamically based on the test results.
[0045] Define a dynamic graph sequence based on a multi-frame heterogeneous graph sequence and an optimized dynamic relation vector; It should be noted that each heterograph in the multi-frame heterograph sequence is arranged chronologically and used as the initial input. Based on the optimized dynamic relation vector, dynamic feature enhancement is performed on the nodes and edges in each heterograph, so that the representation of each node and edge incorporates temporal evolution information. The enhanced node and edge features are combined with the original heterograph structure to construct a dynamic graph sequence with temporal characteristics, generating a dynamic graph sequence composed of enhanced heterographs at multiple time steps. For example, in the t-th time step, the optimized dynamic relation vector corresponding to that time step is used to update the node and edge features in the heterograph, thereby generating a graph representation with more semantic expressive power at that time step.
[0046] Based on dynamic graph sequences, multiple multi-frame dynamic graphs are generated by cutting the original time-series data through time windows. It should be noted that, based on the dynamic graph sequence, multiple multi-frame dynamic graphs are generated by segmenting the original time-series data through time windows. First, the dynamic graph sequence is arranged in chronological order, and the size of the time window and the sliding step size are determined. Then, data segments corresponding to the time periods are extracted from the original time-series data according to the set time windows. Each time window contains several heterogeneous graph structures for consecutive time steps. Next, the heterogeneous graph structures in each time window are merged into a single multi-frame dynamic graph, retaining the node features, edge relationships, and their temporal evolution information. Finally, a set of multiple multi-frame dynamic graphs is generated, each containing graph structure evolution information within a time window. For example, if the time window is set to 3 time steps and the sliding step size is 1, then 8 multi-frame dynamic graphs can be generated from a dynamic graph sequence of length 10, each containing graph structure information for 3 consecutive time steps.
[0047] Based on multi-frame dynamic graphs, each graph is processed by a graph neural network to obtain the nodes and edges of each multi-frame dynamic graph and assign them dynamic vectors. Furthermore, based on multi-frame dynamic graphs, each graph is processed using a graph neural network to obtain the nodes and edges of each multi-frame dynamic graph and assign them dynamic vectors. First, the multi-frame dynamic graphs are input into the graph neural network model for processing. Inside the graph neural network model, node embedding is performed on the heterogeneous graph structure at each time step to generate node feature representations. Then, using the generated node feature representations and edge relationship information, the dynamic vector of each edge is calculated. Finally, the dynamic vectors of all nodes and edges are combined to form the dynamic vector representation of the entire multi-frame dynamic graph. Finally, a set of dynamic vector representations of nodes and edges from multiple multi-frame dynamic graphs is output. For example, if there are multiple multi-frame dynamic graphs containing 5 time steps, each graph will be processed by the graph neural network model, generating corresponding dynamic vectors for the nodes and edges in each time step, and combining them to form the dynamic vector representation of the entire graph. By integrating the dynamic vectors of neighboring nodes with the results of the local classifier through a graph neural network, node labels are obtained and future edges are predicted. It should be noted that the graph neural network integrates the dynamic vectors of neighboring nodes with the results of the local classifier to obtain node labels and predict future edges. First, the dynamic vectors of the neighboring nodes of each node in each multi-frame dynamic image are input to the graph neural network for information aggregation, generating a neighborhood feature representation of the node. Next, the node classification result output by the local classifier is fused with the neighborhood feature representation of that node to form an enhanced node representation. Then, based on the enhanced node representation, the predicted label of the current node is obtained through a decoder or classification layer. Finally, the enhanced representations between nodes are used to generate similarity scores between node pairs, which are used to predict edges that may form in the future. For example, in a multi-frame dynamic image, the dynamic vectors of the neighboring nodes of node A are aggregated into neighborhood features and combined with the category results output by the local classifier, ultimately used to predict the label of node A and the existence of future edges between it and other nodes. The final result is the acquisition of node labels and the prediction results of future edges.
[0048] Based on the node features of each graph, a local classifier is generated through a self-attention mechanism to identify the category labels of nodes and edges in each multi-frame dynamic graph. It should be noted that, based on the node features of each graph, a local classifier is generated through a self-attention mechanism to identify the category labels of nodes and edges in each multi-frame dynamic graph. First, all node features in each multi-frame dynamic graph are used as input to the self-attention mechanism to calculate the correlation weights between different nodes. Then, the node features are weighted and aggregated according to the correlation weights to generate a node representation with context awareness. Next, a local classifier is built based on the node representation to classify and predict the nodes and their connecting edges in each multi-frame dynamic graph. Finally, the category labels of each node and edge in each multi-frame dynamic graph are output.
[0049] It should be noted that the expression for calculating the correlation weights between different nodes is as follows: ; in, Learnable weight matrices are used to map node features to the query space. node At time step The input feature vector; The dimension of the key vector. Learnable weight matrices are used to map node features to the key space. node At time step The input feature vector, This is expressed as the total number of time steps. This represents the correlation weights between nodes in a multi-frame dynamic graph. Represents multi-frame dynamic graph nodes The query vector, Represents multi-frame dynamic graph nodes The key vector; By using a graph neural network to aggregate the dynamic vectors of neighboring nodes and the category labels of nodes and edges in each multi-frame dynamic graph, an enhanced node representation is generated, and a link prediction task is performed based on the enhanced node representation. It should be noted that an enhanced node representation is generated by aggregating the dynamic vectors of neighboring nodes with the class labels of nodes and edges in each multi-frame dynamic graph using a graph neural network. The link prediction task is then performed based on this enhanced node representation. First, the dynamic vectors of all nodes in each multi-frame dynamic graph are input into the graph neural network. Next, based on the graph structure information, the dynamic vectors of each node's neighboring nodes are aggregated to obtain neighborhood features. Then, the node class label output by the local classifier of that node and the class labels of its connected edges are used as supplementary features, concatenated or weighted with the neighborhood features to generate the enhanced node representation. Finally, the similarity or connection probability between node pairs is calculated based on the enhanced node representation to predict whether potential edges exist between nodes in the future. For example, in a multi-frame dynamic graph, the dynamic vectors of node A's neighboring nodes are aggregated into neighborhood features, combined with node A's class label and the class labels of its edges to form the final enhanced node representation, used to predict whether new connections will appear between node A and other nodes in the future. The final result is that the link prediction task is completed based on the enhanced node representation.
[0050] The link prediction task was tested through cross-validation to obtain feedback parameters and meta-update strategies. The dynamic meta-learning model was then dynamically optimized using the meta-gradient descent method.
[0051] It should be noted that cross-validation is used to test the link prediction task, obtain feedback parameters and meta-update strategies, and then the dynamic meta-learning model is dynamically optimized using meta-gradient descent. First, cross-validation is performed, dividing the dataset into training and validation sets in each round. Next, the link prediction task is trained using the training set to obtain the current augmented node representations. Then, the link prediction task is performed on the validation set based on these augmented node representations, and feedback parameters, such as accuracy and recall, are calculated based on the prediction results. Subsequently, the meta-update strategy is adjusted using the feedback parameters to determine how to modify the parameters in the dynamic meta-learning model to improve performance. Finally, meta-gradient descent is applied to dynamically optimize the dynamic meta-learning model based on the meta-update strategy. For example, if the link prediction task achieves an accuracy of 85% in a cross-validation round, the meta-update strategy is adjusted based on this result, and the dynamic meta-learning model is optimized using meta-gradient descent to achieve better performance in the next round of validation. The final result is that the dynamic meta-learning model is dynamically optimized using meta-gradient descent.
[0052] Feedback parameters refer to the performance metrics calculated during cross-validation by comparing the prediction results of the linked prediction task with the true labels, such as accuracy, recall, or AUC value, which are quantitative parameters used to evaluate the model's performance.
[0053] Meta-update strategies refer to methods for adjusting the parameters of a dynamic meta-learning model based on feedback parameters, aiming to optimize model performance and achieve better prediction results in subsequent tasks. This embodiment also provides a heterogeneous graph representation learning system based on relation vectors, including: Data acquisition module, relation vector generation module, meta-learning model module, relation vector optimization module, cross-validation module; The data acquisition module is used to collect the time-series data of the original heterogeneous mapping and perform preprocessing to obtain a multi-frame heterogeneous mapping sequence; The relation vector generation module is used to construct a time series model based on a multi-frame heterogeneous mapping sequence, calculate the relation vectors of the frames, predict the future changes of the relation vectors, and generate a dynamic relation vector sequence. The meta-learning model module is used to obtain training data sources for meta-learning based on dynamic relation vector sequences, construct meta-learning models, and train them. The relation vector optimization module is used to generate optimized dynamic relation vectors based on time series data and the trained meta-learning model, combined with a dynamic learning rate adjustment strategy. The cross-validation module is used to classify and predict the links of nodes in a multi-frame heterogeneous mapping sequence based on the optimized dynamic relation vector, and to test the model using cross-validation. The meta-learning model is then dynamically optimized based on the test results.
[0054] This embodiment also provides a computer device applicable to the heterogeneous graph representation learning method based on relation vectors, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the heterogeneous graph representation learning method based on relation vectors as proposed in the above embodiment.
[0055] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0056] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the heterogeneous graph representation learning method based on relation vectors as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0057] In summary, this invention improves the performance of heterogeneous graph representation learning from two dimensions: temporal modeling of graph structure and task generalization ability. It enhances the modeling accuracy of heterogeneous graphs in the temporal dimension, more accurately reflects the dynamic changes of graph structure, and strengthens the robustness and cross-task adaptability of the model by constructing a dynamic change model of heterogeneous graphs and calculating the relation vectors of frames, and by constructing a meta-learning model based on the dynamic relation vector sequence for training.
[0058] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A heterogeneous graph representation learning method based on relation vectors, characterized in that: include, Collect and preprocess the time-series data of the original heterographs to obtain a multi-frame heterograph sequence; Based on a multi-frame heterogeneous mapping sequence, a dynamic change model of heterogeneous mapping is constructed and the relationship vector of the frame is calculated. The relationship vector of the future time period is predicted, and a dynamic relationship vector sequence is generated. Based on dynamic relation vector sequences, we obtain training data sources for meta-learning, construct meta-learning models, and train them. Based on time-series data and the trained meta-learning model, combined with a dynamic learning rate adjustment strategy, an optimized dynamic relation vector is generated. Based on the optimized dynamic relation vector, the task of classifying and predicting links of nodes in multi-frame heterogeneous mapping sequences is performed, and cross-validation is used for testing. The meta-learning model is dynamically optimized based on the test results.
2. The heterogeneous graph representation learning method based on relation vectors according to claim 1, characterized in that: The time-series data of the original heterogeneous graph includes changes in node attributes, evolution of edge relationships, and time-related behavioral events; The preprocessing includes cleaning and normalizing the time-series data of the original heterogeneous mapping; The preprocessed time series data is divided using the sliding window method to obtain snapshots of heterogeneous maps at multiple time steps, and a multi-frame heterogeneous map sequence is constructed.
3. The heterogeneous graph representation learning method based on relation vectors according to claim 1, characterized in that: The construction of the heterogeneous graph dynamic change model refers to extracting the dynamic features of nodes and edges based on a multi-frame heterogeneous graph sequence and training a time series model. Through an attention mechanism, attention weights are used in the time series model to focus on time steps and perform bidirectional processing to capture past and future information, thus forming the heterogeneous graph dynamic change model.
4. The heterogeneous graph representation learning method based on relation vectors according to claim 1, characterized in that: The specific steps for calculating the relationship vector of the frame are as follows. The dynamic change model of heterogeneous mapping is used to analyze the relationship vectors in future time periods and predict the relationship vectors in future time periods. By integrating historical relation vectors and relation vectors for future time periods through a dynamic graph attention network, a dynamic relation vector sequence is generated.
5. The heterogeneous graph representation learning method based on relation vectors according to claim 1, characterized in that: The training data source for meta-learning is obtained based on dynamic relation vector sequences. The specific steps are as follows: Based on the temporal characteristics of dynamic relation vector sequences and the requirements for task partitioning, the dynamic relation vector sequences are divided into multiple subsets, each subset corresponds to a task learning sample, and each task is assigned a unique label information. The training data source for meta-learning is obtained based on the task learning samples corresponding to each subset and the label information of each task.
6. The heterogeneous graph representation learning method based on relation vectors according to claim 1, characterized in that: The specific steps for constructing and training the meta-learning model are as follows. Based on the training data source of meta-learning, a meta-learning model architecture is selected, consisting of meta-learning algorithms and meta-learning components, and trained using the training data source of meta-learning to form a meta-learning model.
7. The heterogeneous graph representation learning method based on relation vectors according to claim 1, characterized in that: The process of generating an optimized dynamic relation vector based on time-series data and a meta-learning model, combined with a dynamic learning rate adjustment strategy, involves the following specific steps. The static learning rate of the meta-learning model is transformed into a dynamic learning rate by a dynamic learning rate adjustment strategy, generating a dynamic meta-learning model. Multi-task feature extraction is performed on time-series data under an encoder-decoder structure, and dynamic relation vectors are obtained by using self-attention mechanism and graph neural network aggregation. Based on the dynamic relation vector, an optimized dynamic relation vector is generated through multimodal hybrid enhanced retrieval by extracting and fusing features from graph neural networks and temporal models.
8. The heterogeneous graph representation learning method based on relation vectors according to claim 1, characterized in that: The specific steps for classifying and predicting links among nodes in a multi-frame heterogeneous mapping sequence are as follows. Define a dynamic graph sequence, and generate multiple multi-frame dynamic graphs by cutting the original time-series data through a time window; Based on multi-frame dynamic graphs, each multi-frame dynamic graph is processed by a graph neural network to obtain the nodes and edges of each multi-frame dynamic graph and assign them dynamic vectors. The dynamic vectors of neighboring nodes are then integrated with the results of the local classifier to obtain node labels and predict future edges. Based on the node features of each multi-frame dynamic graph, a local classifier is generated through a self-attention mechanism to identify the class labels of nodes and edges in each multi-frame dynamic graph. The dynamic vectors of neighboring nodes are then aggregated with the class labels of nodes and edges in each multi-frame dynamic graph to generate an enhanced node representation. Simultaneously, a link prediction task is performed based on the enhanced node representation.
9. The heterogeneous graph representation learning method based on relation vectors according to claim 1, characterized in that... The method employs cross-validation for testing, and dynamically optimizes the meta-learning model based on the test results. The specific steps are as follows. The link prediction task was tested through cross-validation to obtain feedback parameters and meta-update strategies. The dynamic meta-learning model was then dynamically optimized using the meta-gradient descent method.
10. A heterogeneous graph representation learning system based on relation vectors, based on the heterogeneous graph representation learning method based on relation vectors according to any one of claims 1 to 9, characterized in that: It includes a data acquisition module, a relation vector generation module, a meta-learning model module, a relation vector optimization module, and a cross-validation module; The data acquisition module is used to collect the time-series data of the original heterogeneous mapping and perform preprocessing to obtain a multi-frame heterogeneous mapping sequence; The relation vector generation module is used to construct a time series model based on a multi-frame heterogeneous mapping sequence, calculate the relation vectors of the frames, predict the future changes of the relation vectors, and generate a dynamic relation vector sequence. The meta-learning model module is used to obtain training data sources for meta-learning based on dynamic relation vector sequences, construct meta-learning models, and train them. The relation vector optimization module is used to generate optimized dynamic relation vectors based on time series data and the trained meta-learning model, combined with a dynamic learning rate adjustment strategy. The cross-validation module is used to classify and predict the links of nodes in a multi-frame heterogeneous mapping sequence based on the optimized dynamic relation vector, and to test the model using cross-validation. The meta-learning model is then dynamically optimized based on the test results.
