An attribute graph clustering method and system

CN116450911BActive Publication Date: 2026-03-10XINJIANG TECH INST OF PHYSICS & CHEM CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2026-03-10

Smart Images

  • Figure CN116450911B_ABST
    Figure CN116450911B_ABST
Patent Text Reader

Abstract

This invention provides an attribute graph clustering method and system. The method includes: inputting an attribute graph into a trained attribute graph clustering model, outputting a membership matrix, and assigning each node in the attribute graph to the cluster with the highest membership degree. The attribute graph clustering model is a graph convolutional neural network model. The training process of the attribute graph clustering model is as follows: constructing an adjacency matrix of the attribute graph based on the set of all nodes in the attribute graph and the set of edges between two nodes; constructing a feature matrix of the attribute graph based on the set of all attributes associated with a node; constructing a normalized adjacency matrix and a node attribute association matrix; constructing a loss function about the membership matrix; constructing a graph convolutional neural network model and iteratively updating it until the loss function converges. The advantage of this invention is that, in the algorithm design process, a fuzzy clustering objective is fused into the graph convolutional network to complete the attribute graph clustering task, thereby improving the accuracy of attribute graph clustering.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computer data processing, and particularly relates to an attribute graph clustering method and system. BACKGROUND

[0002] At present, the existing attribute graph clustering method based on graph convolution network mainly learns the representation of nodes effectively, and then combines the learned node representation with the existing clustering method to complete the attribute graph clustering task. However, these methods are not specifically proposed for the attribute graph clustering task, because the objective function of this kind of method does not contain the objective that can directly optimize the attribute graph clustering task, so it can be seen that their main purpose is to better represent the nodes in the attribute graph. Therefore, this makes this kind of method unable to optimize the attribute graph clustering task in the network learning process, and thus cannot obtain better clustering results.

[0003] Although some attribute graph clustering methods directly integrating the clustering objective into the graph convolution network have been proposed, the clustering results obtained by them are poor in accuracy. SUMMARY

[0004] The present application aims to overcome the defect that the clustering result obtained by the prior art in the attribute graph clustering integrating the clustering objective into the graph convolution network is poor in accuracy.

[0005] In order to achieve the above-mentioned purpose, the present application provides an attribute graph clustering method, which comprises:

[0006] inputting the attribute graph into the trained attribute graph clustering model, outputting the membership matrix, dividing each node in the attribute graph into the cluster with the largest membership, thereby realizing clustering; the attribute graph clustering model is a graph convolution neural network model;

[0007] The training process of the attribute graph clustering model comprises:

[0008] According to the set of all nodes in the attribute graph and the set of edges between two nodes, the adjacency matrix of the attribute graph is constructed, and according to the set of all attributes associated with the nodes, the feature matrix of the attribute graph is constructed; the normalized adjacency matrix and the node attribute association degree matrix are constructed; the loss function about the membership matrix is constructed; the graph convolution neural network model is constructed, and is iteratively updated until the loss function converges.

[0009] As an improvement of the above-mentioned method, the training process of the attribute graph clustering model specifically comprises:

[0010] Step 1: preprocessing attribute graph data:

[0011] According to the set of all nodes V={vi}(1≤i≤n V The set of all edges E = {e ij Construct the adjacency matrix A, v of the attribute graph. i Let n represent the i-th node. V Indicates the number of nodes, e ij This represents the edge connecting the i-th node and the j-th node; based on the set Λ = {Λ} of all attributes associated with a node. m}(1≤m≤n Λ ), construct the feature matrix X, Λ of the attribute graph m This represents the m-th attribute;

[0012] Step 2: Obtain the normalized adjacency matrix based on the adjacency matrix of the attribute graph; construct the node attribute correlation matrix based on the adjacency matrix and feature matrix of the attribute graph.

[0013] Step 3: Based on the feature matrix, normalized adjacency matrix, and node attribute association matrix of the attribute graph, obtain the membership matrix and construct a loss function about the membership matrix;

[0014] Step 4: Input model parameters, construct a graph convolutional neural network model, optimize the loss function, and obtain the optimal membership matrix.

[0015] As an improvement to the above method, step 2, obtaining the normalized adjacency matrix, specifically includes:

[0016] Normalize the adjacency matrix A to obtain the normalized adjacency matrix. The specific normalization method is as follows:

[0017]

[0018] Where I represents the identity matrix with the same dimension as A; D represents the degree matrix of (A+I).

[0019] As an improvement to the above method, step 2, constructing the node attribute association matrix, specifically includes:

[0020] The node v is initially calculated using the cosine similarity method. i and v j The degree of attribute association between them, r′(v i ,v j ):

[0021]

[0022] Where, x im x represents the m-th attribute value of the i-th node; jm This represents the m-th attribute value of the j-th node;

[0023] By the adjacency between nodes v i and v j , the final attribute correlation degree r(v i ,v j ) is obtained:

[0024] r(v i ,v j )=a ij ×r′(v i ,v j )

[0025] Wherein, a ij represents the element in the i-th row and the j-th column of the adjacency matrix A;

[0026] According to the attribute correlation degree between nodes, the attribute correlation degree matrix R is obtained, and the i-th row and the j-th column of the matrix R is the node

[0027] r ij =r(v i ,v j ).

[0028] As an improvement of the above method, the membership degree matrix obtained in step 3 specifically comprises:

[0029] The graph convolution coding mode is constructed as:

[0030] H l+1 =σ(Ξ l H l W l )

[0031] Wherein, l increases from 0 to L, L represents the number of layers of the graph convolutional neural network; H l is the representation matrix of all nodes in the l-th layer of the graph convolutional neural network, when l=0, H l =X; W l represents the trainable parameters in the l-th layer of the graph convolutional neural network; σ(·) represents the relu activation function; Ξ l represents the attention coefficient matrix in the l-th layer of the graph convolutional neural network, which measures the importance between nodes and neighbor nodes.

[0032] For the calculation of Ξ l , first, the correlation matrix M l between nodes is calculated by using the attention mechanism, and the calculation method is:

[0033]

[0034] Wherein, and represent 1×nV trainable parameters, represents a broadcast element-wise multiplication operation; represents the normalized adjacency matrix; obtain the correlation matrix M between nodes l After that, normalize it to get the final attention coefficient matrix Ξ l :

[0035]

[0036] where N i represents the set of all neighbor nodes of node i; represents the matrix Ξ l the i-th row and j-th column element; represents the matrix M l the i-th row and j-th column element; represents M l the i-th row and t-th column element;

[0037] According to the graph convolution encoding mode, when the number of graph convolution network layers reaches the set maximum layer, i.e. l=L, the representation matrix H of all nodes is obtained L , and the final node representation matrix is denoted as H, i.e. H=H L ;

[0038] According to the representation matrix H of all nodes, the reconstructed adjacency matrix

[0039]

[0040] where h i and h j represent the representation vectors of node i and node j in the node representation matrix H respectively;

[0041] The construction of the graph convolution decoding mode is:

[0042]

[0043] where l decreases from L to 0, when l=L, Ξ l and W l correspond to Ξ l and W l in the graph convolution encoding process respectively;

[0044] According to the graph convolution decoding mode, when l=0, the reconstructed feature matrix is obtained, i.e.

[0045] Obtain the target distribution matrix Q of the node:

[0046]

[0047] where q if denotes the element in the i-th row and f-th column of the target distribution matrix Q; μ f denotes the representation vector of the f-th cluster center; k denotes the number of cluster centers; ||·|| denotes the norm of a vector;

[0048] Obtain the ideal target distribution matrix P of the nodes:

[0049]

[0050] where p if denotes the element in the i-th row and f-th column of the ideal target distribution matrix P;

[0051] Obtain the membership matrix U:

[0052]

[0053] where u if denotes the element in the i-th row and f-th column of the membership matrix;

[0054] As an improvement of the above method, the loss function in step 3 is constructed as follows:

[0055]

[0056] where A denotes the adjacency matrix; X denotes the feature matrix; R denotes the attribute correlation strength matrix; U denotes the membership matrix; the element in the matrix S denotes the inconsistency of node i with other nodes in cluster f, n V denotes the number of nodes in the graph, k denotes the number of clusters, a ij denotes the element in the i-th row and j-th column of the adjacency matrix A, u jg denotes the element in the j-th row and g-th column of the matrix U; the matrix the matrix The matrix Q and the matrix P are intermediate products obtained in the optimization process of the network model, which respectively represent: the reconstructed feature matrix, the reconstructed adjacency matrix, the target distribution matrix of the nodes, and the ideal target distribution matrix of the nodes; λ1, λ2, λ3, α, β, θ, denote the model parameters specified by humans; Θ denotes the trainable parameters in the entire graph convolutional neural network model; ||·||F F denotes the Frobenius norm; Tr represents the sum of the diagonal elements of a matrix.

[0057] As an improvement of the above method, the step of dividing each node in the attribute graph into the cluster with the largest membership degree is specifically: traversing all rows of the membership matrix, finding the class with the largest element value in each row and dividing the node into the class until all nodes are divided; if there is a class without containing any node, the class is removed.

[0058] The application further provides an attribute graph clustering system, which is realized based on any of the above methods, and the system comprises:

[0059] a model training module, configured to train an attribute graph clustering model; and

[0060] a clustering implementation module, configured to input an attribute graph according to the trained attribute graph clustering model, output a membership matrix, and divide each node in the attribute graph into the cluster with the largest membership degree.

[0061] As an improvement of the above system, the model training module comprises:

[0062] a graph information integration submodule, configured to construct an attribute graph adjacency matrix and a feature matrix;

[0063] a data preprocessing submodule, configured to perform normalization processing on the adjacency matrix to obtain an attribute correlation degree matrix;

[0064] a network model construction submodule, configured to construct an attribute graph clustering model; and

[0065] a model optimization submodule, configured to optimize attribute graph clustering model parameters.

[0066] As an improvement of the above system, the system further comprises:

[0067] a result display module, configured to display the clustering result obtained by the clustering implementation module; according to the result obtained by the clustering implementation module, each class is taken as a row, the nodes in the class are taken as elements in the row, and all classes are processed into a text file for output display.

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

[0069] The attribute graph clustering method disclosed by the application solves the defects of the prior art in attribute graph clustering from the following aspects: in the algorithm design process, a fuzzy-based clustering target is fused into a graph convolution network to complete an attribute graph clustering task, a loss function constructed by the graph convolution network model is optimized, and the accuracy of attribute graph clustering is improved. BRIEF DESCRIPTION OF DRAWINGS

[0070] Figure 1 Fig. 1 shows a logic structure diagram of the attribute graph clustering method. DETAILED DESCRIPTION

[0071] The technical solutions of the present application will be described in detail below with reference to the accompanying drawings.

[0072] The present application provides an attribute graph clustering method, which comprises:

[0073] Step one, preprocessing data in a social network, specifically, constructing an adjacency matrix of the attribute graph according to the set of all nodes in the attribute graph and the set of edges between two nodes, and constructing a feature matrix of the attribute graph according to the set of all attributes associated with the nodes;

[0074] First step, constructing graph-related information. According to the set of all nodes V = {v i}(1≤i≤n V ), the set of all edges E = {e ij}, the adjacency matrix A of the attribute graph is constructed, v i represents the ith node, n V represents the number of nodes, and e ij represents the edge connecting the ith node and the jth node. According to the set of all attributes associated with the nodes Λ = {Λ m}(1≤m≤n Λ ), the feature matrix X of the attribute graph is constructed, Λ m represents the mth attribute.

[0075] Second step, storing graph-related information. The adjacency matrix A and the feature matrix X obtained in the first step are stored.

[0076] Step two, normalizing the adjacency matrix of the attribute graph obtained in step one to obtain a normalized adjacency matrix; calculating the attribute correlation degree between each pair of nodes in the attribute graph by applying statistical knowledge according to the adjacency matrix and the feature matrix of the attribute graph obtained in step one, and constructing a node attribute correlation degree matrix;

[0077] First step, normalizing the adjacency matrix A to obtain a normalized adjacency matrix denoted as The specific normalization method is as follows:

[0078]

[0079] In the above formula, I represents a unit matrix with the same dimension as A, and D represents the degree matrix of (A+I), whose diagonal elements are

[0080] Second step, obtaining the attribute correlation degree matrix. The specific method for calculating the attribute correlation degree matrix is as follows:

[0081] 2-1 First, calculate the attribute correlation degree between nodes by the cosine similarity method:

[0082]

[0083] where x im represents the m-th attribute value of the i-th node; x jm represents the m-th attribute value of the j-th node.

[0084] 2-2 Obtain the final attribute correlation degree through the adjacency between nodes v i and v j .

[0085] r(v i ,v j ) = a ij x r(v i ,v j ) (3)

[0086] 2-3 Obtain the attribute correlation degree matrix R according to the attribute correlation degree between nodes, where the i-th row and the j-th column of the matrix R r ij = r(v i ,v j ).

[0087] Step three, based on the feature matrix of the attribute graph obtained in step one, based on the normalized adjacency matrix obtained in step two and the node attribute correlation degree matrix, obtain the membership degree matrix, and construct the loss function about the membership degree matrix.

[0088] First step, define the number of clusters k and the maximum number of layers L of the graph convolution network;

[0089] Second step, construct the graph convolution encoding mode as:

[0090] H l+1 = σ(Ξ l H l W l ) (4)

[0091] In the above formula, l increases from 0 to L, L represents the number of layers of the graph convolutional neural network, H l is the representation matrix of all nodes in the l-th layer of the graph convolutional network, when l = 0, H l = X (only when l = 0). W l represents the trainable parameters in the l-th layer of the graph convolutional network, σ(·) represents the relu activation function, Ξ l represents the attention coefficient matrix in the l-th layer of the graph convolutional network, which can measure the importance between nodes and their neighbor nodes. For the calculation of Ξ l , first, the correlation matrix M l between nodes is calculated by using the attention mechanism, and the calculation method is as follows:

[0092]

[0093] In the above formula, and represent trainable parameters with the dimension of 1x n V , and represents a broadcast element-wise multiplication operation. The inter-node correlation matrix M l is obtained, and then normalized to obtain the final attention coefficient matrix Ξ l . Specifically, the calculation method of is as follows:

[0094]

[0095] Where N i represents a set of all neighbor nodes of node i; represents the jth column element in the i th row of the matrix Ξ l ; and represents the jth column element in the i th row of the matrix M l ; and represents the tth column element in the i th row of the matrix M l .

[0096] Third, obtain the representation matrix of all nodes. According to the graph convolution encoding method in the first step, when the number of graph convolution network layers reaches the maximum set layer, i.e. l = L, the representation matrix H l of all nodes is obtained. The final node representation matrix is also denoted as H, i.e. H = H l (holds only when l = L).

[0097] Fourth, obtain the reconstructed adjacency matrix According to the representation matrix H of the node obtained in the second step, the reconstructed adjacency matrix is calculated. The calculation method is as follows:

[0098]

[0099] In the above formula, h i and h j represent the representation vectors of node i and node j in the node representation matrix H, respectively.

[0100] Fifth, construct the graph convolution decoding method as follows:

[0101]

[0102] In the above formula, l decreases from L to 0, and when l = L, (holds only when l = L). Ξ l and W lcorresponding to Ξ l and W l .

[0103] Step 6, obtain the reconstructed feature matrix According to the graph convolution decoding method in Step 4, when l = 0, the reconstructed feature matrix is obtained That is (holds only when l = 0).

[0104] Step 7, obtain the target distribution matrix Q of the nodes, which is solved in the following way:

[0105]

[0106] where q if represents the element in the i-th row and the f-th column of the target distribution matrix Q; μ f represents the representation vector of the f-th cluster center; k represents the number of cluster centers; and ||·|| represents the modulus of a vector.

[0107] Step 8, obtain the ideal target distribution matrix P of the nodes, which is solved in the following way:

[0108]

[0109] where p if represents the element in the i-th row and the f-th column of the ideal target distribution matrix P

[0110] Step 9, obtain the membership matrix U, which is solved in the following way:

[0111]

[0112] where u if represents the element in the i-th row and the f-th column of the membership matrix;

[0113] The loss function used by the attribute graph clustering model is as follows:

[0114]

[0115] where the matrix A and the matrix X are the adjacency matrix and the feature matrix described in Step 1, the matrix R is the attribute correlation strength matrix described in Step 4, and the matrix U is the membership matrix described in Step 5. The element in the matrix S represents the inconsistency of node i and other nodes in cluster f, n V represents the number of nodes in the graph, k represents the number of clusters, a ij represents the element in the i-th row and the j-th column of the adjacency matrix A, u jg represents the element in the j-th row and the g-th column of the matrix U. The matrix Matrix The matrix Q and the matrix P are intermediate products obtained in the network model optimization process, and they respectively represent the following meanings: reconstructed feature matrix, reconstructed adjacency matrix, target distribution matrix of nodes, and ideal target distribution matrix of nodes. λ1, λ2, λ3, λ4, α, β, θ, are artificially specified model parameters. Θ represents the trainable parameters in the entire graph convolution network model; ||·||F F represents the Frobenius norm; and Tr represents the sum of diagonal elements of a matrix.

[0116] Step four, input model parameters, construct a graph convolution network model, and optimize the loss function constructed in step three to obtain an optimal membership matrix;

[0117] The first step is to input the step adjacency matrix A and the feature matrix X, the normalized adjacency matrix and the attribute correlation matrix R, and input the related parameters λ1, λ2, λ3, λ4, α, β, θ,

[0118] The second step is to obtain the intermediate products Q and P of the network model and the final output U of the network model according to the network model constructed in step five.

[0119] The third step is to calculate the loss value of the network according to the loss function.

[0120] The fourth step is to update all trainable parameters in the network by back propagation according to the loss value obtained in the third step.

[0121] The fifth step is to obtain the final clustering result until the loss function converges, and U is used as the final output of the network model.

[0122] Step five, according to the optimal membership matrix obtained in step four, all nodes are divided into various classes to obtain the final clustering result.

[0123] By traversing all rows of the matrix U, the class with the maximum element value in each row u i is found, and the node i is divided into the class, until all nodes are divided. Subsequently, if there is a class that does not contain any node, the class is removed.

[0124] The application also provides an attribute graph clustering system, which comprises a model training module, a clustering implementation module, and a result display module.

[0125] The model training module is used for training an attribute graph clustering model. The attribute graph clustering model of the application is a graph convolution neural network model.

[0126] ​The model training module comprises a graph information integration submodule, a data preprocessing submodule, a network model construction submodule and a model optimization module.

[0127] The logical structure is as shown in Figure 1 The method mainly comprises the following six parts: a graph information integration module, a data preprocessing module, a network model construction module, a model optimization module, a clustering implementation module and a result display module.

[0128] The graph information integration submodule is configured to construct an adjacency matrix and a feature matrix of the attribute graph; the specific implementation process comprises:

[0129] Firstly, the graph-related information is constructed. According to the set V = {v i}(1≤i≤n V ) of all nodes in the attribute graph and the set E = {e ij} of all edges, the adjacency matrix A of the attribute graph is constructed. According to the set Λ = {Λ m}(1≤m≤n Λ ) of all attributes associated with the nodes, Λ m represents the mth attribute, the feature matrix X of the attribute graph is constructed.

[0130] Secondly, the graph-related information is stored. The adjacency matrix A and the feature matrix X obtained in the first step are stored.

[0131] The data preprocessing submodule is configured to normalize the adjacency matrix to obtain an attribute correlation matrix. The specific implementation process comprises:

[0132] Firstly, the adjacency matrix A is normalized to obtain a normalized adjacency matrix denoted as The specific normalization method is as follows:

[0133]

[0134] In the above formula, I represents a unit matrix with the same dimension as A, and D represents the degree matrix of (A+I), the elements on the diagonal line of which are

[0135] Secondly, the attribute correlation matrix is obtained. The specific method for calculating the attribute correlation matrix is as follows:

[0136] 2-1 The attribute correlation between nodes is initially calculated by the cosine similarity method:

[0137]

[0138] Wherein, x im represents the mth attribute value of the ith node; x jm represents the mth attribute value of the jth node;

[0139] 2-2 Obtain the final attribute correlation degree through the adjacency between nodes v i and v j :

[0140] r(v i ,v j )=a ij ×r(v i ,v j ) (3)

[0141] 2-3 Obtain the attribute correlation degree matrix R according to the attribute correlation degree between nodes, wherein r ij =r(v i ,v j )。

[0142] The network model construction submodule is configured to construct an attribute graph clustering model. The specific implementation process includes:

[0143] First, define the number of clusters k and the maximum number of layers L of the graph convolution network;

[0144] Second, construct the graph convolution encoding mode as:

[0145] H l+1 =σ(Ξ l H l W l ) (4)

[0146] In the above formula, l increases from 0 to L, H l is the representation matrix of all nodes in the l-th layer of the graph convolution network, and H l =X (only when l=0). W l represents trainable parameters in the l-th layer of the graph convolution network, σ(·) represents a relu activation function, and Ξ l represents attention coefficient matrices that can measure the importance between nodes and their neighbor nodes in the l-th layer of the graph convolution network. For the calculation of Ξ l , first, the correlation matrix M l between nodes is calculated using the attention mechanism, and the calculation method is as follows:

[0147]

[0148] In the above formula, and represent trainable parameters with a dimension of 1×n V , and ⊙ represents a broadcast element-wise multiplication operation. After obtaining the correlation matrix M l between nodes, the final attention coefficient matrix Ξl In particular, for The calculation method is as follows:

[0149]

[0150] Where N i represents the set of all neighbor nodes of node i; represents the matrix Ξ l The element in the i-th row and the j-th column; represents the matrix M l The element in the i-th row and the j-th column; represents M l The element in the i-th row and the t-th column.

[0151] Third, obtain the representation matrix of all nodes. According to the graph convolution encoding method in the first step, when the number of graph convolution network layers reaches the maximum set layer, i.e. l=L, the representation matrix H l of all nodes is obtained. Also, the final node representation matrix is denoted as H, i.e. H=H l (holds only when l=L).

[0152] Fourth, obtain the reconstructed adjacency matrix According to the node representation matrix H obtained in the second step, the reconstructed adjacency matrix is calculated. The calculation method is as follows:

[0153]

[0154] In the above formula, h i and h j represent the representation vectors of node i and node j in the node representation matrix H, respectively.

[0155] Fifth, construct the graph convolution decoding method as follows:

[0156]

[0157] In the above formula, l decreases from L to 0, and when l=L, (holds only when l=L). Ξ l and W l correspond to Ξ l and W l in the graph convolution encoding process, respectively.

[0158] Sixth, obtain the reconstructed feature matrix According to the graph convolution decoding method in the fourth step, when l=0, the reconstructed feature matrix is obtained, i.e. (holds only when l=0).

[0159] Step 7, obtain the target distribution matrix Q of the node, which is solved in the following way:

[0160]

[0161] where q if represents the element in the i-th row and the f-th column of the target distribution matrix Q; μ f represents the representation vector of the f-th cluster center; k represents the number of cluster centers; ||·|| represents the norm of the vector.

[0162] Step 8, obtain the ideal target distribution matrix P of the node, which is solved in the following way:

[0163]

[0164] where p if represents the element in the i-th row and the f-th column of the ideal target distribution matrix P.

[0165] Step 9, obtain the membership matrix U, which is solved in the following way:

[0166]

[0167] where u if represents the element in the i-th row and the f-th column of the membership matrix;

[0168] The loss function used by the attribute graph clustering model is as follows:

[0169]

[0170] where matrix A and matrix X are the adjacency matrix and the feature matrix described in step 1, matrix R is the attribute correlation strength matrix described in step 4, and matrix U is the membership matrix. The element in matrix S is which represents the inconsistency of node i with other nodes in cluster f, n V represents the number of nodes in the graph, k represents the number of clusters, a ij represents the element in the i-th row and the j-th column of the adjacency matrix A, u jg represents the element in the j-th row and the g-th column of matrix U. Matrix Matrix Matrix Q and matrix P are intermediate products obtained in the optimization process of the network model, which respectively represent the reconstructed feature matrix, the reconstructed adjacency matrix, the target distribution matrix of the node, and the ideal target distribution matrix of the node. λ1, λ2, λ3, λ4, α, β, θ, are model parameters specified by humans. Θ represents the trainable parameters in the entire graph convolutional network model; ||·|| Fdenotes the Frobenius norm; Tr denotes the sum of the diagonal elements of a matrix. The method can make the clustered attribute graph satisfy that the nodes in the same class are not only closely connected, but also closely related in attributes.

[0171] The model optimization submodule is configured to optimize the attribute graph clustering model parameters. The specific implementation process includes:

[0172] In the first step, the adjacency matrix A and the feature matrix X stored in the input module 1 and the normalized adjacency matrix and the attribute correlation matrix R obtained in the input module 2 are input, and the related parameters λ1, λ2, λ3, λ4, α, β, θ,

[0173] In the second step, the intermediate product Q and P of the network model and the final output U of the network are obtained according to the network model constructed by the network model construction submodule.

[0174] In the third step, the loss value of the network is calculated according to the loss function.

[0175] In the fourth step, all the trainable parameters in the network are updated by back propagation according to the loss value.

[0176] In the fifth step, until the loss function converges, the U at this time is taken as the final output of the network model.

[0177] The clustering implementation module is configured to input an attribute graph according to the trained attribute graph clustering model, output a membership matrix, and divide each node in the attribute graph into a cluster with the largest membership. The specific implementation process includes:

[0178] An attribute graph is input into the trained graph convolutional neural network, and each node in the attribute graph is divided into a cluster with the largest membership according to the output membership matrix.

[0179] This module finds the class with the largest element value in each row u i of the matrix U by traversing all rows of the matrix U, and divides the node i into the class, until all nodes are divided. Subsequently, if there is a class without containing any node, the class is removed. Finally, the remaining classes are stored for use by the result display module.

[0180] The result display module is configured to display the clustering result obtained by the clustering implementation module.

[0181] According to the result obtained by the clustering implementation module, this module takes each class as a row, takes the nodes in the class as elements in the row, and processes all classes into a text file for output display.

[0182] ​The application can also provide a computer device, comprising at least one processor, a memory, at least one network interface and a user interface. The components in the device are coupled together through a bus system. It can be understood that the bus system is used to realize the connection communication between the components. The bus system includes a data bus, a power bus, a control bus and a status signal bus in addition to the data bus.

[0183] The user interface can include a display, a keyboard or a pointing device, for example, a mouse, a trackball, a touchpad or a touch screen.

[0184] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM) or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM) and Direct Rambus RAM (DRRAM). The memory described herein is intended to include, without being limited to, these and any other suitable types of memory.

[0185] In some embodiments, the memory stores elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system and an application program.

[0186] The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application programs include various application programs, such as a media player (Media Player), a browser (Browser), and the like, for implementing various application services. The program for implementing the method of the embodiments of the present disclosure can be included in the application programs.

[0187] In the above-described embodiments, the processor can be configured to, by invoking the program or the instruction stored in the memory, specifically, the program or the instruction stored in the application program:

[0188] perform the steps of the above-described method.

[0189] The above-described method can be applied to the processor or implemented by the processor. The processor can be an integrated circuit chip having a signal processing capability. In the implementation process, the steps of the above-described method can be completed by hardware integrated logic circuits in the processor or by the instructions in the form of software. The above-described processor can be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The above-described methods, steps and logical block diagrams can be implemented or executed by the above-described processor. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the above-described method in combination with the above-described disclosure can be directly embodied as a hardware code processor to execute, or a combination of hardware and software modules in the code processor to execute. The software module can be located in the random access memory, the flash memory, the read-only memory, the programmable read-only memory or the electrically erasable programmable memory, the register or other mature storage mediums in the art. The storage medium is located in the storage memory, and the processor reads the information in the storage memory to complete the steps of the above-described method in combination with the hardware.

[0190] It is understood that all the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or combination thereof. For a hardware implementation, the processing units can be implemented within one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSP Devices), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.

[0191] For a software implementation, the techniques described herein can be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes can be stored in memory units and executed by processors. The memory unit can be implemented within the processor or external to the processor.

[0192] The present application can also provide a non-transitory storage medium for storing a computer program. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented.

[0193] Finally, it should be noted that the above-mentioned embodiments are merely used to illustrate but not to limit the technical solutions of the present application. Although the present application has been described in detail with reference to the embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, and they should be covered within the scope of the claims of the present application.

Claims

1. An attribute graph clustering method, the method comprising: inputting an attribute graph into a trained attribute graph clustering model, outputting a membership matrix, dividing each node in the attribute graph into a cluster with the largest membership, thereby realizing clustering; treating each class as a row and the nodes therein as elements in the row, and outputting all classes as a text file for display; the attribute graph clustering model being a graph convolutional neural network model; the training process of the attribute graph clustering model comprising: constructing an adjacency matrix of the attribute graph according to a set of all nodes and a set of edges between two nodes in the attribute graph, and constructing a feature matrix of the attribute graph according to a set of all attributes associated with the nodes; constructing a normalized adjacency matrix and a node attribute correlation matrix; constructing a loss function for the membership matrix; constructing a graph convolutional neural network model and iteratively updating until the loss function converges; the training process of the attribute graph clustering model specifically comprising: Step 1: preprocessing attribute graph data of a social network: Based on the set of all nodes in the attribute graph The set of all edges Construct the adjacency matrix of the property graph , Indicates the first i 1 node Indicates the number of nodes. Indicates the first i The node and the first j Edges connecting nodes; based on the set of all attributes associated with a node. Construct the feature matrix of the attribute graph , Indicates the first m One attribute; Step 2: obtaining a normalized adjacency matrix according to the adjacency matrix of the attribute graph; constructing a node attribute correlation matrix according to the adjacency matrix and the feature matrix of the attribute graph; Step 3: obtaining a membership matrix based on the feature matrix, the normalized adjacency matrix and the node attribute correlation matrix of the attribute graph, and constructing a loss function for the membership matrix; Step 4: inputting model parameters, constructing a graph convolutional neural network model, optimizing the loss function, and obtaining an optimal membership matrix.

2. The method of claim 1, wherein, The normalized adjacency matrix obtained in Step 2 specifically comprises: An adjacency matrix The normalized adjacency matrix is obtained by normalization The specific normalization method is as follows: ; wherein denotes and identity matrix of the same dimension; denotes the degree matrix.

3. The method of claim 1, wherein, The node attribute correlation matrix constructed in Step 2 specifically comprises: The nodes are initially calculated using the cosine similarity method. and Attribute correlation between : ; wherein, represents the value of the i th attribute of the m th node; represents the value of the j th attribute of the m th node; By the adjacency between nodes and , the final attribute correlation degree is obtained : ; wherein denotes an adjacency matrix the first i the first j column element; Obtain the attribute correlation matrix based on the attribute correlation between nodes. ,matrix The Middle i Line number j Column nodes .

4. The method of claim 1, wherein, The membership matrix obtained in Step 3 specifically comprises: The graph convolutional encoding mode is constructed as follows: ; in, From 0 to Increasing, L This indicates the number of layers in a graph convolutional neural network; Are all nodes at the ? The representation matrix in a layered graph convolutional neural network, when hour, ; Indicates the first Trainable parameters in a layered graph convolutional neural network; express Activation function; Indicates the first Attention coefficient matrix in a layered graph convolutional neural network, which measures the importance of a node to its neighboring nodes; For the calculation of , firstly, the correlation matrix between nodes is calculated by using the attention mechanism , and the calculation method is: ; wherein, and denote trainable parameters of dimension denotes a broadcast element-wise multiplication operation; denotes a normalized adjacency matrix; the inter-node correlation matrix is obtained by normalizing the adjacency matrix :​ ; wherein, represents a set of all neighbor nodes of a node i . represents the matrix the element in the i-th row and the j-th column of the matrix i . j the element in the i-th row and the j-th column of the matrix . the element in the i-th row and the j-th column of the matrix i . j the element in the i-th row and the j-th column of the matrix . the element in the i-th row and the j-th column of the matrix i . t the element in the i-th row and the j-th column of the matrix According to the graph convolution coding mode, when the number of layers of the graph convolution network reaches the maximum number of layers set, that is, , the representation matrix of all nodes is obtained , and the final node representation matrix is denoted as , that is ; According to the representation matrix of all nodes , a reconstructed adjacency matrix is calculated : ; wherein, and represent the node representation matrix of nodes and nodes respectively; The graph convolutional decoding mode is constructed as follows: ; wherein, from decreases to 0 when , ; and correspond to and in the graph convolutional encoding process, respectively. According to the graph convolution decoding manner, when the reconstructed feature matrix is obtained, that is ; obtaining a target distribution matrix for the node : ; wherein, denotes a target distribution matrix the element in the i row and the f column; denotes a representation vector of the th cluster center; k denotes the number of cluster centers; denotes the norm of a vector; Obtaining a node ideal target distribution matrix : ; wherein represents an ideal target distribution matrix the first i the first f column element; obtaining a membership matrix : ; wherein, denotes the element in the membership matrix in the i-th row and the j-th column; i denotes the element in the membership matrix in the i-th row and the j-th column; f denotes the element in the membership matrix in the i-th row and the j-th column; .

5. The method of claim 1, wherein, The loss function constructed in Step 3 is as follows: ; wherein, denotes an adjacency matrix; denotes a feature matrix; denotes an attribute correlation strength matrix; denotes a membership matrix; matrix the element in , denotes a node inconsistency with other nodes on the cluster , denotes the number of nodes in the graph, denotes the number of clusters, denotes the element in the row and the i column of the adjacency matrix j , denotes the element in the row and the j column of the matrix g ; matrix , matrix , matrix and matrix are intermediate products obtained in the optimization process of the network model, which respectively represent: the reconstructed feature matrix, the reconstructed adjacency matrix, the target distribution matrix of the node and the ideal target distribution matrix of the node; denotes a model parameter specified by a person; denotes a trainable parameter in the entire graph convolutional neural network model; denotes the Frobenius norm; Tr represents the sum of the diagonal elements of a matrix.

6. The method of claim 1, wherein, The process of dividing each node in the attribute graph into a cluster with the largest membership specifically comprises: traversing all rows of the membership matrix, finding the class with the largest element value in each row, and dividing the node into the class, until all nodes are divided; if there is a class that does not contain any nodes, it is removed.

7. An attribute graph clustering system, implemented based on any of the methods of claims 1-6, characterized in that, The system comprises: a model training module for training an attribute graph clustering model; a clustering implementation module for inputting an attribute graph according to the trained attribute graph clustering model, outputting a membership matrix, dividing each node in the attribute graph into a cluster with the largest membership; and a result display module for displaying the clustering results obtained by the clustering implementation module; treating each class as a row and the nodes therein as elements in the row, and outputting all classes as a text file for display according to the results obtained by the clustering implementation module.

8. The attribute graph clustering system of claim 7, wherein, The model training module comprises: a graph information integration sub-module for constructing an attribute graph adjacency matrix and a feature matrix; a data preprocessing sub-module for normalizing the adjacency matrix to obtain an attribute correlation matrix; a network model construction sub-module for constructing an attribute graph clustering model; and a model optimization sub-module for optimizing the attribute graph clustering model parameters.

2. The attribute graph clustering method according to claim 1, wherein the attribute graph clustering model is a graph convolutional neural network model.

3. The attribute graph clustering method according to claim 1, wherein the training process of the attribute graph clustering model comprises: Step 1: preprocessing attribute graph data of a social network: Step 2: obtaining a normalized adjacency matrix according to the adjacency matrix of the attribute graph; constructing a node attribute correlation matrix according to the adjacency matrix and the feature matrix of the attribute graph; Step 3: obtaining a membership matrix based on the feature matrix, the normalized adjacency matrix and the node attribute correlation matrix of the attribute graph, and constructing a loss function for the membership matrix; Step 4: inputting model parameters, constructing a graph convolutional neural network model, optimizing the loss function, and obtaining an optimal membership matrix.

4. The attribute graph clustering method according to claim 3, wherein the normalized adjacency matrix obtained in Step 2 specifically comprises:

5. The attribute graph clustering method according to claim 3, wherein the node attribute correlation matrix constructed in Step 2 specifically comprises:

6. The attribute graph clustering method according to claim 3, wherein the membership matrix obtained in Step 3 specifically comprises:

7. The attribute graph clustering method according to claim 3, wherein the graph convolutional encoding mode is constructed as follows:

8. The attribute graph clustering method according to claim 3, wherein the graph convolutional decoding mode is constructed as follows:

9. The attribute graph clustering method according to claim 3, wherein the loss function constructed in Step 3 is as follows:

10. The attribute graph clustering method according to claim 1, wherein the process of dividing each node in the attribute graph into a cluster with the largest membership specifically comprises: traversing all rows of the membership matrix, finding the class with the largest element value in each row, and dividing the node into the class, until all nodes are divided; if there is a class that does not contain any nodes, it is removed.

11. A system for attribute graph clustering, the system comprising: a model training module for training an attribute graph clustering model; a clustering implementation module for inputting an attribute graph according to the trained attribute graph clustering model, outputting a membership matrix, dividing each node in the attribute graph into a cluster with the largest membership; and a result display module for displaying the clustering results obtained by the clustering implementation module; treating each class as a row and the nodes therein as elements in the row, and outputting all classes as a text file for display according to the results obtained by the clustering implementation module.

12. The system for attribute graph clustering according to claim 11, wherein the model training module comprises: a graph information integration sub-module for constructing an attribute graph adjacency matrix and a feature matrix; a data preprocessing sub-module for normalizing the adjacency matrix to obtain an attribute correlation matrix; a network model construction sub-module for constructing an attribute graph clustering model; and a model optimization sub-module for optimizing the attribute graph clustering model parameters.