A social network node classification method based on multi-scale fusion

By employing a multi-scale fusion-based social network node classification method, which utilizes motif saliency detection and multi-scale enhanced adjacency matrix generation, the problems of scale uniformity and insufficient information fusion in social network node classification are solved, achieving higher node classification accuracy and complex signal representation capabilities.

CN121412776BActive Publication Date: 2026-03-27CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing methods for classifying nodes in social networks suffer from problems such as limited scale and insufficient information fusion, resulting in inaccurate node classification and affecting the accuracy of subsequent tasks.

Method used

A multi-scale fusion-based social network node classification method is adopted. The node importance score is calculated through motif saliency detection to generate social network graphs at different scales. A multi-scale enhanced adjacency matrix is ​​constructed, and the adjacency matrix is ​​decomposed into trend term features and periodic term features for fusion. Graph neural networks are used for feature extraction and classification.

Benefits of technology

It improves the accuracy of node classification, enhances the model's ability to represent complex signals, ensures that the output is neither distorted in detail nor loses sight of the big picture, and improves the performance of downstream tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121412776B_ABST
    Figure CN121412776B_ABST
Patent Text Reader

Abstract

The application discloses a social network node classification method based on multi-scale fusion and belongs to the technical field of social networks. The method comprises the following steps: obtaining an initial social network graph G (0) , presetting the scale number and several model structures of the generated social network graph; constructing an improved classification network, including a multi-scale network graph generation unit, a multi-scale enhanced adjacency matrix generation unit, a feature extraction and fusion unit and a classifier; constructing a loss function Loss; training the improved classification network by using G (0) to minimize the Loss, obtaining a multi-scale fusion social network node classification model, and classifying nodes in a to-be-classified network graph. The application adaptively generates a multi-scale social network graph based on the multi-scale network graph generation unit, overcomes the feature distortion problem caused by traditional model extraction and the limitation of single-scale analysis, innovates a multi-scale enhanced adjacency matrix generation mechanism, realizes cross-scale feature capture, and thus improves the accuracy of social network node classification.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of social networks, and particularly relates to a social network node classification method based on multi-scale fusion. BACKGROUND

[0002] A social network is a network of relationships between individuals, i.e. people, organizations or computer systems. These individuals form social networks by interacting, sharing information and establishing connections. It is a professional graph structure formed based on graph theory, where nodes = social entities (people, organizations, user accounts, etc.), edges = social interaction relationships (friends, followers, calls, cooperation, @ mentions, message exchanges, etc.). As long as "nodes represent social subjects and edges represent certain social relationships", the entire graph is collectively referred to as a social network. With the popularity of the Internet, social networks such as microblogs and Facebook have become important platforms for information dissemination and social interaction. Traditional node classification methods face the following technical bottlenecks:

[0003] (1) Single scale problem: Graph convolutional networks (Defferrard, Michal, X. Bresson, and P. Vandergheynst. "Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering." (2016).) proposed by Defferrard et al. usually rely on fixed, local neighborhood aggregation schemes (such as first-order neighbors), which results in a single analysis scale. Existing methods focus too much on the instantaneous interaction of nodes with their direct neighbors, making it difficult to capture the indirect influence of user behavior across several hops.

[0004] (2) Insufficient information fusion: Traditional methods often only use a single adjacency matrix, ignoring the rich high-order relationships (such as k-hop connectivity, motif structure) and semantic associations (such as common attributes, behavior similarity) between nodes, and lack effective cross-scale information interaction mechanisms.

[0005] The above problems can lead to inaccurate user node classification, resulting in incorrect class labels being assigned to nodes, which can cause subsequent message transmission errors, training target contamination and other defects, and affect the accuracy of downstream tasks.

[0006] Glossary:

[0007] Motif is defined as a certain interconnection pattern found in complex networks with a significantly higher number of occurrences than in random networks. Therefore, it is a subgraph structure that repeatedly appears in the network with a small number of nodes (usually 3-5). The key to detecting its significance lies in comparing the frequency of the motif in the real network with a set of randomized networks that maintain certain network properties (such as degree distribution). Motif significance detection is a statistical method for identifying local structural patterns that appear abnormally frequently in networks, and is an important tool for understanding network organization and function. Common methods for motif significance detection include (1) Z-score (standardized score), the higher the Z-score, the more significant the motif; (2) P-value (significance test), indicating the probability that the frequency of the motif in the random network is not lower than that in the real network.

[0008] Graph Neural Network (GNN) is a deep learning algorithm framework for processing graph structure data, which extracts node, edge and graph features to complete classification, prediction and generation tasks.

[0009] Graph Convolutional Networks (GCN) is a class of neural networks specifically designed for processing graph structure data. By stacking multiple graph convolution layers to learn node feature representation, it is a feature extraction network that can achieve graph classification, node classification, social network link prediction and other tasks by combining different classifiers. SUMMARY

[0010] The purpose of the present application is to provide a social network node classification method based on multi-scale fusion, which solves the problems of single scale, insufficient information fusion and feature distortion, and realizes accurate classification of social network nodes.

[0011] To achieve the above purpose, the technical scheme adopted by the present application is as follows: a social network node classification method based on multi-scale fusion, comprising the following steps:

[0012] S1, obtaining an initial social network graph G (0) =(V (0) ,E (0) ), wherein V (0) is a set of user nodes in the social network, E (0) is a set of relationship edges between user nodes, G (0) has a user node feature matrix X (0) , an adjacency matrix A (0) , and a user node label set Y (0) ;

[0013] S2, preset a scale number S of generating a social network graph, and mark the social network graph of scale s-1 and scale s as G (s-1) 、 (s) , 1≤s≤S, preset I1 kinds of motif structures, the i-th motif is marked as M i , 1≤i≤I1;

[0014] S3, construct an improved classification network, including a multi-scale network graph generation unit, a multi-scale enhanced adjacency matrix generation unit, a feature extraction and fusion unit, and a classifier;

[0015] The multi-scale network graph generation unit is configured to calculate the importance score of each node in G (s-1) based on motif saliency detection, select k% user nodes from G (s-1) to generate a social network graph G (s) of scale s, G (s) = (V (s) , E (s) ), and generate a user node feature matrix and an adjacency matrix of G (s) , wherein V (s) , E (s) are a user node set and a user relationship edge set of scale s, respectively;

[0016] The multi-scale enhanced adjacency matrix generation unit includes a preprocessing unit, a feature extraction unit, and a feature fusion unit;

[0017] The preprocessing unit is configured to construct a network graph set G (0) from G (1) ~G (S) , G all = {G all , G (0) , …, G (1)}, and mark the network graph of scale l in G (S) as G all , 0≤l≤S;

[0018] The feature extraction unit is configured to extract a periodic feature C (l) and a trend feature T (l) from the adjacency matrix A (l) of G (l) ;

[0019] The feature fusion unit is configured to fuse C (l) from scale 0 to scale S, and sequentially output the fused periodic feature C ~ from scale 1 to scale S, and fuse T (l) from scale S to scale 0, and sequentially output the fused trend feature T (0) from scale S-1 to scale 0. and generating an enhanced adjacency matrix of scale l based on the fused periodic term feature and the fused trend term feature

[0020] The feature extraction and fusion unit is configured to extract and fuse features of G (0) G (S) using GNNs respectively to obtain fused features Z final

[0021] The classifier is configured to input Z final and output a predicted label set V (0) for each user node in G

[0022] S4, constructing a loss function Loss of the improved classification network, which is a cross-entropy loss between Y and ;

[0023] S5, inputting G (0) into the improved classification network to train the improved classification network to convergence by minimizing Loss, to obtain a multi-scale fused social network node classification model for classifying user nodes in a to-be-classified social network graph.

[0024] Preferably, the multi-scale network graph generation unit comprises a motif saliency detection unit, a node selection unit and a single-scale network graph generation unit.

[0025] The motif saliency detection unit is configured to perform saliency detection on each M (s-1) in G i and output a saliency score Significance(M i ) of M i ;

[0026] The node selection unit calculates an importance score of each node in G (s-1) and ranks the nodes in descending order of the importance scores, and then selects the top k% of the nodes as candidate nodes, wherein the importance score s(v) of any node v in G (s-1) is calculated according to the following formula:

[0027] ,

[0028] wherein, is a weight factor of M i , I is an indicator function, which is 1 if node v participates in motif M i , and 0 otherwise, and Significance(M i ) is the saliency score of motif M i ;

[0029] ​​​​The single-scale network graph generating unit is configured to construct a social network graph G of scale s according to relationships between candidate nodes (s) =(V (s) ,E (s) ), where V (s) , E (s) are a user node set and a user relationship edge set of scale s, respectively.

[0030] Preferably, I1=4, M1~M4 correspond to a triangle, a star, a chain and a ring, respectively, and the significance score Significance(M i ) of the motif M i is calculated according to the following formula:

[0031] ,

[0032] wherein, is the number of occurrences of M i in the observed network, is the expected number of occurrences of M i in the random network, is the standard deviation of the number of occurrences of M i in the random network, is the weight of M i based on the relationship of the user node.

[0033] Preferably, the feature extraction unit extracts the periodic term feature C (l) and the trend term feature T (l) of G (l) by the method including Sa1~Sa2:

[0034] Sa1, the trend term feature T (l) is solved according to the following function;

[0035] ,

[0036] wherein, is T (l) that satisfies the minimum value of the argmin function, is the L1 norm, is the L2 norm, is the conjugate matrix of T (l) , is the matrix trace operation, T is the transpose operation, λ1 is the low-rank constraint coefficient, λ2 is the smooth constraint coefficient, λ3 is the sparse constraint coefficient, L f is the graph Laplacian matrix;

[0037] Sa2, the noise term feature ε(l) is preset, and ε(l) obeys the normal distribution with a mean of 0 and a variance of σ².

[0038] Sa3, calculate the characteristic of the periodic term C (l) C (l) =A (l) -T (l) -ε (l) .

[0039] Preferably, in the feature fusion unit, the fusion periodic term feature at scale l is preferred. Features of the fusion trend term at scale l Calculate according to the following formulas respectively:

[0040] ,

[0041] ,

[0042] ,

[0043] ,

[0044] In the formula, α (l) Here are the characteristic coefficients of the periodic term, and Upsample(∙) is the upsampling operation. Let σ(∙) be the fusion periodic term feature at scale l⁻¹, σ(∙) be the sigmoid activation function, and vec(∙) be the vectorization function. b is the first weight vector. α For the first bias term, β (l) Here are the characteristic coefficients of the trend term, and Downsample(∙) is the downsampling operation. For the fusion trend term features at scale l+1, b is the second weight vector. β This is the second bias term.

[0045] As a preferred method, the method for generating the enhanced adjacency matrix in the feature fusion unit is as follows:

[0046] Let the enhanced adjacency matrix of scale 0 The enhanced adjacency matrix of other scales l Calculate according to the following formula;

[0047] ,

[0048] In the formula, γ and δ are preset values. , The weight.

[0049] Preferably, the feature extraction and fusion unit includes a GNN network and a fusion layer;

[0050] The GNN network is used as input G (l) X(l) and , G (l) is extracted to obtain the corresponding output feature ;

[0051] The fusion layer is used to generate the fusion feature Z according to the following formula final ;

[0052] ,

[0053] In the formula, γ l is the weight of G (l) .

[0054] As a preferred, the method for classifying nodes in the network graph to be classified in S5 includes S51-S53 using the multi-scale fusion social network node classification model.

[0055] S51, the network graph to be classified is obtained as the initial network graph G (0) to be classified, the user node feature matrix of G (0) is X (0) , the adjacency matrix is A (0) ;

[0056] S52, input G (0) into the multi-scale fusion social network node classification model, and obtain the network graphs G (1) ~G (S) of scales 1~S, the corresponding adjacency matrices A (1) ~A (S) , and the user node feature matrices X (1) ~X (S) , generate the corresponding enhanced adjacency matrix A (l) through the multi-scale enhanced adjacency matrix generation unit , 0≤l≤S;

[0057] S53, generate the fusion feature Z (l) and through the feature extraction and fusion unit, and then output the predicted label set of the user nodes in G final through the classifier. (0)

[0058] The idea of the application is:

[0059] First, according to the characteristics of the data set, several body structures are preset, and different scale network graphs are generated by the multi-scale network graph generation unit, taking scale s as an example, the saliency scores of several bodies are calculated first, and then G (s-1) ​The importance score of each node is calculated, and the nodes are then sorted in descending order of importance score. Only the top k% of nodes are selected as G. (s) User node V (s) Then according to V (s) The relationships between user nodes are used to construct the set of edges E representing the relationships between user nodes. (s) This will allow us to obtain the social network graph G at scale s. (s) Given G (s) You can get G (s) The corresponding user node feature matrix X (s) and adjacency matrix A (s) Because of G (s) Both are based on G (s-1) Construct, when s=1, G (s-1) For the initial social network graph G (0) And from G (0) ~G (S) The number of user nodes decreases sequentially. Assume G at scale 0... (0) If there are N0 nodes, then G (1) By G (0) High importance score It consists of user nodes, G (2) By G (1) High importance score The network consists of several user nodes, and so on, with scales 1 through S gradually becoming coarser, resulting in S network graphs of different coarse granularities / scales.

[0060] Second, obtain G (1) ~G (S) Afterwards, with G (0) Together they constitute G all G all ={G (0) G (1) ,…,G (S)}, for ease of subsequent description and G (s) To distinguish (1≤s≤S), l is used as the variable here, and G is unified. (l) The adjacency matrix is ​​A (l) The user node feature matrix is ​​X (l) , 0≤l≤S.

[0061] Third, use multi-scale enhanced adjacency matrix generation units for each scale of X. (l) Enhancement is performed to obtain the corresponding enhanced adjacency matrix. .

[0062] (1) First, for G (l) Adjacency matrix A (l) Deconstruct the feature, breaking it down into a trend feature T that includes long-term characteristics. (l) (Characteristics of G)(l) the stable structure of G (l) and the periodic feature C (l) characterizing the oscillation mode and local fluctuation of G (l) , is solved by T (l) , and C (l) is calculated by C (l) .

[0063] (2) T (l) is solved by optimizing the function based on the function (l) , which contains the reconstruction error, low-rank constraint, smooth constraint and sparse constraint, to ensure that T (l) can capture the stable background structure of G (l) , and then C (l) is obtained by removing T (l) and noise features according to the formula C (l) .

[0064] (3) Then the trend item features and periodic item features of different scales are fused. The periodic item features are fused from scale 0 to scale S, that is, from fine scale to coarse scale, the purpose of which is to realize step-by-step refinement and enhancement of detailed information, and to build a robust feature pyramid, which has the advantages of preserving high-frequency details and avoiding premature loss of information. The trend item is fused from scale S to scale 0, that is, from coarse scale to fine scale, the purpose of which is to provide global context and macro guidance for local features, realize precise semantic alignment, and the advantage of which is to realize local calibration under the guidance of context, and then is fused again to obtain , the purpose of this fusion is to continuously refine the detailed information from bottom to top and provide the basis for high-level decision-making; the global context continuously guides from top to bottom, which provides the direction for local judgment, and the advantage is that it can enhance the model's representation ability for complex signals (such as social networks), so that its output is neither distorted by details nor lost in the general situation, thereby achieving excellent performance in various downstream tasks (such as node classification). And does not contain noise items, which can effectively denoise.

[0065] Fourth, given the user node feature matrix X (l) and the enhanced adjacency matrix of each network graph G (l) , the input of the GNN network is obtained, and the input of the GNN network has two items, which are X (l) and , respectively. The X (l) and of G (l) are input into the GNN network to obtain the output, a total of S+1 outputs are obtained, and then the fusion feature Z finalThe calculation formula of Z final .

[0066] Fifth, Z final After using the existing classifier to classify, a set of predicted labels is obtained During training, the parameters of the classification network are adjusted and improved by minimizing the cross-entropy loss of Y and , and a multi-scale fusion social network node classification model is obtained.

[0067] Compared with the prior art, the present application has the following advantages:

[0068] (1) A multi-scale network graph generation unit is constructed, the saliency score of the motif is calculated based on motif saliency detection, the importance score of each node in G (s-1) is calculated based on the saliency score, and the next scale social network graph G (s-1) is generated according to the importance score of the k% user nodes. (s) This motif saliency detection can detect the saliency of the preset several motifs and evaluate the importance of different local substructures in the current network, abandoning the rigid mode of the traditional fixed motif extractor. The node importance score is calculated based on the saliency score, guiding the multi-scale network graph generation unit to retain important user nodes to regenerate the scale 1~scale S social network graph. This method of generating a social network graph based on motif saliency score and node importance score not only can adapt to complex and variable network structure, extract the essential features of the network structure, reduce the distortion of feature representation, but also can improve the representation quality of multi-scale features, laying a solid foundation for subsequent node classification tasks.

[0069] (2) A multi-scale enhanced adjacency matrix generation unit is constructed, which is used for signal decoupling and directional enhancement of the adjacency matrix A (l) of the network graph G (l) of scale l. The mixed network connection information is first decomposed into components representing different physical meanings: trend feature T (l) and periodic feature C (l) , and then optimized according to their respective characteristics to provide higher quality and more discriminative inputs for subsequent feature extraction and fusion. The trend feature is fused from fine to coarse, which can retain high-frequency details and avoid information loss too early. The periodic feature is fused from coarse to fine, which can realize local calibration under the guidance of context. The weighted fusion of the fusion trend feature and the fusion periodic feature of each scale makes the micro details and macro background interact fully and semantically, solves the problem of insufficient information fusion, and generates discriminative node representation, further improving the accuracy of node classification.

[0070] ​(3) Based on the improved classification network of the application, the model can finally enhance the representation ability of complex signals (such as social networks), so that the output is neither distorted in details nor lost in the general situation, thereby achieving the advantage of excellent performance in node classification tasks. BRIEF DESCRIPTION OF DRAWINGS

[0071] Figure 1 is a flowchart of the application;

[0072] Figure 2 is a structure diagram of the improved classification network of the application. DETAILED DESCRIPTION

[0073] The application will be further described below in conjunction with examples and drawings.

[0074] Example 1: see Figure 1 and Figure 2 A social network node classification method based on multi-scale fusion includes the following steps:

[0075] S1, obtaining an initial social network graph G (0) =(V (0) ,E (0) ), wherein V (0) is a set of user nodes in the social network, E (0) is a set of relationship edges between user nodes, G (0) has a user node feature matrix X (0) , an adjacency matrix A (0) , and a set of user node labels Y (0) ;

[0076] S2, presetting the number of scales S of the generated social network graph, and marking the social network graph of scale s-1 and scale s as G (s-1) , G (s) , respectively, 1≤s≤S, presetting I1 kinds of motif structures, and marking the i-th motif as M i , 1≤i≤I1;

[0077] S3, constructing an improved classification network, including a multi-scale network graph generation unit, a multi-scale enhanced adjacency matrix generation unit, a feature extraction and fusion unit, and a classifier;

[0078] The multi-scale network graph generation unit is used for calculating the importance score of each node in G (s-1) based on motif saliency detection, selecting k% user nodes from G (s-1) to generate a social network graph G (s) of scale s, G (s) =(V (s) ,E (s) ), and generating G (s)The user node feature matrix and adjacency matrix, the V (s) E (s) These are the set of user nodes and the set of user relationship edges, respectively, at scale s.

[0079] The multi-scale enhanced adjacency matrix generation unit includes a preprocessing unit, a feature extraction unit, and a feature fusion unit;

[0080] The preprocessing unit is used to process G (0) G (1) ~G (S) The network graph set G all G all ={G (0) G (1) ,…,G (S)}, and G all The network graph of mesoscale l is labeled G (l) , 0≤l≤S;

[0081] The feature extraction unit is used to extract features from G (l) Adjacency matrix A (l) Extracting periodic term features C (l) and trend feature T (l) ;

[0082] The feature fusion unit is used for C (l) The fusion proceeds from scale 0 to scale S, and the fusion periodic term features are output sequentially from scale 1 to scale S. ~ , for T (l) The fusion proceeds from scale S to scale 0, and the fusion trend term features are output sequentially from scale S-1 to scale 0. ~ An enhanced adjacency matrix with scale l is generated based on the fusion periodic term features and the fusion trend term features. ;

[0083] The feature extraction and fusion unit is used for G (0) ~G (S) Feature extraction was performed using GNNs separately and then fused into a fused feature Z. final ;

[0084] The classifier is used as input Z. final Output V (0) Predicted label set of user nodes ;

[0085] S4, construct the loss function Loss for the improved classification network, where Y and Cross-entropy loss;

[0086] S5, G (0)The improved classification network is input and trained to minimize the loss until convergence, resulting in a multi-scale fusion social network node classification model, which is used for user node classification in the social network graph to be classified.

[0087] Example 2: See Figure 1 and Figure 2 Furthermore, based on Example 1, the multi-scale network graph generation unit includes a phantom saliency detection unit, a node selection unit, and a single-scale network graph generation unit.

[0088] The phantom salience detection unit is used for G (s-1) Each M i Perform a significance test and output M. i Significance score (M) i );

[0089] The node selection unit calculates G. (s-1) Each node is assigned an importance score and sorted in descending order. The top k% of user nodes corresponding to these importance scores are then selected as candidate nodes. G (s-1) The importance score s(v) of any node v is calculated according to the following formula:

[0090] ,

[0091] In the formula, For M i The weighting factor, I is the indicator function, and node v participates in the module M. i The value is 1 if it is true and 0 otherwise. Significance(M) i ) is the phantom M i The significance score;

[0092] The single-scale network graph generation unit is used to construct a social network graph G of scale s based on the relationships between candidate nodes. (s) =(V (s) E (s) ), where V (s) E (s) These represent the set of user nodes and the set of user relationship edges, respectively, at scale s.

[0093] I1=4, M1~M4 correspond to four types of phantoms: triangular, star-shaped, chain-shaped, and ring-shaped, respectively. Phantom M i Significance score (M) i Calculate according to the following formula:

[0094] ,

[0095] In the formula, For Mi the number of occurrences in the observed network, for the motif M i the number of expected occurrences in the random network, for the motif M in the random network i the standard deviation of the number of occurrences, the weight of M based on the preset relationship of the user nodes i .

[0096] the feature extraction unit extracts G (l) the periodic feature C (l) and the trend feature T (l) The method comprises Sa1-Sa2:

[0097] Sa1, the trend feature T (l) is solved according to the following function:

[0098] ,

[0099] In the formula, is T (l) that satisfies the minimum value of the argmin function, is the L1 norm, is the L2 norm, is the conjugate matrix of T (l) , is the matrix trace operation, T is the transpose operation, λ1 is the low-rank constraint coefficient, λ2 is the smoothing constraint coefficient, λ3 is the sparse constraint coefficient, L f is the graph Laplacian matrix;

[0100] Sa2, preset noise feature ε(l), ε(l) obeys normal distribution with mean 0 and variance σ²;

[0101] Sa3, calculate the periodic feature C (l) , C (l) =A (l) -T (l) -ε (l) .

[0102] In the feature fusion unit, the fusion periodic feature of scale l , the fusion trend feature of scale l are calculated according to the following formula respectively:

[0103] ,

[0104] ,

[0105] ,

[0106] ,

[0107] In the formula, α (l) Here are the characteristic coefficients of the periodic term, and Upsample(∙) is the upsampling operation. Let σ(∙) be the fusion periodic term feature at scale l⁻¹, σ(∙) be the sigmoid activation function, and vec(∙) be the vectorization function. b is the first weight vector. α For the first bias term, β (l) Here are the characteristic coefficients of the trend term, and Downsample(∙) is the downsampling operation. The fusion trend term features at scale l+1 b is the second weight vector. β This is the second bias term.

[0108] In the feature fusion unit, the method for generating the enhanced adjacency matrix is ​​as follows:

[0109] Let the enhanced adjacency matrix of scale 0 The enhanced adjacency matrix of other scales l Calculate according to the following formula;

[0110] ,

[0111] In the formula, γ and δ are preset values. , The weight.

[0112] The feature extraction and fusion unit includes a GNN network and a fusion layer;

[0113] The GNN network is used as input G (l) X (l) and , for G (l) Feature extraction is performed to obtain the corresponding output features. ;

[0114] The fusion layer is used to generate fusion feature Z according to the following formula. final ;

[0115] ,

[0116] In the formula, γ l For G (l) The weight.

[0117] In S5, the methods for classifying nodes in the network graph to be classified using a multi-scale fusion social network node classification model include S51~S53;

[0118] S51, Obtain the network graph to be classified as the initial network graph G'. (0), G’ (0) The user node feature matrix of G (0) is X (0) , and the adjacency matrix is A (0)

[0119] S52, input G (1) into the multi-scale fusion social network node classification model, and obtain network graphs G (S) ~G (1) and corresponding adjacency matrices A (S) ~A (1) , user node feature matrices X (S) ~X (l) , enhanced adjacency matrices A , 0≤l≤S

[0120] S53, generate fusion features Z (l) by inputting X and A final into the feature extraction fusion unit, and output the predicted label set of the user nodes in G (0) by the classifier.

[0121] Embodiment 3: refer to Figure 1 and Figure 2 , on the basis of embodiment 1, in order to more intuitively express the classification effect of the application, the application method and the GCN method are compared in the embodiment.

[0122] Dataset: the MS dataset is used, which is an academic cooperation network in the field of computer science. The user nodes represent authors, and the edges represent cooperation relationships. If the authors have co-authored a paper, the two authors are connected by an edge. In the dataset, the features of each node are the keywords in the author's paper, and the user node feature matrix X (0) can be generated based on the node features. Each element in X (0) represents the features of the corresponding user node. The adjacency matrix A (0) can be constructed based on the relationship between the nodes and the edges. In the embodiment, A (0) only represents the binary relationship of “whether co-authored”. The MS dataset includes 18333 nodes, 81894 edges, and 6805-dimensional features for each node. The authors are divided into 15 categories according to their research fields, and the category label represents the most active research field of the author.

[0123] Experimental grouping: the experimental group is the application, and the control group is the GCN method. The GCN method uses a GCN network and a softmax classifier.

[0124] In the application: ​

[0125] Regarding S1, directly set the MS dataset as G (0) , generate G (0) 's user node feature matrix X (0) , adjacency matrix A (0) , and user node label set Y (0) .

[0126] Regarding S2, the scale number S of the generated social network graph is preset to be 4, and I1=4 kinds of motif structures are preset, which are triangle, star, chain and ring.

[0127] The triangle structure represents a stable and close small team of scientific research cooperation, such as a long-term fixed master-apprentice team or a cross-institutional core research group.

[0128] The star structure includes a center node and a plurality of leaf nodes connected to the center node. In the social network, the center node has a high direct influence and information distribution capability, and can be classified as an “influential person”, a “key hub” or an “authority page”. The leaf nodes are more likely to be ordinary followers or information receivers. Based on the MS dataset of the embodiment, the star motif represents a “mentor-student” type team (the center node is a senior mentor) or a “project leader-collaborator” type team, which is a typical hierarchical knowledge transmission and resource coordination mode.

[0129] The chain structure includes a plurality of nodes in the middle of a plurality of long chains, which can be important information intermediaries or bridges. Such nodes can be classified as “coordinators” or “potential information bottlenecks”. The chain motif represents relay transmission of knowledge, such as collaboration between scholars A and B, and B and C, forming an indirect influence chain A→B→C, or a weak connection bridge across institutions and fields.

[0130] The ring structure is a kind of equal and circular dependence or information flow relationship. For example, a discussion group without an absolute core or a literature network with circular references. The ring motif represents an equal and circular collaboration relationship, such as a ring-shaped cooperation alliance relationship formed between multiple laboratories or scholars.

[0131] Regarding the multi-scale network graph generation unit in S3: the importance score of the node needs to be calculated, and the M i significance score Significance(M i ) and weight of each motif need to be known. The significance score Significance(M i ) is obtained based on z-score statistical detection. is the weight based on domain knowledge, which is specified by domain experts in advance, for example: the triangle motif represents a stable and close small scientific research collaboration group, and a higher weight is given, such as 2.0; the star motif is a typical hierarchical knowledge transmission and resource coordination mode, and a higher weight is given, also set to 2.0; the chain motif usually has weak relationship strength, and a general weight can be given, such as 1.0; the ring motif represents an equal and circulating collaboration relationship, and a general weight can be given, such as 1.0. According to Significance (M i ) and , the importance score of each user node in G (s-1) can be calculated, and the k% user nodes with high scores are selected to construct G (s) .

[0132] Regarding the multi-scale enhanced adjacency matrix generation unit: feature extraction and feature fusion need to be performed. In the MS data set of the embodiment, the feature extraction is to separate and fuse the trend item feature and the period item feature. The period item feature represents the high-frequency and specific scientific research cooperation behavior and knowledge output activity of the user, and cooperation is carried out on a specific paper. The trend item feature represents the low-frequency, long-term academic identity, inheritance relationship and macro-disciplinary structure to which the user belongs. In the embodiment, the fusion process of the period item feature is to collect the micro and leading cooperation dynamics such as “user node A and B co-authored paper” and “user node A appears frequently in project C field” from bottom to top. From the specific co-authored paper and project, the research frontier and emerging intersection are abstracted. The trend item feature fusion process is to first locate each scholar user by using the macro “discipline map” and “academic genealogy”, and then inject this stable attribution information downward to explain and evaluate the specific cooperation behavior. The discipline, school and teacher-student relationship to which the scholar belongs are used to deeply understand the internal logic and potential influence of the cooperation selection.

[0133] Evaluation indicators: accuracy, F1 score.

[0134] Hyperparameter setting: L=4, λ1=0.1, λ2=0.01, λ3=0.05, fusion unit dimension=128, learning rate=0.001.

[0135] Experimental environment: hardware environment is 2.39 GHz E5-2680 CPU, 8 cores, 64 GB RAM, 11G GTX1080ti GPU, and software environment is PyTorch Geometric.

[0136] The method of the application and the GCN method are trained by using the data set, and the evaluation indicators are tested on the test set, and the following Table 1 is obtained:

[0137] Table 1. Comparison of performance indicators of different methods

[0138] Method Accuracy (%) F1 score (%) The present invention 94.12 93.55 GCN method 92.17 90.40

[0139] Results: On the test set, the F1 score of the application reaches 94.12%, which is significantly higher than the GCN method, verifying the effectiveness of the model of the application.

[0140] The above merely describes preferred embodiments of the present application and is not used to limit the present application, and any modifications, equivalent replacements and improvements made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A social network node classification method based on multi-scale fusion, characterized in that, Includes the following steps: S1, Obtain the initial social network graph G (0) =(V (0) E (0) ), where V (0) E is the set of user nodes in a social network. (0) G is the set of relational edges between user nodes. (0) User node feature matrix X (0) Adjacency matrix A (0) User node tag set Y (0) ; S2, preset the scale S of the generated social network graph, and label the social network graphs at scale s-1 and scale s as G respectively. (s -1) G (s) 1≤s≤S, with I1 preset motif structures, the i-th motif is denoted as M. i , 1≤i≤I1; S3, construct an improved classification network, including a multi-scale network graph generation unit, a multi-scale enhanced adjacency matrix generation unit, a feature extraction and fusion unit, and a classifier; The multi-scale network graph generation unit is used to calculate G based on phantom salience detection. (s-1) The importance scores of each node in G (s-1) A social network graph G with scale s is generated by selecting k% of user nodes. (s) G (s) =(V (s) E (s) ), and generate G (s) The user node feature matrix and adjacency matrix, the V (s) E (s) These are the set of user nodes and the set of user relationship edges, respectively, at scale s. The multi-scale enhanced adjacency matrix generation unit includes a preprocessing unit, a feature extraction unit, and a feature fusion unit; The preprocessing unit is used to process G (0) G (1) ~G (S) The network graph set G all G all ={G (0) G (1) ,…,G (S) }, and G all The network graph of mesoscale l is labeled G (l) , 0≤l≤S; The feature extraction unit is used to extract features from G (l) Adjacency matrix A (l) Extracting periodic term features C (l) and trend feature T (l) ; The feature fusion unit is used for C (l) The fusion proceeds from scale 0 to scale S, and the fusion periodic term features are output sequentially from scale 1 to scale S. ~ , for T (l) The fusion proceeds from scale S to scale 0, and the fusion trend term features are output sequentially from scale S-1 to scale 0. ~ An enhanced adjacency matrix with scale l is generated based on the fusion periodic term features and the fusion trend term features. ; The feature extraction and fusion unit is used for G (0) ~G (S) Feature extraction was performed using GNNs separately and then fused into a fused feature Z. final ; The classifier is used as input Z. final Output V (0) Predicted label set of user nodes ; S4, construct the loss function Loss for the improved classification network, where Y and Cross-entropy loss; S5, G (0) The improved classification network is input and trained to minimize the loss until convergence, resulting in a multi-scale fusion social network node classification model, which is used for user node classification in the social network graph to be classified.

2. The social network node classification method based on multi-scale fusion according to claim 1, characterized in that, The multi-scale network graph generation unit includes a phantom saliency detection unit, a node selection unit, and a single-scale network graph generation unit; The phantom salience detection unit is used for G (s-1) Each M i Perform a significance test and output M. i Significance score (M) i ); The node selection unit calculates G. (s-1) Each node is assigned an importance score and sorted in descending order. The top k% of user nodes corresponding to these importance scores are then selected as candidate nodes. G (s-1) The importance score s(v) of any node v is calculated according to the following formula: , In the formula, For M i The weighting factor, I is the indicator function, and node v participates in the module M. i The value is 1 if it is true and 0 otherwise. Significance(M) i ) is the phantom M i The significance score; The single-scale network graph generation unit is used to construct a social network graph G of scale s based on the relationships between candidate nodes. (s) =(V (s) E (s) ), where V (s) E (s) These represent the set of user nodes and the set of user relationship edges, respectively, at scale s.

3. The social network node classification method based on multi-scale fusion according to claim 1, characterized in that, I1=4, M1~M4 correspond to four types of phantoms: triangular, star-shaped, chain-shaped, and ring-shaped, respectively. Phantom M i Significance score (M) i Calculate according to the following formula: , In the formula, For M i The number of times it appears in the observation network For phantom M i The expected number of occurrences in a random network. For the motif M in a random network i Standard deviation of the number of occurrences M is a pre-defined relation based on user nodes. i The weight.

4. The social network node classification method based on multi-scale fusion according to claim 1, characterized in that, The feature extraction unit extracts G (l) Periodic term characteristics C (l) and trend feature T (l) The methods include Sa1~Sa2: Sa1, solve for the trend term characteristic T according to the following function. (l) ; , In the formula, To find the minimum value of T that satisfies the argmin function (l) , It is an L1 norm. It is the L2 norm. For T (l) The conjugate matrix, The operation is for calculating the trace of a matrix, where T is the transpose operation, λ1 is the low-rank constraint coefficient, λ2 is the smoothness constraint coefficient, λ3 is the sparsity constraint coefficient, and L is the length of the matrix. f The graph is a Laplace matrix; Sa2, with a preset noise term feature ε(l), where ε(l) follows a normal distribution with a mean of 0 and a variance of σ²; Sa3, calculate the characteristic of the periodic term C (l) C (l) =A (l) -T (l) -ε (l) .

5. The social network node classification method based on multi-scale fusion according to claim 1, characterized in that, In the feature fusion unit, the fusion periodic term feature at scale l Features of the fusion trend term at scale l Calculate according to the following formulas respectively: , , , , In the formula, α (l) Here are the characteristic coefficients of the periodic term, and Upsample(∙) is the upsampling operation. Let σ(∙) be the fusion periodic term feature at scale l⁻¹, σ(∙) be the sigmoid activation function, and vec(∙) be the vectorization function. b is the first weight vector. α For the first bias term, β (l) Here are the characteristic coefficients of the trend term, and Downsample(∙) is the downsampling operation. For the fusion trend term features at scale l+1, b is the second weight vector. β This is the second bias term.

6. The social network node classification method based on multi-scale fusion according to claim 1, characterized in that, In the feature fusion unit, the method for generating the enhanced adjacency matrix is ​​as follows: Let the enhanced adjacency matrix of scale 0 The enhanced adjacency matrix of other scales l Calculate according to the following formula; , In the formula, γ and δ are preset values. , The weight.

7. The social network node classification method based on multi-scale fusion according to claim 1, characterized in that, The feature extraction and fusion unit includes a GNN network and a fusion layer; The GNN network is used as input G (l) X (l) and , for G (l) Feature extraction is performed to obtain the corresponding output features. ; The fusion layer is used to generate fusion feature Z according to the following formula. final ; , In the formula, γ l For G (l) The weight.

8. The social network node classification method based on multi-scale fusion according to claim 1, characterized in that, In S5, the methods for classifying nodes in the network graph to be classified using a multi-scale fusion social network node classification model include S51~S53; S51, Obtain the network graph to be classified as the initial network graph G'. (0) G' (0) The user node feature matrix is ​​X' (0) The adjacency matrix is ​​A' (0) ; S52, G' (0) Inputting a multi-scale fusion social network node classification model, and passing it through a multi-scale network graph generation unit, yields a network graph G' with scales from 1 to S. (1) ~G' (S) and the corresponding adjacency matrix A' (1) ~A' (S) User node feature matrix X' (1) ~X' (S) , will X' (l) The corresponding enhanced adjacency matrix is ​​generated by the multi-scale enhanced adjacency matrix generation unit. , 0≤l≤S; S53, X' (l) and The feature extraction and fusion unit generates the fused feature Z. final Then, the classifier outputs G'. (0) The set of predicted labels for user nodes.

Citation Information

Patent Citations

  • Aerial photo ground feature classification and change detection method based on graph neural network

    CN117437234A

  • Hyperspectral image classification method of cross-hop node interaction graph attention network

    CN120673162A