Dynamic feature enhancement method and device based on graph convolutional network, equipment and medium
By generating a dynamic adjacency matrix through a self-supervised graph convolutional network and combining spatiotemporal feature aggregation with contrastive learning, the problems of existing technologies such as dependence on labeled data and insufficient adaptability to dynamic graph structures are solved, achieving more comprehensive and accurate feature extraction.
Patent Information
- Application Number
- CN202510847238.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-10-03
AI Technical Summary
Existing graph data processing technologies rely on labeled data in small sample or unlabeled scenarios, cannot adapt to dynamically changing graph data, and fail to effectively integrate local substructure information, resulting in incomplete and inaccurate feature extraction.
A dynamic adjacency matrix is generated through a self-supervised graph convolutional network. Combined with spatiotemporal feature aggregation and a dual contrast loss mechanism, local neighbor contrast loss and global structure loss calculation are performed to generate a target dynamic feature enhancement model.
It reduces dependence on labeled data, adapts to changes in dynamic graph structure, improves the comprehensiveness and accuracy of feature extraction, and enhances modeling capabilities and feature robustness in dynamic scenarios.
Smart Images

Figure CN120747692A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of graph data processing technology and can be applied to the medical field and the financial technology field. In particular, it relates to a dynamic feature enhancement method, device, equipment and medium based on a graph convolutional network. Background Art
[0002] The current field of graph data processing primarily relies on graph convolutional networks and their variants. These techniques extract local structural features by convolving adjacency matrices with node features, achieving some success in tasks such as node classification and link prediction. These techniques can be applied to healthcare and fintech, for example, in scenarios such as analyzing dynamic investment relationship networks and building multimodal medical knowledge graphs.
[0003] Self-supervised learning, as an important branch of unsupervised learning, learns effective features from unlabeled data by designing proxy tasks, such as the contrastive learning framework SimCLR in the image field. However, existing technologies still have significant shortcomings in combining graph data with self-supervised learning. Existing technologies have three major flaws: First, traditional graph convolutional networks are highly dependent on labeled data, which limits their application in small sample or unlabeled scenarios; second, existing methods mostly use fixed graph structures and cannot adapt to dynamically changing graph data, such as real-time relationship changes in social networks; finally, current self-supervised learning methods fail to fully exploit the local substructure information of the graph, resulting in incomplete feature extraction. It is particularly noteworthy that existing technologies fail to effectively integrate the global contrast mechanism of SimCLR with the local structure modeling capabilities of GCN, and mostly use simple cascade structures, which cannot achieve deep interaction between local and global features, resulting in inaccurate feature extraction. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to propose a dynamic feature enhancement method, device, equipment and medium based on a graph convolutional network to reduce dependence on labeled data and improve the comprehensiveness and accuracy of feature extraction.
[0005] In order to solve the above technical problems, the present invention provides a method for dynamic feature enhancement based on a graph convolutional network, including:
[0006] Acquire original graph data, and preprocess the original graph data to obtain preprocessed graph data, wherein the preprocessed graph data includes a target node feature matrix and a target history graph sequence;
[0007] Performing dynamic adjacency matrix generation processing based on the target node feature matrix through a self-supervised graph convolutional network to obtain a target dynamic adjacency matrix;
[0008] Performing spatiotemporal feature aggregation processing based on the target dynamic adjacency matrix and the target historical graph sequence to obtain a global graph including spatiotemporal aggregation features;
[0009] Performing local neighbor contrast loss calculation and global structure loss calculation according to the global graph to obtain local contrast loss value and global contrast loss value;
[0010] Performing parameter adjustment and model training on the self-supervised graph convolutional network according to the local contrast loss value and the global contrast loss value to generate a target dynamic feature enhancement model;
[0011] The dynamic image data to be processed is acquired, and a target enhanced feature is output based on the dynamic image data to be processed by a target dynamic feature enhancement model.
[0012] In order to solve the above technical problems, the embodiment of the present application provides a dynamic feature enhancement device based on a graph convolutional network, comprising:
[0013] A preprocessing module, configured to obtain original graph data and preprocess the original graph data to obtain preprocessed graph data, wherein the preprocessed graph data includes a target node feature matrix and a target history graph sequence;
[0014] An adjacency matrix generation module is used to perform dynamic adjacency matrix generation processing based on the target node feature matrix through a self-supervised graph convolutional network to obtain a target dynamic adjacency matrix;
[0015] A spatiotemporal feature aggregation module, configured to perform spatiotemporal feature aggregation processing based on the target dynamic adjacency matrix and the target historical graph sequence to obtain a global graph including spatiotemporal aggregation features;
[0016] A loss calculation module is used to perform local neighbor contrast loss calculation and global structure loss calculation according to the global graph to obtain local contrast loss value and global contrast loss value;
[0017] A model training module, configured to perform parameter adjustment and model training on the self-supervised graph convolutional network according to the local contrast loss value and the global contrast loss value, to generate a target dynamic feature enhancement model;
[0018] The target feature generation module is used to obtain the dynamic image data to be processed and output the target enhancement feature based on the dynamic image data to be processed through the target dynamic feature enhancement model.
[0019] To solve the above technical problems, a technical solution adopted by the present invention is: to provide a computer device, including one or more processors; a memory for storing one or more programs, so that the one or more processors can implement any one of the dynamic feature enhancement methods based on graph convolutional networks described above.
[0020] To solve the above technical problems, a technical solution adopted by the present invention is: a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements any one of the above-mentioned dynamic feature enhancement methods based on graph convolutional networks.
[0021] The embodiment of the present invention provides a method, device, equipment and medium for dynamic feature enhancement based on a graph convolutional network. The method includes: obtaining original graph data and preprocessing the original graph data to obtain preprocessed graph data, wherein the preprocessed graph data includes a target node feature matrix and a target historical graph sequence; performing dynamic adjacency matrix generation processing based on the target node feature matrix through a self-supervised graph convolutional network to obtain a target dynamic adjacency matrix; performing spatiotemporal feature aggregation processing based on the target dynamic adjacency matrix and the target historical graph sequence to obtain a global graph including spatiotemporal aggregation features; performing local neighbor contrast loss calculation and global structure loss calculation based on the global graph to obtain local contrast loss value and global contrast loss value; adjusting parameters and model training of the self-supervised graph convolutional network based on the local contrast loss value and the global contrast loss value to generate a target dynamic feature enhancement model; obtaining dynamic graph data to be processed, and outputting target enhancement features based on the dynamic graph data to be processed through the target dynamic feature enhancement model. The embodiments of the present invention dynamically generate an adjacency matrix through a self-supervised graph convolutional network and combine it with spatiotemporal feature aggregation and contrastive learning mechanisms, effectively reducing dependence on labeled data and adapting to dynamically changing graph structures. At the same time, it improves the comprehensiveness of feature extraction through local and global contrast losses, which is conducive to reducing dependence on labeled data while improving the comprehensiveness and accuracy of feature extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the solutions in this application, a brief introduction will be given below to the drawings required for use in the description of the embodiments of this application. Obviously, the drawings described below are some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0023] Figure 1 2 is a schematic diagram of an application environment of a dynamic feature enhancement method based on a graph convolutional network according to an embodiment of the present invention;
[0024] Figure 2 This is a flowchart of the implementation process of the dynamic feature enhancement method based on graph convolutional network provided in the embodiment of the present application;
[0025] Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S1;
[0026] Figure 4 yes Figure 2 A schematic flow chart of a specific implementation of step S2;
[0027] Figure 5 yes Figure 2 A schematic flow chart of a specific implementation of step S3;
[0028] Figure 6 yes Figure 2 A schematic flow chart of a specific implementation of step S4;
[0029] Figure 7 yes Figure 2 A schematic flow chart of a specific implementation of step S5;
[0030] Figure 8 yes Figure 7 A schematic flow chart of a specific implementation of step S54;
[0031] Figure 9 Schematic diagram of a dynamic feature enhancement device based on a graph convolutional network provided in an embodiment of the present application;
[0032] Figure 10 It is a schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0034] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0035] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0036] The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0037] It should be noted that the dynamic feature enhancement method based on graph convolutional network provided in the embodiment of the present application is generally executed by a server. Accordingly, the dynamic feature enhancement device based on graph convolutional network is generally configured in the server.
[0038] The dynamic feature enhancement method based on graph convolutional network provided by the embodiment of the present invention can be applied in Figure 1 In an application environment, the client communicates with the server through a network. The server can receive the dynamic graph data to be processed from the client; and generate enhanced features and task prediction results based on the dynamic graph data to be processed. The server in the present invention sends the enhanced features and task prediction results to the client. The client can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.
[0039] The dynamic feature enhancement method based on graph convolutional network provided in the embodiment of the present application can be used in dynamic investment relationship network analysis scenarios, or can be used in multimodal medical knowledge graph scenarios.
[0040] Graph convolutional networks (GCNNs) and their variants are widely used for feature extraction in graph data processing, but existing methods have significant limitations. For example, in social network scenarios, user relationships change dynamically over time. Traditional fixed adjacency matrices cannot capture the real-time changes in the association weights between nodes, causing feature representations to deviate from the actual topological structure. While existing self-supervised learning methods can reduce reliance on data annotation, they often employ global contrast mechanisms and fail to effectively utilize local substructure information, resulting in poor performance in tasks that rely on local topology, such as community discovery. Furthermore, cascaded architectures struggle to achieve deep integration of spatiotemporal features, impacting the modeling accuracy of dynamic graph data. To address these issues, the core contradiction of existing technologies lies in the mismatch between static graph structure and dynamic data evolution, as well as the disconnect between local features and global representation. By analyzing the temporal correlation of dynamic graph data, this paper recognizes that node similarity should be dynamically adjusted as features change. Combining the unsupervised advantages of self-supervised learning, we consider integrating the adjacency matrix generation process into the feature learning framework. Furthermore, to address the underutilization of local structural information, we design a dual contrast loss mechanism to enhance the robustness of local neighbor relationships while maintaining global topological integrity. Ultimately, a technical route for collaborative optimization of spatiotemporal aggregation and contrastive learning is formed to achieve dynamic feature enhancement.
[0041] This application effectively reduces the reliance on labeled data and enables unsupervised learning of effective representations of dynamic graph data. The dynamic adjacency matrix generation mechanism enables the model to adapt to real-time changes in node relationships, improving the modeling capabilities of dynamic scenarios such as social networks. The local neighbor contrast loss enhances the feature discriminability of subgraph structures, demonstrating improved robustness in link prediction tasks. The spatiotemporal aggregation operation enables deep fusion of multidimensional features, providing more comprehensive feature support for downstream tasks.
[0042] See also Figure 2 , Figure 2 A specific implementation of a dynamic feature enhancement method based on a graph convolutional network is shown.
[0043] It should be noted that the method of the present invention is not limited to the method of Figure 2 The process sequence shown is limited to the following steps:
[0044] S1: Acquire original graph data and preprocess the original graph data to obtain preprocessed graph data, wherein the preprocessed graph data includes a target node feature matrix and a target history graph sequence.
[0045] Specifically, raw graph data includes a node feature matrix, a historical graph sequence, and node location coordinates. Preprocessed graph data refers to the cleaned and standardized node feature matrix and the chronologically ordered historical graph sequence. This is achieved by removing isolated nodes and performing Z-score normalization to eliminate noise and unify the data scale.
[0046] See also Figure 3 , Figure 3 A specific implementation of step S1 is shown, which is described in detail as follows:
[0047] S11: Acquire the original graph data, wherein the original graph data includes a node feature matrix and a historical graph sequence.
[0048] S12: performing data cleaning on the original data to remove nodes without connection relationships, and obtaining a cleaned node feature matrix.
[0049] S13: Standardizing the cleaned node feature matrix of each node to obtain a target node feature matrix.
[0050] S14: Cut the history graph sequence into continuous segments arranged in chronological order to obtain the target history graph sequence.
[0051] Specifically, the original graph data first undergoes a data cleaning step to reduce the negative impact of redundant information on the subsequent adjacency matrix generation by removing isolated nodes. Subsequently, the feature matrix of each node is standardized to eliminate the dimensional differences between different feature dimensions and ensure the comparability of feature weights in subsequent convolution operations. Finally, the historical graph sequence is cut into continuous segments with a clear time order, so that the graph data in each segment can reflect the local temporal associations in the dynamic change process, and provide input data that conforms to the law of time evolution for spatiotemporal feature aggregation. These three preprocessing operations target structural redundancy, feature heterogeneity, and temporal discreteness problems respectively, forming a complete optimization process. The present application can effectively remove noise nodes in the original data and improve the quality of adjacency matrix generation; unify the node feature scale to avoid training bias of the model due to dimensional differences; and at the same time, convert discrete historical graph data into continuous segments with clear temporal associations, thereby enhancing the modeling ability of the subsequent spatiotemporal feature aggregation module for dynamic changes.
[0052] S2: Perform dynamic adjacency matrix generation processing based on the target node feature matrix through a self-supervised graph convolutional network to obtain a target dynamic adjacency matrix.
[0053] Specifically, a self-supervised graph convolutional network calculates the cosine similarity between the feature matrices of each two target nodes to obtain an original similarity matrix. This matrix is then distance-weighted to generate a weighted similarity matrix. This weighted similarity matrix is then filtered according to a preset threshold to obtain the target dynamic adjacency matrix. The self-supervised graph convolutional network is a neural network module that integrates similarity calculation with adjacency matrix generation. It uses cosine similarity combined with distance weighting to generate dynamic association weights, enabling node connectivity to adaptively adjust as features change.
[0054] See also Figure 4 , Figure 4 A specific implementation of step S2 is shown, which is described in detail as follows:
[0055] S21: Calculate the cosine similarity between each two target node feature matrices through the self-supervised graph convolutional network to obtain an original similarity matrix.
[0056] Specifically, the node feature matrix F at the current moment t (N×D, N is the number of nodes, D is the feature dimension) is input into the self-supervised graph convolutional network, and then the cosine similarity between nodes is calculated.
[0057] S22: Perform distance weighted calculation on the original similarity matrix to generate a weighted similarity matrix.
[0058] Specifically, the geometric distance (such as Euclidean distance) is combined to suppress the noise edge, where the calculation formula is: Among them, di,j =||x i -x j ||2, x i is the spatial coordinate of the node (such as the user location in a social network), and sim(i,j) is the cosine similarity between nodes.
[0059] S23: Screening the weighted similarity matrix according to a preset threshold to obtain a target dynamic adjacency matrix.
[0060] Specifically, after the cosine similarity calculation, the node feature matrix is converted into the original similarity matrix that reflects the strength of semantic association. At this time, each element represents the semantic similarity of the corresponding node pair. Subsequently, the topological distance information between nodes is integrated into the similarity matrix through distance weighted calculation. For example, in a social network scenario, even if two users have similar interests but are in different social circles, their connection weight will be appropriately reduced. After the weighted similarity matrix is filtered by a preset threshold, only the connection relationships above the threshold are retained to form a dynamic adjacency matrix. This process effectively removes noise edges and retains key dynamic associations. The adjacency matrix thus generated contains both real-time semantic association information and integrates topological structure features, and can adaptively reflect the dynamic interaction relationship between nodes.
[0061] Distance-weighted calculation involves introducing a topological distance weighting factor between nodes based on cosine similarity. This can be implemented using an exponential decay function based on the shortest path length, giving spatially adjacent nodes higher weights. Preset threshold filtering involves binarizing the weighted matrix by setting a similarity threshold. This can be implemented using a fixed-ratio cutoff method or an adaptive quantile method to filter out low-correlation connections.
[0062] S3: Performing spatiotemporal feature aggregation processing based on the target dynamic adjacency matrix and the target historical graph sequence to obtain a global graph including spatiotemporal aggregation features.
[0063] Specifically, the graph sequence {G1, G2, ..., GT} of the historical T time steps is used as input and the spatiotemporal features are aggregated through the dynamic graph convolution layer: Among them, δ is the activation function, W l is a learnable parameter. After aggregating spatiotemporal features, a global graph including spatiotemporal aggregated features is generated.
[0064] See also Figure 5 , Figure 5 A specific implementation of step S3 is shown, which is described in detail as follows:
[0065] S31: performing convolution processing on the node features at the current moment according to the target dynamic adjacency matrix to obtain the convolution result at the current moment, and performing convolution processing based on the target historical graph sequence to obtain the historical convolution result.
[0066] S32: Aggregate the current convolution result and the historical convolution result to generate the global graph including the spatiotemporal aggregation features.
[0067] Specifically, the dynamic adjacency matrix is generated in a self-supervised manner, which can reflect the dynamic correlation strength between nodes at the current moment. Based on the matrix, graph convolution operations are performed on the current node features to extract local structural features with spatial dynamics. The historical graph sequence is convolved in the time dimension to capture the changing trend of node features within the historical time window. The current moment convolution result and the historical convolution result are aggregated so that the global graph contains both the real-time change characteristics of the spatial topology and the evolution characteristics of the time dimension, forming a deep fusion of spatiotemporal correlation information. For example, in the analysis of social network dynamic graphs, the current convolution result can reflect the real-time interactive relationship of users, and the historical convolution result can reflect the periodic changes in user behavior patterns. The aggregation of the two can more comprehensively model user behavior characteristics. The present application can effectively integrate the spatial topology change characteristics and the time evolution characteristics of dynamic graph data, and enhance the representation ability of spatiotemporal correlation information.
[0068] Among them, the dynamic adjacency matrix refers to a matrix that reflects the real-time node association relationship based on the node features at the current moment. It can be implemented by combining cosine similarity calculation with distance weighting to capture the dynamic changes of the graph structure over time. The historical graph sequence refers to the graph data fragments of multiple historical moments arranged in chronological order. It can be generated by cutting the original data through a sliding window to extract the temporal evolution law of node features. Convolution processing refers to the operation of performing graph convolution operations on node features. It can be implemented by using a graph convolution network layer to aggregate the feature information of adjacent nodes. Aggregation refers to the operation of fusing features from different sources. It can be implemented by weighted summation or feature splicing to integrate information in the spatiotemporal dimensions.
[0069] S4: performing local neighbor contrast loss calculation and global structure loss calculation according to the global graph to obtain a local contrast loss value and a global contrast loss value.
[0070] Specifically, this application improves the robustness to noisy or sparse data by performing local contrast learning and global structure learning, effectively enhancing the model's ability to capture local neighbor topological relationships in dynamic graph data.
[0071] See also Figure 6 , Figure 6 A specific implementation of step S4 is shown, which is described in detail as follows:
[0072] S41: For each node, randomly sample a local network in the global graph to generate a local subgraph.
[0073] Specifically, for each node i, randomly sample its k-order neighbors to form a local subgraph S i .
[0074] S42: performing random edge deletion and random node attribute masking on the local subgraph to generate two enhanced subgraphs.
[0075] Specifically, two enhanced subgraphs are generated by random edge deletion (probability p) and node attribute masking (probability q) and
[0076] S43: Using the InfoNCE loss function to perform contrast loss calculation based on the two enhanced sub-graphs to generate the local contrast loss value.
[0077] Specifically, InfoNCE loss is used to maximize the positive samples ( and ), minimize the similarity with the negative sample (random subgraph), where the calculation formula of the local contrast loss value is:
[0078] Among them, sim(f i a ,f i b ) is the cosine similarity between nodes, and f is the node feature in the enhanced subgraph.
[0079] S44: Generate topological features according to the global graph, and use a cross entropy loss function to perform loss calculation based on the topological features to generate the global contrast loss value.
[0080] Specifically, input the global graph G t , predict the global graph G t Topological features (such as connectivity), optimized through cross-entropy loss: Where c is the number of categories.
[0081] In an embodiment of the present application, local subgraph sampling is performed for each node, for example, a random walk algorithm is used to extract a subnetwork containing a central node and its neighbors. Each subgraph is then subjected to dual data augmentation, for example, by removing edge connections with a probability of 25% and masking node attributes with a probability of 40%, generating two augmented subgraphs from different perspectives. The feature similarity of the two augmented subgraphs is calculated using the InfoNCE loss function, for example, using the augmented version of the same subgraph as a positive sample pair and the augmented versions of different subgraphs as negative sample pairs, forcing the model to learn local feature representations that are insensitive to structural changes. Simultaneously, topological features are extracted based on the global graph, for example, by generating node-level structural descriptors through a graph attention mechanism, and a cross-entropy loss function is used to constrain the preservation of the global topological structure, for example, by inputting topological features into a classifier to predict node types, ensuring that local contrastive learning does not destroy the overall graph structure. This dual loss mechanism achieves a balanced optimization between local topological sensitivity and global structural stability. The present application can effectively enhance the model's ability to capture local neighbor topological relationships in dynamic graph data. For example, in a social network dynamic relationship prediction scenario, this method can enable the model to accurately identify changes in local interaction patterns among user groups while maintaining the structural characteristics of the user's global social circle. In traffic flow prediction scenarios, this approach helps the model simultaneously perceive both local congestion propagation patterns and overall traffic flow distribution trends at road network nodes, avoiding over-focusing on local features while neglecting the broader road network state. Furthermore, the dual data augmentation mechanism reduces the model's reliance on specific edge connections or node attributes, maintaining robust feature extraction capabilities in IoT scenarios where some sensor data is missing.
[0082] A local subgraph is a subnetwork formed by randomly sampling k-hop neighboring nodes centered on a target node. This can be achieved using a breadth-first search algorithm, with a sampling range of, for example, 2-3 hops of neighboring nodes, to focus on the local topological structure of a specific node. Random edge deletion involves randomly removing edge connections from a subgraph with a preset probability. This can be achieved using a Bernoulli distribution to generate a masking matrix, with a removal ratio of, for example, 10%-30%, to enhance the model's robustness to structural perturbations. Random node attribute masking involves randomly setting the feature vectors of some nodes to zero. This can be achieved using a uniform distribution to select masking locations, with a masking ratio of, for example, 20%-50%, to force the model to learn the underlying associations between node attributes. The InfoNCE loss function is a contrastive learning loss function, implemented by calculating the difference in similarity between positive and negative sample pairs, and is used to measure and enhance feature consistency between subgraphs. Topological features are feature vectors that reflect the global graph structure. They can be generated using graph embedding algorithms, such as DeepWalk or Node2Vec, to characterize global association patterns between nodes. The cross entropy loss function is a classification loss function that can be implemented by comparing the difference between the predicted topological features and the true distribution to maintain the integrity of the global structure.
[0083] S5: Perform parameter adjustment and model training on the self-supervised graph convolutional network according to the local contrast loss value and the global contrast loss value to generate a target dynamic feature enhancement model.
[0084] Specifically, the total loss of the initial model is calculated based on the local contrast loss value and the global contrast loss value, the parameters of the self-supervised graph convolutional network are adjusted according to the total loss of the initial model, and the adjusted network is pre-trained to generate a pre-trained model, labeled graph data is obtained and the task loss is calculated based on it, and the pre-trained model is fine-tuned according to the task loss to generate a target dynamic feature enhancement model.
[0085] See also Figure 7 , Figure 7 A specific implementation of step S5 is shown, which is described in detail as follows:
[0086] S51: Calculate the total loss of the initial model according to the local contrast loss value and the global contrast loss value.
[0087] S52: Adjust the parameters of the self-supervised graph convolutional network according to the total loss of the initial model, and pre-train the adjusted self-supervised graph convolutional network to generate a pre-trained model.
[0088] S53: Obtain labeled graph data, and calculate task loss based on the labeled graph data.
[0089] Among them, the formula for calculating task loss is Where L is the set of labeled samples.
[0090] S54: Fine-tune the pre-trained model according to the task loss to generate the target dynamic feature enhancement model.
[0091] Specifically, in the pre-training phase, the initial model total loss is first constructed by weighted fusion of local contrast loss and global structural loss, where the local contrast loss focuses on maintaining the similarity between nodes and their neighbors, and the global structural loss maintains the stability of the overall graph topology. During the parameter adjustment process, the backpropagation algorithm is used to update the network weights. For example, the learning rate can be set to 1e-4, allowing the model to learn the common features of dynamic graph data under unsupervised conditions. After the pre-training is completed, labeled data is introduced to calculate the task loss. For example, the cross-entropy loss function is used in the social network user classification task, and the supervisory signal guides the model to adjust the feature extraction direction. In the fine-tuning phase, a dynamic weight allocation mechanism is adopted. For example, the fusion ratio of pre-training loss and task loss is automatically adjusted through trainable parameters to ensure that the model adapts to specific task requirements while retaining the advantages of self-supervised learning. This application achieves the consistency of the goals of self-supervised pre-training and supervised fine-tuning, solving the problem of model performance degradation caused by the conflict of two-stage training goals in traditional methods. By dynamically fusing local contrast loss, global structural loss and task loss, the model's ability to capture the spatiotemporal characteristics of dynamic graph data is enhanced. For example, in the traffic flow prediction task, it can simultaneously maintain the short-term interaction pattern and long-term evolution law between nodes. This solution also reduces the dependence on manually designed loss weights. For example, it automatically optimizes the loss fusion ratio through learnable parameters, thereby improving the generalization performance of the model in different application scenarios.
[0092] The total initial model loss refers to the composite loss indicator obtained by weighted summation of the local contrast loss value and the global contrast loss value. This can be achieved using a linear weighted approach, for example, by setting the weight coefficients of the two to 0.6 and 0.4. This design is used to balance the optimization goals of local feature similarity and global topology structure. The pre-trained model refers to the preliminary model parameters obtained through self-supervised learning. Specifically, the Adam optimizer can be used for parameter update. Its role is to establish basic feature representation capabilities under unlabeled data. Task loss refers to the supervised learning loss function designed for specific downstream tasks. For example, the cross-entropy loss function can be used for node classification tasks. This feature is used to align the general features obtained through self-supervised learning with specific task requirements.
[0093] See also Figure 8 , Figure 8 A specific implementation of step S54 is shown, which is described in detail as follows:
[0094] S541: Calculate the fusion weight of the task loss value, the local contrast loss value, and the global contrast loss value according to the local subgraph and the global graph to obtain a target dynamic fusion weight.
[0095] Specifically, the fusion weight is calculated by adaptively fusing feature maps of different scales. The specific calculation formula is: α t =softmax(W·Concat(H Local ,H global )), where α t is a dynamic weight that controls the fusion ratio of local and global features; H Local is the global graph, H global is a local subgraph.
[0096] S542: Calculate the total model loss according to the target dynamic fusion weight, the task loss value, the local contrast loss value and the global contrast loss value.
[0097] S543: Fine-tune the pre-trained model according to the total loss of the model to generate the target dynamic feature enhancement model.
[0098] Specifically, in the model fine-tuning stage, the adjacency matrix features of the local subgraph and the node embedding vector of the global graph are first extracted, and the interaction relationship matrix between the two is calculated through a multi-head attention layer. The interaction matrix is input into a two-layer fully connected network to generate an initial weight vector, which is normalized by the softmax function to obtain the dynamic fusion weight. The task loss, local contrast loss and global contrast loss are linearly weighted according to the dynamic weights to obtain the total model loss that reflects the characteristics of the current graph data. The gradient is calculated based on the total loss and backpropagated to the parameter space of the pre-trained model. Through iterative optimization, the model gradually adapts to the downstream task requirements while maintaining the self-supervised learning characteristics. This application implements a dynamic allocation mechanism for multi-task loss weights, which solves the problem of limited model generalization ability caused by fixed weights. Through adaptive weight adjustment of graph structure features, the optimization direction of self-supervised learning and task supervision is effectively balanced, avoiding the subjective bias introduced by manual parameter adjustment. This mechanism can improve the accuracy and robustness of the dynamic graph feature enhancement model in node classification tasks, especially in scenarios where the graph structure changes frequently, showing stronger adaptability.
[0099] Among them, the fusion weight refers to a dynamic coefficient that reflects the importance of different loss items. Specifically, it can be achieved by using the attention mechanism to calculate the correlation matrix between the local subgraph and the global graph, and generating normalized weight parameters through the gating network to adaptively adjust the balance relationship between multi-task losses.
[0100] S6: Acquire the dynamic image data to be processed, and output the target enhanced features based on the dynamic image data to be processed through the target dynamic feature enhancement model.
[0101] Specifically, after training and generating the target dynamic feature enhancement model, the target dynamic feature enhancement model is deployed. After the deployment is completed, the dynamic graph data to be processed can be obtained, and the target enhanced features can be output based on the dynamic graph data to be processed through the target dynamic feature enhancement model. Similarly, the prediction results of the corresponding tasks can also be output based on the dynamic graph data to be processed through the target dynamic feature enhancement model.
[0102] This application can be applied to various scenarios in the financial technology field, such as real-time anti-fraud and risk control, dynamic investment relationship network analysis, and high-frequency trading behavior modeling. In dynamic investment relationship network analysis, the pain point is the real-time changes in corporate equity and supply chain relationships, which impact risk assessment. Spatiotemporal feature aggregation can integrate historical equity change sequences to predict risk transmission among related companies. Global structural learning can predict the topological connectivity of the industrial chain (e.g., chain break risk). In this scenario, it can improve the accuracy of corporate credit risk prediction. This application can also be applied to various scenarios in the medical rehabilitation field, such as dynamic disease transmission prediction, multimodal medical knowledge graphs, and personalized health monitoring. In multimodal medical knowledge graphs, the pain point is the complex relationships between medical entities (e.g., drug-target-disease) and the continuous updating of new research. This application improves the success rate of drug repositioning recommendations through local contrastive learning to enhance subgraph structure perception (e.g., drug side effect communities), a dynamic adjacency matrix to incorporate the latest medical literature discoveries in real time, and a joint optimization framework that simultaneously learns the knowledge graph structure and clinical diagnosis tasks.
[0103] In an embodiment of the present application, original graph data is obtained, and the original graph data is preprocessed to obtain preprocessed graph data, wherein the preprocessed graph data includes a target node feature matrix and a target historical graph sequence; a dynamic adjacency matrix generation process is performed based on the target node feature matrix by a self-supervised graph convolutional network to obtain a target dynamic adjacency matrix; spatiotemporal feature aggregation process is performed based on the target dynamic adjacency matrix and the target historical graph sequence to obtain a global graph including spatiotemporal aggregation features; local neighbor contrast loss and global structure loss are calculated respectively according to the global graph to obtain local contrast loss values and global contrast loss values; parameter adjustment and model training are performed on the self-supervised graph convolutional network according to the local contrast loss values and the global contrast loss values to generate a target dynamic feature enhancement model; dynamic graph data to be processed is obtained, and target enhancement features are output based on the dynamic graph data to be processed by the target dynamic feature enhancement model. The embodiments of the present invention dynamically generate an adjacency matrix through a self-supervised graph convolutional network and combine it with spatiotemporal feature aggregation and contrastive learning mechanisms, effectively reducing dependence on labeled data and adapting to dynamically changing graph structures. At the same time, it improves the comprehensiveness of feature extraction through local and global contrast losses, which is conducive to reducing dependence on labeled data while improving the comprehensiveness and accuracy of feature extraction.
[0104] Please refer to Figure 9 , as a response to the above Figure 2 The present application provides an embodiment of a dynamic feature enhancement device based on a graph convolutional network. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0105] like Figure 9 As shown, the dynamic feature enhancement device based on graph convolutional network of this embodiment includes: a preprocessing module 71, an adjacency matrix generation module 72, a spatiotemporal feature aggregation module 73, a loss calculation module 74, a model training module 75 and a target feature generation module 76, wherein:
[0106] A preprocessing module 71 is used to obtain original graph data and preprocess the original graph data to obtain preprocessed graph data, wherein the preprocessed graph data includes a target node feature matrix and a target history graph sequence;
[0107] An adjacency matrix generation module 72 is configured to perform dynamic adjacency matrix generation processing based on the target node feature matrix through a self-supervised graph convolutional network to obtain a target dynamic adjacency matrix;
[0108] A spatiotemporal feature aggregation module 73 is configured to perform spatiotemporal feature aggregation processing based on the target dynamic adjacency matrix and the target historical graph sequence to obtain a global graph including spatiotemporal aggregation features;
[0109] A loss calculation module 74 is configured to perform local neighbor contrast loss calculation and global structure loss calculation according to the global graph to obtain a local contrast loss value and a global contrast loss value;
[0110] A model training module 75 is used to adjust parameters and perform model training on the self-supervised graph convolutional network according to the local contrast loss value and the global contrast loss value to generate a target dynamic feature enhancement model;
[0111] The target feature generation module 76 is used to obtain the dynamic image data to be processed, and output the target enhancement feature based on the dynamic image data to be processed through the target dynamic feature enhancement model.
[0112] Furthermore, the adjacency matrix generation module 72 includes:
[0113] A similarity calculation unit is used to calculate the cosine similarity between each two target node feature matrices through the self-supervised graph convolutional network to obtain an original similarity matrix;
[0114] A weighted calculation unit, configured to perform distance weighted calculation on the original similarity matrix to generate a weighted similarity matrix;
[0115] The screening unit is used to screen the weighted similarity matrix according to a preset threshold to obtain a target dynamic adjacency matrix.
[0116] Furthermore, the spatiotemporal feature aggregation module 73 includes:
[0117] A convolution unit is used to perform convolution processing on the node features at the current moment according to the target dynamic adjacency matrix to obtain the convolution result at the current moment, and to perform convolution processing based on the target historical graph sequence to obtain the historical convolution result;
[0118] An aggregation unit is used to aggregate the current convolution result and the historical convolution result to generate the global graph including the spatiotemporal aggregation features.
[0119] Furthermore, the loss calculation module 74 includes:
[0120] An employing unit is used for randomly sampling a local network in the global graph for each node to generate a local subgraph;
[0121] A subgraph enhancement unit, configured to perform random edge deletion and random node attribute masking on the local subgraph to generate two enhanced subgraphs;
[0122] A local contrast loss value generating unit, configured to perform contrast loss calculation based on the two enhanced sub-graphs using an InfoNCE loss function to generate the local contrast loss value;
[0123] A global contrast loss value generating unit is used to generate topological features according to the global graph, and use a cross entropy loss function to perform loss calculation based on the topological features to generate the global contrast loss value.
[0124] Furthermore, the model training module 75 includes:
[0125] an initial model total loss calculation unit, configured to calculate the initial model total loss according to the local contrast loss value and the global contrast loss value;
[0126] A pre-training unit, configured to adjust the parameters of the self-supervised graph convolutional network according to the total loss of the initial model, and pre-train the adjusted self-supervised graph convolutional network to generate a pre-trained model;
[0127] a task loss calculation unit, configured to obtain labeled graph data and calculate the task loss based on the labeled graph data;
[0128] A model fine-tuning unit is used to fine-tune the pre-trained model according to the task loss to generate the target dynamic feature enhancement model.
[0129] Furthermore, the model fine-tuning unit includes:
[0130] a weight calculation unit, configured to calculate a fusion weight of the task loss value, the local contrast loss value, and the global contrast loss value according to the local subgraph and the global graph, to obtain a target dynamic fusion weight;
[0131] A model total loss calculation unit, configured to calculate the model total loss based on the target dynamic fusion weight, the task loss value, the local contrast loss value, and the global contrast loss value;
[0132] A target dynamic feature enhancement model generation unit is used to fine-tune the pre-trained model according to the total loss of the model to generate the target dynamic feature enhancement model.
[0133] Furthermore, the pre-processing module 71 includes:
[0134] An original graph data acquisition unit, configured to acquire the original graph data, wherein the original graph data includes a node feature matrix and a historical graph sequence;
[0135] A data cleaning unit, configured to clean the raw data to remove nodes without connection relationships and obtain a cleaned node feature matrix;
[0136] A standardization unit, configured to standardize the cleaned node feature matrix of each node to obtain a target node feature matrix;
[0137] The cutting unit is used to cut the historical graph sequence into continuous segments arranged in chronological order to obtain the target historical graph sequence.
[0138] To solve the above technical problems, the present application also provides a computer device. Figure 10 , Figure 10 This is a basic structural block diagram of the computer device in this embodiment.
[0139] The computer device 8 includes a memory 81, a processor 82, and a network interface 83 that are interconnected through a system bus. It should be noted that Figure 10 Only a computer device 8 having three components, memory 81, processor 82, and network interface 83, is shown. However, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead. It should be understood by those skilled in the art that a computer device herein is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0140] Computer devices can be desktop computers, laptops, PDAs, cloud servers, etc. Computer devices can interact with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.
[0141] The memory 81 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 81 can be an internal storage unit of the computer device 8, such as the hard disk or memory of the computer device 8. In other embodiments, the memory 81 can also be an external storage device of the computer device 8, such as a plug-in hard disk equipped on the computer device 8, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. Of course, the memory 81 can also include both the internal storage unit of the computer device 8 and its external storage device. In this embodiment, the memory 81 is generally used to store the operating system and various application software installed on the computer device 8, such as the program code of the dynamic feature enhancement method based on the graph convolutional network. In addition, the memory 81 can also be used to temporarily store various types of data that have been output or are to be output.
[0142] In some embodiments, the processor 82 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 82 is generally used to control the overall operation of the computer device 8. In this embodiment, the processor 82 is used to run the program code stored in the memory 81 or process data, such as running the program code of the dynamic feature enhancement method based on the graph convolutional network to implement various embodiments of the dynamic feature enhancement method based on the graph convolutional network.
[0143] The network interface 83 may include a wireless network interface or a wired network interface. The network interface 83 is generally used to establish a communication connection between the computer device 8 and other electronic devices.
[0144] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores a computer program, and the computer program can be executed by at least one processor to enable the at least one processor to perform the steps of a dynamic feature enhancement method based on a graph convolutional network as described above.
[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of each embodiment of the present application.
[0146] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.
Claims
1. A dynamic feature enhancement method based on graph convolutional network, characterized in that: include: Acquire original graph data, and preprocess the original graph data to obtain preprocessed graph data, wherein the preprocessed graph data includes a target node feature matrix and a target history graph sequence; Performing dynamic adjacency matrix generation processing based on the target node feature matrix through a self-supervised graph convolutional network to obtain a target dynamic adjacency matrix; Performing spatiotemporal feature aggregation processing based on the target dynamic adjacency matrix and the target historical graph sequence to obtain a global graph including spatiotemporal aggregation features; Performing local neighbor contrast loss calculation and global structure loss calculation according to the global graph to obtain local contrast loss value and global contrast loss value; Performing parameter adjustment and model training on the self-supervised graph convolutional network according to the local contrast loss value and the global contrast loss value to generate a target dynamic feature enhancement model; The dynamic image data to be processed is acquired, and a target enhanced feature is output based on the dynamic image data to be processed by a target dynamic feature enhancement model.
2. The dynamic feature enhancement method based on graph convolutional network according to claim 1, characterized in that The process of generating a dynamic adjacency matrix based on the target node feature matrix by a self-supervised graph convolutional network to obtain a target dynamic adjacency matrix includes: Calculating the cosine similarity between each two target node feature matrices through the self-supervised graph convolutional network to obtain an original similarity matrix; Performing distance weighted calculation on the original similarity matrix to generate a weighted similarity matrix; The weighted similarity matrix is screened according to a preset threshold to obtain a target dynamic adjacency matrix.
3. The dynamic feature enhancement method based on graph convolutional network according to claim 1, characterized in that The performing spatiotemporal feature aggregation processing based on the target dynamic adjacency matrix and the target historical graph sequence to obtain a global graph including spatiotemporal aggregation features includes: Performing convolution processing on the node features at the current moment according to the target dynamic adjacency matrix to obtain a convolution result at the current moment, and performing convolution processing based on the target historical graph sequence to obtain a historical convolution result; The current moment convolution result and the historical convolution result are aggregated to generate the global graph including the spatiotemporal aggregation features.
4. The dynamic feature enhancement method based on graph convolutional network according to claim 1, characterized in that The performing of local neighbor contrast loss calculation and global structure loss calculation according to the global graph to obtain a local contrast loss value and a global contrast loss value includes: For each node, a local network is randomly sampled in the global graph to generate a local subgraph; Performing random edge deletion and random node attribute masking on the local subgraph to generate two enhanced subgraphs; Using the InfoNCE loss function to perform contrast loss calculation based on the two enhanced sub-graphs to generate the local contrast loss value; A topological feature is generated according to the global graph, and a cross entropy loss function is used to perform loss calculation based on the topological feature to generate the global contrast loss value.
5. The dynamic feature enhancement method based on graph convolutional network according to claim 4 is characterized in that The step of adjusting parameters and training the model of the self-supervised graph convolutional network according to the local contrast loss value and the global contrast loss value to generate a target dynamic feature enhancement model includes: Calculating the total loss of the initial model according to the local contrast loss value and the global contrast loss value; Adjusting the parameters of the self-supervised graph convolutional network according to the total loss of the initial model, and pre-training the adjusted self-supervised graph convolutional network to generate a pre-trained model; Obtaining labeled graph data, and calculating task loss based on the labeled graph data; The pre-trained model is fine-tuned according to the task loss to generate the target dynamic feature enhancement model.
6. The dynamic feature enhancement method based on graph convolutional network according to claim 5, characterized in that Fine-tuning the pre-trained model according to the task loss to generate the target dynamic feature enhancement model includes: Calculating a fusion weight of the task loss value, the local contrast loss value, and the global contrast loss value according to the local subgraph and the global graph to obtain a target dynamic fusion weight; Calculate the total model loss according to the target dynamic fusion weight, the task loss value, the local contrast loss value and the global contrast loss value; The pre-trained model is fine-tuned according to the total loss of the model to generate the target dynamic feature enhancement model.
7. The dynamic feature enhancement method based on graph convolutional network according to any one of claims 1 to 6, characterized in that: The obtaining of original image data and preprocessing the original image data to obtain preprocessed image data includes: Acquire the original graph data, wherein the original graph data includes a node feature matrix and a historical graph sequence; Performing data cleaning on the original data to remove nodes without connection relationships, and obtaining a cleaned node feature matrix; Normalizing the cleaned node feature matrix of each node to obtain a target node feature matrix; The historical graph sequence is cut into continuous segments arranged in chronological order to obtain the target historical graph sequence.
8. A dynamic feature enhancement device based on graph convolutional network, characterized in that: include: A preprocessing module, configured to obtain original graph data and preprocess the original graph data to obtain preprocessed graph data, wherein the preprocessed graph data includes a target node feature matrix and a target history graph sequence; An adjacency matrix generation module is used to perform dynamic adjacency matrix generation processing based on the target node feature matrix through a self-supervised graph convolutional network to obtain a target dynamic adjacency matrix; A spatiotemporal feature aggregation module, configured to perform spatiotemporal feature aggregation processing based on the target dynamic adjacency matrix and the target historical graph sequence to obtain a global graph including spatiotemporal aggregation features; A loss calculation module is used to perform local neighbor contrast loss calculation and global structure loss calculation according to the global graph to obtain local contrast loss value and global contrast loss value; A model training module, configured to perform parameter adjustment and model training on the self-supervised graph convolutional network according to the local contrast loss value and the global contrast loss value, to generate a target dynamic feature enhancement model; The target feature generation module is used to obtain the dynamic image data to be processed and output the target enhancement feature based on the dynamic image data to be processed through the target dynamic feature enhancement model.
9. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the dynamic feature enhancement method based on the graph convolutional network as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the dynamic feature enhancement method based on a graph convolutional network according to any one of claims 1 to 7.
Citation Information
Cited By
Machine abnormal sound detection method based on feature enhancement dynamic graph convolution
CN121483303A
Machine abnormal sound detection method based on feature enhancement dynamic graph convolution
CN121483303B