Node classification method and user classification method for super-large-scale dynamic attribute network
Through the method of information attenuation and sparse random matrix construction, the problem of low efficiency in the classification of nodes of hyperscale dynamic attribute networks is solved, and efficient and accurate node classification is achieved, which is suitable for hyperscale dynamic attribute networks.
Patent Information
- Application Number
- CN202411817890.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-18
AI Technical Summary
The existing node classification methods are difficult to effectively deal with hyper-large-scale dynamic attribute networks, and traditional methods ignore the dynamic characteristics of node attributes, resulting in complex and inefficient classification processes.
By obtaining the data information of the current and previous moments of the hyper-large-scale dynamic attribute network, information attenuation and sparse random matrix construction, incremental attribute matrix projection dimensionality reduction and network embedding matrix update, and dynamic node classification model is constructed.
It realizes efficient node classification of super-large-scale dynamic attribute networks, improves the reliability and accuracy of classification, and reduces the use of computing and storage resources.
Smart Images

Figure CN119646588A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to a node classification method and a user classification method for ultra-large-scale dynamic attribute networks. Background Art
[0002] Network node classification is an important part of network analysis in the computer field. It is mainly used to divide the nodes in the target network into different categories or labels in order to have a deeper understanding of the dynamic structure and attribute characteristics of the target network. In network node classification, dynamic attribute network node classification has important and extensive applications in many applications such as social networks, user recommendations, and protein classification. For example, in social networks, users' interests, relationships, and behavior patterns change dynamically. The resulting node classification of dynamic attribute networks can update user group divisions in real time, thereby improving the accuracy and personalization of recommendations. In addition, dynamic network node classification can also help platforms identify and respond to new fake accounts or malicious behaviors in a timely manner to ensure the security and user experience of social networks.
[0003] At present, traditional node classification methods mostly rely on topological structure analysis of static networks, such as algorithms based on graph theory. With the development of deep learning, graph neural networks (GNNs) have gradually become a popular tool for dealing with such complex network node classification problems. GNNs represent node features by learning dynamic patterns in the network, significantly improving the accuracy of node classification and achieving remarkable results in various tasks.
[0004] At present, in real-world scenarios such as social media and biological networks, the scale of networks is growing, and the number of nodes and the frequency of attribute updates are increasing, forming ultra-large-scale networks with dynamic attributes. However, both traditional classification schemes that rely on topological structure analysis of static networks and classification schemes based on graph neural networks (GNNs) are mainly aimed at smaller-scale networks or static networks, and are not suitable for dynamic attribute networks with ultra-large-scale nodes.
[0005] In addition, although some researchers have proposed node classification algorithms tailored for very large-scale dynamic networks containing billions of nodes and edges, such as DAMF and STGN, these methods regard node attributes as static and invariant, ignoring the dynamic characteristics of node attributes; at the same time, the classification process of these solutions is extremely complex, the training process of these solutions is time-consuming, and the efficiency and practicality are not high. Summary of the invention
[0006] One of the purposes of the present invention is to provide a node classification method for ultra-large-scale dynamic attribute networks with high reliability, good accuracy and high efficiency.
[0007] A second object of the present invention is to provide a user classification method including the node classification method for ultra-large-scale dynamic attribute networks.
[0008] The node classification method for ultra-large-scale dynamic attribute networks provided by the present invention comprises the following steps:
[0009] S1. Obtain data information of a large-scale dynamic attribute network at the current moment and the previous moment;
[0010] S2. Perform information attenuation according to the data information obtained in step S1;
[0011] S3. Construct a sparse random matrix at the current moment according to the data information obtained in step S1;
[0012] S4. According to the sparse random matrix obtained in step S3, the incremental attribute matrix at the current moment is projected and reduced in dimension to obtain an initial incremental embedding matrix;
[0013] S5. Perform incremental updates based on the initial incremental embedding matrix obtained in step S4 and the data information obtained in step S2 to obtain the network embedding matrix at the current moment;
[0014] S6. Binarize the network embedding matrix at the current moment obtained in step S5 to obtain a binary network embedding matrix at the current moment;
[0015] S7. Perform a concatenation operation on the current binary network embedding matrix obtained in step S6 to obtain the current expanded embedding matrix;
[0016] S8. Repeat steps S1 to S7, obtain the current moment extended embedding matrix of a set number of ultra-large-scale dynamic attribute networks and use them as training data sets, train the selected node classification initial model, and obtain a dynamic node classification model;
[0017] S9. Using the dynamic node classification model obtained in step S8, classify the nodes of the target ultra-large-scale dynamic attribute network at the current moment.
[0018] The step S1 of obtaining data information of a large-scale dynamic attribute network at the current moment and the previous moment specifically includes the following steps:
[0019] Obtain data information of ultra-large-scale dynamic attribute networks at the current moment and the previous moment;
[0020] The data information includes the adjacency matrix, attribute matrix and intermediate embedding matrix of the previous moment, and the incremental adjacency matrix and incremental attribute matrix of the current moment.
[0021] Step S2, according to the data information acquired in step S1, performs information attenuation, specifically comprising the following steps:
[0022] According to the adjacency matrix and attribute matrix of the previous moment, as well as the incremental adjacency matrix and incremental attribute matrix of the current moment, the following rules are used for information decay:
[0023] Perform information decay on the adjacency matrix:
[0024] When a new edge appears, the corresponding element in the adjacency matrix is set to 1; when an existing edge disappears, the corresponding element in the adjacency matrix is set to 0; when a new node appears, accept the new edge, expand the adjacency matrix, and set the newly added element in the expanded adjacency matrix to 1; when an existing node disappears, delete the corresponding edge, keep the size of the adjacency matrix unchanged, and set the corresponding element in the adjacency matrix to 0; at the same time, every time the adjacency matrix changes, multiply all unchanged elements in the adjacency matrix by To perform information attenuation;
[0025] Perform information decay on the attribute matrix:
[0026] When a new attribute of a node arrives, the corresponding element in the attribute matrix is set to 1; when an existing attribute of a node disappears, the corresponding element in the attribute matrix is set to 0; at the same time, every time the attribute matrix changes, all unchanged elements in the attribute matrix are multiplied by To perform information attenuation;
[0027] Construct the intermediate embedding matrix:
[0028] Construct the adjacency matrix G' and attribute matrix A of the current ultra-large-scale dynamic attribute network, and construct the closed neighborhood adjacency matrix G as G = G' + I, where I is the unit matrix;
[0029] All the attributes corresponding to all nodes in the current ultra-large-scale dynamic attribute network are combined into an attribute set; based on the attribute set, a sparse random matrix P is constructed using the following formula:
[0030]
[0031] Where P ij is the element in the i-th row and j-th column of the sparse random matrix P; s is an intermediate variable, and n_f is the total number of elements in the attribute set;
[0032] The number of rows of the constructed sparse random matrix P is the number of columns of the attribute matrix A, and the number of columns of the sparse random matrix P is the target dimension K after dimensionality reduction;
[0033] Use the following formula to calculate and obtain the initial embedding matrix to complete the projection dimension reduction of the attribute matrix:
[0034] X (0) =A·P
[0035] Where X (0) is the initial embedding matrix;
[0036] The following formula is used to iteratively multiply the initial embedding matrix and the closed neighborhood adjacency matrix to obtain the intermediate embedding matrix X (R) :
[0037] X (R) =G R ·A·P
[0038] Where R is the number of iterative multiplications of the closed neighborhood adjacency matrix;
[0039] Expand the intermediate embedding matrix:
[0040] When a new node appears, the intermediate embedding matrix is expanded and the corresponding elements of the expanded intermediate embedding matrix are set to 1; when an existing node disappears, the size of the intermediate embedding matrix is kept unchanged and the corresponding elements of the intermediate embedding matrix are set to 0.
[0041] Step S3, according to the data information obtained in step S1, constructs a sparse random matrix at the current moment, specifically comprising the following steps:
[0042] All the attributes corresponding to all nodes in the current ultra-large-scale dynamic attribute network are combined into an attribute set. According to the attribute set, the sparse random matrix P at the current moment is constructed using the following formula: (t) :
[0043]
[0044] Where P (t) (i,j) is the sparse random matrix P at the current moment (t) The element in the i-th row and j-th column of ; s is an intermediate variable, and n_f is the total number of elements in the current attribute set;
[0045] The sparse random matrix P constructed at the current moment (t) , the number of rows is the sum of the number of columns of the attribute matrix at the previous moment and the number of newly added attributes, and the number of columns is the target dimension after dimensionality reduction.
[0046] Step S4, according to the sparse random matrix obtained in step S3, performs projection dimensionality reduction on the incremental attribute matrix at the current moment to obtain an initial incremental embedding matrix, specifically comprising the following steps:
[0047] The following formula is used to calculate the initial incremental embedding matrix, and the projection dimension reduction of the incremental attribute matrix at the current moment is completed:
[0048]
[0049] In the formula is the first initial incremental embedding matrix; is the second initial incremental embedding matrix; ΔA (t) is the incremental attribute matrix at the current time t.
[0050] Step S5, according to the initial incremental embedding matrix obtained in step S4 and the data information obtained in step S2, performs incremental updating to obtain the network embedding matrix at the current moment, specifically includes the following steps:
[0051] Use the following formula for incremental update to get the network embedding matrix at the current moment:
[0052]
[0053] In the formula is the network embedding matrix at the current time t; is the network embedding matrix multiplied R times by iteration at time t-1; G is the first incremental embedding matrix multiplied R times by iteration at the current time t; (t-1) is the adjacency matrix at time t-1; ΔG (t) is the incremental adjacency matrix at the current time t; The second incremental embedding matrix is multiplied R times for the iteration at the current time t.
[0054] Step S6 performs a binarization operation on the network embedding matrix at the current moment obtained in step S5 to obtain a binarized network embedding matrix at the current moment, which specifically includes the following steps:
[0055] The network embedding matrix at the current moment obtained in step S5 The following rules are used for binarization:
[0056] like If the value of is greater than 0, The value of is corrected to 1;
[0057] like If the value of is less than or equal to 0, The value of is corrected to 0;
[0058] for The element at the i-th row and j-th column in ;
[0059] Get the current binary network embedding matrix B (t).
[0060] Step S7 performs a concatenation operation on the current moment binary network embedding matrix obtained in step S6 to obtain the current moment extended embedding matrix, which specifically includes the following steps:
[0061] For the current moment binary network embedding matrix B (t) , use the following steps to splice:
[0062] B (t) All elements in are inverted to obtain the binary inverse network embedding matrix B at the current moment (t)-in ;
[0063] B (t)-in Directly spliced to B (t) The right side of , we get the expanded embedding matrix at the current moment.
[0064] Step S8 repeats steps S1 to S7, obtains a set number of current moment extended embedding matrices of ultra-large-scale dynamic attribute networks and uses them as training data sets, trains the selected node classification initial model, and obtains a dynamic node classification model, specifically including the following steps:
[0065] Repeat steps S1 to S7 to obtain a set number of current-time extended embedding matrices of ultra-large-scale dynamic attribute networks;
[0066] Expand the embedding matrix of all current moments and construct a training dataset;
[0067] Selecting a model for dynamic node classification;
[0068] The selected model is trained using the training data set; during training, the set loss function is used for training, and the set optimization algorithm is used to update the parameters of the selected model;
[0069] Finally, the trained model is obtained as the final dynamic node classification model.
[0070] Step S9 uses the dynamic node classification model obtained in step S8 to classify nodes of the target ultra-large-scale dynamic attribute network at the current moment, which specifically includes the following steps:
[0071] Obtain data information of the target ultra-large-scale dynamic attribute network at the current moment;
[0072] Adopting the technical solutions of steps S2 to S7, obtaining the current moment extended embedding matrix of the target ultra-large-scale dynamic attribute network at the current moment;
[0073] The obtained current moment extended embedding matrix is input into the dynamic node classification model obtained in step S8 to obtain the corresponding node classification result, thereby realizing the node classification of the target ultra-large-scale dynamic attribute network at the current moment.
[0074] The present invention also provides a user classification method including the node classification method for ultra-large-scale dynamic attribute networks, comprising the following steps:
[0075] A. Obtain data information of the social network to be classified;
[0076] B. Classifying the nodes of the social network to be classified using the node classification method for ultra-large-scale dynamic attribute networks according to the data information obtained in step A;
[0077] C. Based on the node classification results obtained in step B, complete the user classification of the social network.
[0078] The node classification method and user classification method for ultra-large-scale dynamic attribute networks provided by the present invention not only realize the node classification for ultra-large-scale dynamic attribute networks in a manner of information attenuation and incremental updating, by extending the construction of the embedding matrix and the construction and training of the classification model, but also have higher reliability, better accuracy and higher efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 The figure is a flowchart of the node classification method of the present invention.
[0080] Figure 2 The figure is a flow chart of the user classification method of the present invention. DETAILED DESCRIPTION
[0081] like Figure 1 The schematic diagram of the method flow of the node classification method of the present invention is shown as follows: The node classification method for ultra-large-scale dynamic attribute networks provided by the present invention comprises the following steps:
[0082] S1. Obtaining data information of a large-scale dynamic attribute network at the current moment and the previous moment; specifically comprising the following steps:
[0083] Obtain data information of ultra-large-scale dynamic attribute networks at the current moment and the previous moment;
[0084] The data information includes the adjacency matrix, attribute matrix and intermediate embedding matrix of the previous moment, and the incremental adjacency matrix and incremental attribute matrix of the current moment;
[0085] S2. Perform information attenuation according to the data information obtained in step S1; specifically comprising the following steps:
[0086] According to the adjacency matrix and attribute matrix of the previous moment, as well as the incremental adjacency matrix and incremental attribute matrix of the current moment, the following rules are used for information decay:
[0087] Perform information decay on the adjacency matrix:
[0088] When a new edge appears, the corresponding element in the adjacency matrix is set to 1; when an existing edge disappears, the corresponding element in the adjacency matrix is set to 0; when a new node appears, accept the new edge, expand the adjacency matrix, and set the newly added element in the expanded adjacency matrix to 1; when an existing node disappears, delete the corresponding edge, keep the size of the adjacency matrix unchanged, and set the corresponding element in the adjacency matrix to 0; at the same time, every time the adjacency matrix changes, multiply all unchanged elements in the adjacency matrix by To perform information attenuation;
[0089] Perform information decay on the attribute matrix:
[0090] When a new attribute of a node arrives, the corresponding element in the attribute matrix is set to 1; when an existing attribute of a node disappears, the corresponding element in the attribute matrix is set to 0; at the same time, every time the attribute matrix changes, all unchanged elements in the attribute matrix are multiplied by To perform information attenuation;
[0091] Construct the intermediate embedding matrix:
[0092] Construct the adjacency matrix G' and attribute matrix A of the current ultra-large-scale dynamic attribute network, and construct the closed neighborhood adjacency matrix G as G = G' + I, where I is the unit matrix;
[0093] All the attributes corresponding to all nodes in the current ultra-large-scale dynamic attribute network are combined into an attribute set; based on the attribute set, a sparse random matrix P is constructed using the following formula:
[0094]
[0095] Where P ij is the element in the i-th row and j-th column of the sparse random matrix P; s is an intermediate variable, and n_f is the total number of elements in the attribute set;
[0096] The number of rows of the constructed sparse random matrix P is the number of columns of the attribute matrix A, and the number of columns of the sparse random matrix P is the target dimension K after dimensionality reduction;
[0097] Use the following formula to calculate and obtain the initial embedding matrix to complete the projection dimension reduction of the attribute matrix:
[0098] X (0) =A·P
[0099] Where X (0) is the initial embedding matrix;
[0100] The following formula is used to iteratively multiply the initial embedding matrix and the closed neighborhood adjacency matrix to obtain the intermediate embedding matrix X (R) :
[0101] X (R) =G R ·A·P
[0102] Where R is the number of iterative multiplications of the closed neighborhood adjacency matrix;
[0103] Expand the intermediate embedding matrix:
[0104] When a new node appears, the intermediate embedding matrix is expanded and the corresponding elements of the expanded intermediate embedding matrix are set to 1; when an existing node disappears, the size of the intermediate embedding matrix is kept unchanged and the corresponding elements of the intermediate embedding matrix are set to 0;
[0105] This step ensures that outdated information disappears over time; this mechanism can adapt to topological structures and node properties that change over time, thereby maintaining the relevance and quality of embeddings in a dynamic environment;
[0106] S3. According to the data information obtained in step S1, a sparse random matrix at the current moment is constructed; specifically comprising the following steps:
[0107] All the attributes corresponding to all nodes in the current ultra-large-scale dynamic attribute network are combined into an attribute set. According to the attribute set, the sparse random matrix P at the current moment is constructed using the following formula: (t) :
[0108]
[0109] Where P (t) (i,j) is the sparse random matrix P at the current moment (t) The element in the i-th row and j-th column of ; s is an intermediate variable, and n_f is the total number of elements in the current attribute set;
[0110] The meaning of the above formula is that P (t) The value of (i,j) is random, that is, P (t) The value of (i,j) is The probability of have The probability of have The probability of is 0;
[0111] The sparse random matrix P constructed at the current moment (t) , the number of rows is the sum of the number of columns of the attribute matrix at the previous moment and the number of newly added attributes, and the number of columns is the target dimension after dimensionality reduction;
[0112] S4. According to the sparse random matrix obtained in step S3, the incremental attribute matrix at the current moment is projected and reduced in dimension to obtain an initial incremental embedding matrix; specifically, the steps include:
[0113] The following formula is used to calculate the initial incremental embedding matrix, and the projection dimension reduction of the incremental attribute matrix at the current moment is completed:
[0114]
[0115] In the formula is the first initial incremental embedding matrix; is the second initial incremental embedding matrix; ΔA (t) is the incremental attribute matrix at the current time t;
[0116] The projection process in this step is mainly to efficiently reduce the dimension of the ultra-large-scale network while ensuring the embedding quality, because the value of the target dimension K is much smaller than the incremental attribute matrix ΔA (t) Dimensions;
[0117] S5. Perform incremental updates based on the initial incremental embedding matrix obtained in step S4 and the data information obtained in step S2 to obtain the network embedding matrix at the current moment; specifically comprising the following steps:
[0118] Use the following formula for incremental update to get the network embedding matrix at the current moment:
[0119]
[0120] In the formula is the network embedding matrix at the current time t; is the network embedding matrix multiplied R times by iteration at time t-1; G is the first incremental embedding matrix multiplied R times by iteration at the current time t; (t-1) is the adjacency matrix at time t-1; ΔG (t) is the incremental adjacency matrix at the current time t; The second incremental embedding matrix is multiplied R times for the iteration at the current time t;
[0121] The purpose of the iterative multiplication incremental update in this step is to preserve the node's own information and capture the changing information in the network when exploring high-order nodes;
[0122] Through this step, the new node representation can be quickly obtained in an incremental manner based on the node representation at time t-1 and the change at the current time t, without having to recalculate at each time moment;
[0123] S6. Binarize the network embedding matrix at the current moment obtained in step S5 to obtain a binary network embedding matrix at the current moment; specifically comprising the following steps:
[0124] The network embedding matrix at the current moment obtained in step S5 The following rules are used for binarization:
[0125] like If the value of is greater than 0, The value of is corrected to 1;
[0126] like If the value of is less than or equal to 0, The value of is corrected to 0;
[0127] for The element at the i-th row and j-th column in ;
[0128] Get the current binary network embedding matrix B (t)
[0129] Through the binarization operation in this step, a lot of storage space can be saved;
[0130] S7. Perform a concatenation operation on the current binary network embedding matrix obtained in step S6 to obtain the current expanded embedding matrix; specifically comprising the following steps:
[0131] For the current moment binary network embedding matrix B (t) , use the following steps to splice:
[0132] B (t) All elements in are inverted to obtain the binary inverse network embedding matrix B at the current moment (t)-in ;
[0133] B (t)-in Directly spliced to B (t) On the right side of , we get the expanded embedding matrix at the current moment;
[0134] In specific implementation, B (t) for Take this as an example to explain:
[0135] against B (t) All elements in are negated to get B (t)-in for
[0136] B (t)-in Directly spliced to B (t) The right side of the matrix is:
[0137] Through the processing of this step, large-scale core matrix storage can be bypassed, thereby further reducing resource usage;
[0138] S8. Repeat steps S1 to S7, obtain the current moment extended embedding matrix of a set number of ultra-large-scale dynamic attribute networks and use them as training data sets, train the selected node classification initial model, and obtain a dynamic node classification model; specifically, the steps include:
[0139] Repeat steps S1 to S7 to obtain a set number of current-time extended embedding matrices of ultra-large-scale dynamic attribute networks;
[0140] Expand the embedding matrix of all current moments and construct a training dataset;
[0141] Selecting a model for dynamic node classification;
[0142] The selected model is trained using the training data set; during training, the set loss function is used for training, and the set optimization algorithm (such as the gradient descent algorithm) is used to update the parameters of the selected model;
[0143] Finally, the trained model is obtained as the final dynamic node classification model;
[0144] In specific implementation, the model selected for dynamic node classification may be a logistic regression model, a support vector machine model, a K nearest neighbor model, a neural network model, etc.;
[0145] S9. Using the dynamic node classification model obtained in step S8, classify the nodes of the target ultra-large-scale dynamic attribute network at the current moment; specifically comprising the following steps:
[0146] Obtain data information of the target ultra-large-scale dynamic attribute network at the current moment;
[0147] Adopting the technical solutions of steps S2 to S7, obtaining the current moment extended embedding matrix of the target ultra-large-scale dynamic attribute network at the current moment;
[0148] The obtained current moment extended embedding matrix is input into the dynamic node classification model obtained in step S8 to obtain the corresponding node classification result, thereby realizing the node classification of the target ultra-large-scale dynamic attribute network at the current moment.
[0149] The solution of the present invention accelerates the embedding of ultra-large-scale dynamic attribute networks while maintaining performance through sparse random projection in an incremental update manner. In addition, the method adopts an effective binary network representation, which greatly reduces the use of storage memory. The combination of information decay mechanism ensures that outdated information gradually disappears over time, so that the model can adapt to the dynamic characteristics of network topology and node attributes; the present invention does not need to generate a kernel matrix for the support vector machine with a size of the square of the number of training instances, but forms an inner product space through bit NOT expansion, and inputs the expanded embedding matrix into linear learning algorithms such as logistic regression for training and testing, thereby effectively classifying various types of nodes; therefore, the present invention avoids complex mathematical calculations and massive parameter learning in neural networks, and no longer relies on expensive high-end hardware. It can significantly reduce time and storage space overhead while meeting the node classification accuracy, and is particularly suitable for node classification tasks in ultra-large-scale dynamic attribute network scenarios. Moreover, the present invention has high reliability, good accuracy, high efficiency, and less resource occupation.
[0150] The node classification method of the present invention is further described below in conjunction with an embodiment:
[0151] This embodiment uses public data sets to test node classification; the public data sets are ogbn-product data set, MAG-Scholar-C data set and ogbn-papers100M data set. Among them, the ogbn-product data set contains 2,449,029 products in 47 categories, of which 61,6859,140 edges indicate that these products are purchased together on the Amazon platform. Each product has a 100-dimensional feature vector and a time step of 10. MAG-Scholar-C is a Microsoft Academic Graph that contains 10,541,560 research papers in 8 subject areas, with 2,784,240-dimensional features and 132,609,997 citation links, and the time step is set to 6. ogbn-papers100M includes 111,059,956 papers from the Microsoft Academic Graph and 1,615,685,872 citation edges from the Microsoft Academic Graph. Each paper has a 128-dimensional feature vector, and there are only 1,546,782 papers on arXiv with labels spanning 172 subject areas. The time step is set to 6. At each time step, 1% of new nodes and attributes are added, while 1% of existing edges and attributes are deleted. The specific descriptions of the ogbn-product dataset, MAG-Scholar-C dataset, and ogbn-papers100M dataset are shown in Table 1:
[0152] Table 1 Dataset description table
[0153]
[0154] Then, the nodes in the above public data sets are classified using the existing RandNE classification method, DRLAN classification method, DAMF classification method, STGN classification method and the classification method of this application respectively;
[0155] Among them, RandNE uses incremental updates and iterative normal random projections of the adjacency matrix to maintain the structural similarity of high-order nodes. DRLAN uses an integrated learning framework, including offline and online embedding modules, recursive updates, and pre-projection mechanisms to learn the dynamic representation of nodes while retaining attribute and structural information. DAMF combines dynamic personalized PageRank to update graph embeddings by rotating and scaling the embedding space. This method cannot merge attributes. STGN uses hyperbolic geometry to capture the temporal dynamics and hierarchical structures in continuous-time dynamic graphs, retaining only structural information. The network embedding representation obtained at each moment by the above algorithm is input into the linear learner for training and testing, thereby completing the node classification experiment at each moment. After the classification is completed, the performance data of the corresponding classification method is shown in Table 2:
[0156] Table 2 Classification method performance data comparison diagram
[0157]
[0158] As can be seen from Table 2, on these three different dynamic datasets, the method of the present application has significant performance advantages compared to all common network embedding algorithms (i.e., RandNE, DRLAN, and STGN); although these traditional methods use various techniques to capture high-order node information, they mainly focus on network topology and ignore the intrinsic properties of nodes. This limitation leads to a significant reduction in node classification accuracy, especially in complex real-world scenarios where both topological and attribute information are crucial. In addition, the method of the present application outperforms the attribute network embedding method (i.e., DRLAN). Although both methods retain node attributes and network topology, DRLAN does not take into account information decay, which limits its ability to gradually forget outdated information. This oversight hinders the accuracy of the model in representing dynamic networks because outdated data still affects the embedding. Specifically, outdated information may result in the retention of irrelevant relationships or patterns, causing the model to produce embeddings that do not accurately reflect the current state of the network.
[0159] The time efficiency of the embedding update process is also shown in Table 2. Our method is much faster than all baseline methods, achieving up to 1423x speedup, excluding scenarios where runtime / memory limits are exceeded. First, we compare with learning-based embedding baselines (i.e., DAMF and STGN). On ogbn-products and MAG-Scholar-C, our method outperforms DAMF by 1423x and 1120x, respectively. On ogbn-papers100M, which contains billions of edges, DAMF exceeds the runtime limit (set to 10 due to the high computational cost of rotating graph embeddings and scaling the embedding space). 6 seconds). On ogbn-products, our method is 530 times faster than STGN. Due to STGN's heavy reliance on GPU memory, it cannot run on the two largest datasets, namely MAG-Scholar-C and ogbn-papers100M. Next, our method is compared with random projection methods, namely RandNE and DRLAN. Although both RandNE and DRLAN utilize efficient random projections, our method performs much better. Specifically, our method is 11 times, 12 times, and 3 times faster than RandNE on the ogbn-products, MAG-Scholar-C, and ogbn-papers100M datasets, respectively. It is worth noting that on ogbn-papers100M, RandNE cannot run above R>2 because it relies on a dense random projection matrix, which requires a lot of memory to capture high-order neighbors in very large networks. Compared to DRLAN, which considers node attributes, our method is 3 times and 28 times faster on ogbn-products and MAG-Scholar-C, respectively. DRLAN is faster than RandNE on ogbn-product due to the use of sparse random projections. However, it is slower than RandNE on MAG-Scholat-C because MAG-Scholar-C has richer attributes and it exceeds the memory limit of ogbn-papers100M. This is because DRLAN relies on a memory-intensive offline batch embedding module that is designed to keep nodes and attributes close, which makes it inefficient for networks with billions of edges and complex attribute structures. In contrast, our method performs very well on all datasets and can effectively handle large-scale networks with rich attribute data.
[0160] In addition, the network embeddings generated by these baselines are represented in float64, so the storage requirements are high when applied to very large-scale networks. In contrast, binary representation can reduce storage space and speed up data processing. Therefore, the method of the present application provides a storage efficiency solution with a compact binary representation, making it very suitable for very large-scale networks. Overall, the method of the present application significantly outperforms the very large-scale dynamic (attribute) network embedding methods in terms of embedding speed and storage.
[0161] like Figure 2 The method flow diagram of the user classification method of the present invention is shown as follows: the user classification method disclosed in the present invention, which includes the node classification method for ultra-large-scale dynamic attribute networks, comprises the following steps:
[0162] A. Obtain data information of the social network to be classified;
[0163] B. Classifying the nodes of the social network to be classified using the node classification method for ultra-large-scale dynamic attribute networks according to the data information obtained in step A;
[0164] C. Based on the node classification results obtained in step B, complete the user classification of the social network.
[0165] In addition, the node classification method of the present invention is also applicable to various application scenarios such as recommendation systems, social user behavior analysis, network community detection, public opinion monitoring and hot spot propagation analysis, abnormal user detection, knowledge graph construction, online advertising delivery optimization, personalized learning resource recommendation, real-time event detection and tracking, urban traffic flow prediction, medical and health data mining, e-commerce user purchasing behavior analysis, game player group feature classification, financial risk user analysis, network security threat detection, academic cooperation network analysis and supply chain node optimization.
Claims
1. A node classification method for ultra-large-scale dynamic attribute networks, comprising the following steps: S1. Obtain data information of a large-scale dynamic attribute network at the current moment and the previous moment; S2. Perform information attenuation according to the data information obtained in step S1; S3. Construct a sparse random matrix at the current moment according to the data information obtained in step S1; S4. According to the sparse random matrix obtained in step S3, the incremental attribute matrix at the current moment is projected and reduced in dimension to obtain an initial incremental embedding matrix; S5. Perform incremental updates based on the initial incremental embedding matrix obtained in step S4 and the data information obtained in step S2 to obtain the network embedding matrix at the current moment; S6. Binarize the network embedding matrix at the current moment obtained in step S5 to obtain a binary network embedding matrix at the current moment; S7. Perform a concatenation operation on the current binary network embedding matrix obtained in step S6 to obtain the current expanded embedding matrix; S8. Repeat steps S1 to S7, obtain the current moment extended embedding matrix of a set number of ultra-large-scale dynamic attribute networks and use them as training data sets, train the selected node classification initial model, and obtain a dynamic node classification model; S9. Using the dynamic node classification model obtained in step S8, classify the nodes of the target ultra-large-scale dynamic attribute network at the current moment.
2. The node classification method for ultra-large-scale dynamic attribute networks according to claim 1 is characterized in that The step S1 of obtaining data information of a large-scale dynamic attribute network at the current moment and the previous moment specifically includes the following steps: Obtain data information of ultra-large-scale dynamic attribute networks at the current moment and the previous moment; The data information includes the adjacency matrix, attribute matrix and intermediate embedding matrix of the previous moment, and the incremental adjacency matrix and incremental attribute matrix of the current moment; Step S2, according to the data information acquired in step S1, performs information attenuation, specifically comprising the following steps: According to the adjacency matrix and attribute matrix of the previous moment, as well as the incremental adjacency matrix and incremental attribute matrix of the current moment, the following rules are used for information decay: Perform information decay on the adjacency matrix: When a new edge appears, the corresponding element in the adjacency matrix is set to 1; when an existing edge disappears, the corresponding element in the adjacency matrix is set to 0; when a new node appears, accept the new edge, expand the adjacency matrix, and set the newly added element in the expanded adjacency matrix to 1; when an existing node disappears, delete the corresponding edge, keep the size of the adjacency matrix unchanged, and set the corresponding element in the adjacency matrix to 0; at the same time, every time the adjacency matrix changes, multiply all unchanged elements in the adjacency matrix by To perform information attenuation; Perform information decay on the attribute matrix: When a new attribute of a node arrives, the corresponding element in the attribute matrix is set to 1; when an existing attribute of a node disappears, the corresponding element in the attribute matrix is set to 0; at the same time, every time the attribute matrix changes, all unchanged elements in the attribute matrix are multiplied by To perform information attenuation; Construct the intermediate embedding matrix: Construct the adjacency matrix G' and attribute matrix A of the current ultra-large-scale dynamic attribute network, and construct the closed neighborhood adjacency matrix G as G = G' + I, where I is the unit matrix; All the attributes corresponding to all nodes in the current ultra-large-scale dynamic attribute network are combined into an attribute set; based on the attribute set, a sparse random matrix P is constructed using the following formula: Where P ij is the element in the i-th row and j-th column of the sparse random matrix P; s is an intermediate variable, and n_f is the total number of elements in the attribute set; The number of rows of the constructed sparse random matrix P is the number of columns of the attribute matrix A, and the number of columns of the sparse random matrix P is the target dimension K after dimensionality reduction; Use the following formula to calculate and obtain the initial embedding matrix to complete the projection dimension reduction of the attribute matrix: X (0) =A·P Where X (0) is the initial embedding matrix; The following formula is used to iteratively multiply the initial embedding matrix and the closed neighborhood adjacency matrix to obtain the intermediate embedding matrix X (R) : X (R) =G R ·A·P Where R is the number of iterative multiplications of the closed neighborhood adjacency matrix; Expand the intermediate embedding matrix: When a new node appears, the intermediate embedding matrix is expanded and the corresponding elements of the expanded intermediate embedding matrix are set to 1; when an existing node disappears, the size of the intermediate embedding matrix is kept unchanged and the corresponding elements of the intermediate embedding matrix are set to 0.
3. The node classification method for ultra-large-scale dynamic attribute networks according to claim 2 is characterized in that Step S3, according to the data information obtained in step S1, constructs a sparse random matrix at the current moment, specifically comprising the following steps: All the attributes corresponding to all nodes in the current ultra-large-scale dynamic attribute network are combined into an attribute set. According to the attribute set, the sparse random matrix P at the current moment is constructed using the following formula: (t) : Where P (t) (i,j) is the sparse random matrix P at the current moment (t) The element in row i and column j of ; s is an intermediate variable, and n_f is the total number of elements in the current attribute set; The sparse random matrix P constructed at the current moment (t) , the number of rows is the sum of the number of columns of the attribute matrix at the previous moment and the number of newly added attributes, and the number of columns is the target dimension after dimensionality reduction.
4. The node classification method for ultra-large-scale dynamic attribute networks according to claim 3 is characterized in that Step S4, according to the sparse random matrix obtained in step S3, performs projection dimensionality reduction on the incremental attribute matrix at the current moment to obtain an initial incremental embedding matrix, specifically comprising the following steps: The following formula is used to calculate the initial incremental embedding matrix, and the projection dimension reduction of the incremental attribute matrix at the current moment is completed: In the formula is the first initial incremental embedding matrix; is the second initial incremental embedding matrix; ΔA (t) is the incremental attribute matrix at the current time t.
5. The node classification method for ultra-large-scale dynamic attribute networks according to claim 4 is characterized in that Step S5, according to the initial incremental embedding matrix obtained in step S4 and the data information obtained in step S2, performs incremental updating to obtain the network embedding matrix at the current moment, specifically includes the following steps: Use the following formula for incremental update to get the network embedding matrix at the current moment: In the formula is the network embedding matrix at the current time t; is the network embedding matrix multiplied R times by iteration at time t-1; G is the first incremental embedding matrix multiplied R times by iteration at the current time t; (t-1) is the adjacency matrix at time t-1; ΔG (t) is the incremental adjacency matrix at the current time t; The second incremental embedding matrix is multiplied R times for the iteration at the current time t.
6. The node classification method for ultra-large-scale dynamic attribute networks according to claim 5 is characterized in that Step S6 performs a binarization operation on the network embedding matrix at the current moment obtained in step S5 to obtain a binarized network embedding matrix at the current moment, which specifically includes the following steps: The network embedding matrix at the current moment obtained in step S5 The following rules are used for binarization: like If the value of is greater than 0, The value of is corrected to 1; like If the value of is less than or equal to 0, The value of is corrected to 0; for The element in the i-th row and j-th column of ; Get the current binary network embedding matrix B (t) .
7. The node classification method for ultra-large-scale dynamic attribute networks according to claim 6 is characterized in that Step S7 performs a concatenation operation on the current moment binary network embedding matrix obtained in step S6 to obtain the current moment extended embedding matrix, which specifically includes the following steps: For the current moment binary network embedding matrix B (t) , use the following steps to splice: B (t) All elements in are inverted to obtain the binary inverse network embedding matrix B at the current moment (t)-in ; B (t)-in Directly spliced to B (t) The right side of , we get the expanded embedding matrix at the current moment.
8. The node classification method for ultra-large-scale dynamic attribute networks according to claim 7 is characterized in that Step S8 repeats steps S1 to S7, obtains a set number of current moment extended embedding matrices of ultra-large-scale dynamic attribute networks and uses them as training data sets, trains the selected node classification initial model, and obtains a dynamic node classification model, specifically including the following steps: Repeat steps S1 to S7 to obtain a set number of current-time extended embedding matrices of ultra-large-scale dynamic attribute networks; Expand the embedding matrix of all current moments and construct a training dataset; Selecting a model for dynamic node classification; Using the training data set, train the selected model; During training, the set loss function is used for training, and the set optimization algorithm is used to update the parameters of the selected model; Finally, the trained model is obtained as the final dynamic node classification model.
9. The node classification method for ultra-large-scale dynamic attribute networks according to claim 8 is characterized in that Step S9 uses the dynamic node classification model obtained in step S8 to classify nodes of the target ultra-large-scale dynamic attribute network at the current moment, which specifically includes the following steps: Obtain data information of the target ultra-large-scale dynamic attribute network at the current moment; Adopting the technical solutions of steps S2 to S7, obtaining the current moment extended embedding matrix of the target ultra-large-scale dynamic attribute network at the current moment; The obtained current moment extended embedding matrix is input into the dynamic node classification model obtained in step S8 to obtain the corresponding node classification result, thereby realizing the node classification of the target ultra-large-scale dynamic attribute network at the current moment.
10. A user classification method comprising the node classification method for ultra-large-scale dynamic attribute networks according to any one of claims 1 to 9, characterized in that The steps include: A. Obtain data information of the social network to be classified; B. Based on the data information obtained in step A, the node classification method for ultra-large-scale dynamic attribute networks according to any one of claims 1 to 9 is used to classify the nodes of the social network to be classified; C. Based on the node classification results obtained in step B, complete the user classification of the social network.