A method for community discovery in directed weighted signed social networks
By using graph convolutional networks and status theory and balance theory design methods in directed weighted social networks, the problem that existing technology cannot effectively mine the complex structural information of directed weighted social networks has been solved, and the creation of high-quality communities has been achieved. Discovery and acquisition of node representations.
Patent Information
- Application Number
- CN202310452844.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-04-24
AI Technical Summary
Existing symbolic social network community discovery methods cannot fully mine the complex structural information of directed and weighted social networks, and are mostly suitable for undirected and unweighted symbolic social networks and cannot be effectively applied to directed and weighted social networks.
Using a method based on graph convolutional network, by constructing a directed weighted graph, using status theory and balance theory to design a neighbor node aggregation strategy, and combining the symbolic graph structure loss function and the modularity maximization loss function to train a weighted symbolic graph convolutional network. Obtain node representations that preserve community structure.
It realizes full utilization of deep semantic information and structural information in directed and weighted social networks, obtains high-quality node representation, and simplifies the discovery process of high-quality communities.
Smart Images

Figure CN116563049B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of social network data analysis, and in particular to a directed weighted symbolic social network community discovery method. Background Art
[0002] There are various social relationships between users in social networks, such as friends, following relationships, blacklisting, etc. These social relationships have directions and can measure strength. For example, following relationships can be unidirectional and the degree of attention can be strong or weak. These characteristics of social networks make it natural to represent them as directed weighted symbolic social networks.
[0003] Community discovery in symbolic social networks is an important research issue. Symbolic social networks with close connections between member nodes within the same community can be used to detect similar user groups. At present, some representative methods have been proposed for community discovery in symbolic social networks, including s-core based on k-core analysis, ReSNMF and SPOCD methods based on non-negative matrix factorization, and LPOCSIN method based on clustering coefficient. In general, the existing methods have the following problems: shallow models, such as non-negative matrix factorization, are generally used, which cannot fully exploit the complex structural information contained in symbolic social networks; they are only applicable to undirected and unweighted symbolic social networks, and cannot be applied to directed and weighted symbolic social networks. In summary, the existing methods for community discovery in symbolic social networks still have room for improvement, and a more effective method needs to be designed. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a directed weighted symbolic social network community discovery method for fully mining and utilizing the complex structural information contained in the symbolic social network.
[0005] An aspect of an embodiment of the present invention provides a directed weighted symbolic social network community discovery method, comprising:
[0006] Constructing a directed weighted graph according to a set of nodes and social relationships between the nodes; each node of the directed weighted graph corresponds to a user, and the nodes are connected by directed edges;
[0007] Determine the set of neighbor nodes based on the directed edges between nodes;
[0008] The neighbor node set is input into a trained weighted symbolic graph convolutional network to obtain node representations that correspond to social relationships between neighbor nodes and retain community structure.
[0009] Optionally, the nodes are connected via directed edges, including:
[0010] Nodes corresponding to users with positive social relationships are connected via a first directed edge, and nodes corresponding to users with negative social relationships are connected via a second directed edge;
[0011] The first directed edge is used as a positive edge, and the second directed edge is used as a negative edge.
[0012] Optionally, determining a set of neighbor nodes according to directed edges between nodes includes:
[0013] The set of neighbor nodes is determined based on the direction and number of directed edges between nodes.
[0014] Optionally, determining the neighbor node set according to the directions and quantities of directed edges between nodes includes:
[0015] The node pointed to by the positive edge is taken as the first positive node, and a first positive relationship neighbor node set connected to the first positive node through the positive edge is determined; the node pointed to by the negative edge is taken as the first negative node, and a first negative relationship neighbor node set connected to the first negative node through the negative edge is determined;
[0016] For any three nodes connected by a triangle structure, three nodes without negative edge connections are determined and combined into a second positive relationship neighbor node set; three nodes with an even number of negative edge connections are determined and combined into a second negative relationship neighbor node set.
[0017] Optionally, the loss function of the weighted signed graph convolutional network includes a signed graph structure loss function and a modularity maximization loss function;
[0018] The signed graph structure loss function is used to make the node pairs connected by positive edges close to each other in the representation space, and make the node pairs connected by negative edges far away from each other;
[0019] The modularity maximization loss function is used to ensure that the node representation output by the weighted symbolic graph convolutional network retains the community structure.
[0020] Optionally, the training process of the weighted signed graph convolutional network includes:
[0021] The difference between the symbolic graph structure loss function and the modularity maximization loss function is used as an objective function;
[0022] Training the weighted signed graph convolutional network according to the objective function, a preset number of training iterations, the number of network layers of the weighted signed graph convolutional network, and the dimensions of each network layer;
[0023] Among them, the dimension of the last layer of the network is set to the number of communities.
[0024] Optionally, the step of inputting the neighbor node set into a trained weighted signed graph convolutional network to obtain node representations between neighbor nodes that correspond to social relationships and retain community structure includes:
[0025] When there is a layer of the weighted signed graph convolutional network, a positive representation of the set of neighbor nodes is obtained through the weighted signed graph convolutional network according to the connection weight of the positive edge; a negative representation of the set of neighbor nodes is obtained through the weighted signed graph convolutional network according to the connection weight of the negative edge; the positive representation and the negative representation are used as the node representation;
[0026] When the weighted signed graph convolutional network has two or more layers, the positive representation of the neighbor node set is obtained through the weighted signed graph convolutional network according to the connection weight of the positive edge; the negative representation of the neighbor node set is obtained through the weighted signed graph convolutional network according to the connection weight of the negative edge; the positive representation and the negative representation are connected and passed through the multilayer perceptron network of the last layer of the weighted signed graph convolutional network, and the final representation obtained is used as the node representation.
[0027] Another aspect of the embodiment of the present invention further provides a directed weighted symbolic social network community discovery device, comprising:
[0028] A directed weighted graph construction unit, used to construct a directed weighted graph according to a set of nodes and social relationships between the nodes; each node of the directed weighted graph corresponds to a user, and the nodes are connected by directed edges;
[0029] A node set determination unit, used to determine a neighbor node set according to directed edges between nodes;
[0030] The node representation acquisition unit is used to input the neighbor node set into a trained weighted symbolic graph convolutional network to obtain node representations that correspond to social relationships between neighbor nodes and retain community structure.
[0031] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;
[0032] The memory is used to store programs;
[0033] The processor executes the program to implement any of the above methods.
[0034] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement any of the above methods.
[0035] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.
[0036] The present invention is based on the framework of graph convolutional network, determines the set of neighbor nodes through the directed edges between nodes, and then obtains the node representation. Moreover, the present invention can make the node representation retain the community structure through the trained weighted symbolic graph convolutional network, and can be directly used to extract community division information. The present invention can not only obtain high-quality node representation by fully utilizing the deep semantic information and structural information of the symbolic social network through the deep learning of the weighted symbolic graph convolutional network, but also provides an end-to-end directed weighted symbolic social network community discovery method based on graph convolutional network, which can more simply and effectively discover high-quality communities. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A flowchart of a directed weighted symbolic social network community discovery method provided by an embodiment of the present invention;
[0039] Figure 2 A motifs structure diagram provided by an embodiment of the present invention;
[0040] Figure 3 An example diagram of a triangular structure social relationship provided by an embodiment of the present invention;
[0041] Figure 4 An example diagram of a weighted symbolic social network provided by an embodiment of the present invention;
[0042] Figure 5 An example flow chart of directed weighted symbolic social network community discovery provided by an embodiment of the present invention;
[0043] Figure 6 An example diagram of a weighted symbolic social network community discovery result provided by an embodiment of the present invention;
[0044] Figure 7 A structural block diagram of a directed weighted symbolic social network community discovery device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0046] Reference Figure 1 The embodiment of the present invention provides a directed weighted symbolic social network community discovery method, which specifically includes the following steps:
[0047] S100: constructing a directed weighted graph according to a set of nodes and social relationships between the nodes; each node of the directed weighted graph corresponds to a user, and the nodes are connected by directed edges.
[0048] Specifically, the present invention can formally represent a directed weighted symbolic social network. The symbolic social network is formally represented as a directed weighted graph where V = {v1, v2, ..., v n} represents the user node set, ε + ={e ij} represents the positive edge set between user nodes with positive social relations, and ε - ={e pq} represents the negative edge set between user nodes with negative social relationships, is the weight matrix, W ij For edge e ij Among them, positive social relations may include friends or following relations, and negative social relations may include deletion or blacklisting, etc.
[0049] S110: Determine a set of neighbor nodes according to directed edges between nodes.
[0050] Specifically, in order to aggregate high-quality neighbor node information to obtain node representation, the present invention designs a neighbor node selection strategy based on social psychology status theory and balance theory.
[0051] First, the status theory holds that in a social network, a node i To node v j A positive or negative edge means that the target v j Possessing a ratio i Higher or lower status. Combined with the status theory, the present invention selects neighbor nodes with high status for information aggregation. Figure 2 , the embodiment of the present invention provides a motifs structure diagram. Specifically, firstly design Figure 2 The motifs structure shown in the figure is used to construct the node υ i The motif m1 node collection That is in line with Figure 2 (a) Structure υ j That is v i motif m1 node, construct motif m2 node set That is in line with Figure 2 (b) The structure of v j That is v i The motif m2 node.
[0052] Secondly, the balance theory holds that if there are an even number of negative edges or no negative edges in a triangle structure of a social network, the triangle structure is considered balanced. Figure 3 In the figure, the two triangular structures in the dotted box on the left are balanced structures, while the two triangular structures on the right are unbalanced structures.
[0053] Based on the balanced structure mode, the following calculation node v is designed i The positive relationship neighbor set P with a distance of l l (i) With the negative relationship neighbor set N l (i) Rules:
[0054] When l = 1:
[0055]
[0056]
[0057] When l>1:
[0058]
[0059]
[0060] S120: Inputting the neighbor node set into a trained weighted signed graph convolutional network to obtain node representations that correspond to social relationships between neighbor nodes and retain community structure.
[0061] Specifically, the weighted signed graph convolutional network of the present invention is first described.
[0062] First, we construct a community discovery-oriented loss function. The loss function consists of two parts: symbolic graph structure loss function And the modularity maximization loss function The role of is to train the weighted signed graph convolutional network so that the node pairs with positive edges are close to each other in the representation space, while the node pairs with negative edges are far away from each other. Its design is as follows:
[0063]
[0064] in Represents the source node, target node, and the set of positive edge (+) and no edge (?) relationships between nodes. Represents the source node, target node, and the set of negative edges (-) and no edge (?) relationships between nodes. The role of is to train the weighted symbol graph convolutional network so that the final representation of the output can retain the community structure at the same time, so that it can be directly used for community discovery. Its design is as follows:
[0065]
[0066] in matrix, Represents the node v i is the sum of the weights of the positive edges (negative edges) of the source node (destination node), and Z is composed of the final representation vector of each node. and Get the final loss function
[0067] Next, the process of training a weighted signed graph convolutional network is described.
[0068] Specifically, As the objective function, we first set the number of epochs, the number of layers and dimensions of each layer of the symbolic graph convolutional network, and the dimension of the last layer of the MLP to the number of communities, and then Iteratively train the symbolic graph convolutional network model to obtain the final representation of the node. When the model converges, it can be Determine the node v i The community number c.
[0069] Finally, the node representation is obtained according to the trained weighted symbolic graph convolutional network. The specific process is as follows:
[0070] Assume that the number of weighted signed graph convolutional network layers is l, let node v i The initialization node is represented as Among them, d in is the input feature dimension, and the positive neighbor set P of each node obtained in step S110 l (i) With the negative relationship neighbor set N i (i) We design the following weighted signed graph convolution function to learn v i Positive representation and negative representation
[0071] When l = 1:
[0072]
[0073]
[0074] where σ(·) is the Tanh activation function, ( d out is the feature dimension of the output) is the learnable neural network parameter matrix, Represents node v i and v j The weight of the positive (negative) connection edge, Indicates that v i The sum of the weights of all positive (negative) connecting edges, || is the characteristic vector connection operator.
[0075] When l>1:
[0076]
[0077]
[0078] in is the learnable neural network parameter matrix. Finally, the node v i Positive representation and negative representation Connect them and pass through a multi-layer perceptron network MLP to obtain the final representation z i :
[0079]
[0080] In view of the problems existing in the existing symbolic social network community discovery methods, the present invention proposes a method based on graph convolutional networks. Based on the graph convolutional network framework, the present invention first obtains node representation by designing a neighborhood node aggregation strategy by introducing status theory and balance theory, and then trains the graph convolutional network by combining the symbolic social network structure loss and the symbolic network modularity maximization loss, so that the node representation can retain the community structure and can be directly used to extract community division information. This method can not only fully utilize the deep semantic information and structural information of symbolic social networks through deep learning models to obtain high-quality node representations, but also is an end-to-end directed weighted symbolic social network community discovery method based on graph convolutional networks, which can more simply and effectively discover high-quality communities.
[0081] In order to describe the present invention in more detail, the practical application process of the present invention will be described below with specific examples.
[0082] Reference Figure 4, an embodiment of the present invention provides an example graph of a weighted signed social network, wherein edge 1 from node 6 to node 0, edge 2 from node 2 to node 4, and edge 3 from node 5 to node 3 are three negative edges representing negative social relationships, and the remaining edges are positive edges representing positive social relationships.
[0083] Reference Figure 5 , the embodiment of the present invention may include the following steps:
[0084] Step 1: Formalize the directed weighted signed social network. The formal representation of the signed social network example is The node set is V = (v0, v1, v2, v3, v4, v5, v6), and the positive edge set ε + =(e 01 , e 03 , e 10 , e 12 , e 23 , e 31 , e 45 , e 56 , e 64 ), the negative edge set ε - =(e 24 , e 53 , e 60 ), weight matrix for:
[0085]
[0086] Step 2: Select neighbor aggregation nodes. According to the two defined motifs, first obtain the motifm1 and m2 node sets of each node respectively: Then, according to the balanced structural relationship, the positive relationship neighbor set P with a distance of l is calculated l (i) With the negative relationship neighbor set N l (i)
[0087] When l = 1:
[0088] P 1 (0) = (v1, v3), P 1 (1) = (v0, v2), P 1 (2) = (v3), P 1 (3) = (v1), P 1 (4) = (v5), P 1 (5) = (v6), P 1 (6) = (v4).
[0089] N 1 (0) = (υ6), N1 (3) = (v5), N 1 (4) = (v2).
[0090] When l = 2:
[0091] P 2 (0) = (υ1, v2), P 2 (1) = (v3), P 2 (2) = (v1), P 2 (3) = (v0, v2), P 2 (4) = (v6), P 2 (5) = (v4), P 2 (6) = (v5).
[0092] N 2 (0) = (v4, v5), N 2 (1) = (v6), N 2 (2) = (v5), N 2 (3) = (v6), N 2 (4) = (v3), N 2 (6) = (v2).
[0093] Step 3: Design a weighted signed graph convolutional network. According to the obtained set of neighbor nodes with positive and negative relationships of each node, the number of layers of the weighted signed graph convolutional network is set to l = 2, and the node v i The initialization representation is The node positive representation is obtained based on the following aggregation function and negative representation
[0094] When l = 1:
[0095]
[0096]
[0097] When l = 2:
[0098]
[0099]
[0100] Finally, the node v i Positive representation and negative representation Connect them and pass through a multi-layer perceptron network MLP to obtain the final representation z i :
[0101]
[0102] Step 4: Construct a community discovery-oriented loss function. The total loss function is in:
[0103]
[0104]
[0105] Step 5: Train the weighted signed graph convolutional network and extract the community discovery results. Set the number of iterations to 80, the dimension of the hidden layer of the weighted signed graph convolutional network, i.e., the first layer, is 4, and the second layer is the output layer with a dimension of 2, i.e., the number of communities is 2. After the iteration converges, the positive representation of the first layer is obtained. and negative representation and the positive representation of layer 2 and negative representation They are:
[0106]
[0107]
[0108]
[0109] Finally, the positive and negative representations are concatenated and processed by MLP to obtain the final representation Z:
[0110]
[0111] The community affiliation of each node can be determined based on the corresponding representation vector of each node in Z. For example, for node v0, its corresponding representation vector is [0.2109, 0.5211], and the value of the second dimension is the largest, so node v0 can be classified into community C2. In this way, the community division results can be obtained as follows: C1 = {v4, v5, v6} and C2 = {v0, v1, v2, v3}.
[0112] Reference Figure 6 , an embodiment of the present invention provides an example graph of weighted symbolic social network community discovery results. Among them, edge 1 from node 6 to node 0, edge 2 from node 2 to node 4, and edge 3 from node 5 to node 3 are three negative edges representing negative social relationships, and the remaining edges are positive edges representing positive social relationships.
[0113] Compared with the existing symbolic social network community discovery technology, the beneficial effects of the embodiments of the present invention are: through the weighted symbolic graph convolutional network deep learning model, the deep semantic information and structural information of the symbolic social network are fully utilized to obtain high-quality node representation, and the modularity maximization loss is driven so that the node representation can retain the community structure information, thereby being able to discover high-quality communities more simply and effectively in an end-to-end manner.
[0114] Reference Figure 7 The embodiment of the present invention provides a directed weighted symbolic social network community discovery device, comprising:
[0115] A directed weighted graph construction unit, used to construct a directed weighted graph according to a set of nodes and social relationships between the nodes; each node of the directed weighted graph corresponds to a user, and the nodes are connected by directed edges;
[0116] A node set determination unit, used to determine a neighbor node set according to directed edges between nodes;
[0117] The node representation acquisition unit is used to input the neighbor node set into a trained weighted symbolic graph convolutional network to obtain node representations that correspond to social relationships between neighbor nodes and retain community structure.
[0118] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes Figure 1 The method shown.
[0119] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0120] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0121] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0122] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0123] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0124] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0125] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0126] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0127] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A method for discovering communities in directed weighted signed social networks. It is characterized in that include: Constructing a directed weighted graph according to a set of nodes and social relationships between the nodes; each node of the directed weighted graph corresponds to a user, and the nodes are connected by directed edges; Determine the set of neighbor nodes based on the directed edges between nodes; Inputting the neighbor node set into a trained weighted signed graph convolutional network to obtain node representations that correspond to social relationships between neighbor nodes and retain community structure; The nodes are connected by directed edges, including: nodes corresponding to users with positive social relationships are connected by a first directed edge, and nodes corresponding to users with negative social relationships are connected by a second directed edge; wherein the first directed edge is used as a positive edge, and the second directed edge is used as a negative edge; The loss function of the weighted signed graph convolutional network includes a signed graph structure loss function and a modularity maximization loss function; wherein the signed graph structure loss function is used to make the node pairs connected by positive edges close to each other in the representation space, and make the node pairs connected by negative edges far away from each other; the modularity maximization loss function is used to make the node representation output by the weighted signed graph convolutional network retain the community structure; The symbolic graph structure loss function is as follows: in represents the symbolic graph structure loss function, Represents the source node, target node, and the set of positive edge (+) and no edge (?) relationships between nodes. Represents the source node, target node, and the set of negative edges (-) and no edge (?) relationships between nodes; The modularity maximization loss function is as follows: in represents the modularity maximization loss function, matrix, , Represents a node is the sum of the positive edge weights of the source node, Represents a node is the sum of the negative edge weights of the source node, Represents a node is the sum of the weights of the positive edges of the destination node, Represents a node is the sum of the negative edge weights of the destination node, It is composed of the final representation vector of each node; Combining the signed graph structure loss function and the modularity maximization loss function to obtain a final loss function, wherein the final loss function is used as an objective function of the trained weighted signed graph convolutional network; The final loss function is as follows: in represents the final loss function; Determining a set of neighbor nodes according to directed edges between nodes includes: Determine the set of neighbor nodes based on the direction and number of directed edges between nodes; Determining the neighbor node set according to the directions and quantities of directed edges between nodes includes: The node pointed to by the positive edge is taken as the first positive node, and a first positive relationship neighbor node set connected to the first positive node through the positive edge is determined; the node pointed to by the negative edge is taken as the first negative node, and a first negative relationship neighbor node set connected to the first negative node through the negative edge is determined; For any three nodes connected by a triangle structure, determine three nodes that do not have negative edge connections and combine them into a second positive relationship neighbor node set; determine three nodes that have an even number of negative edge connections and combine them into a second negative relationship neighbor node set; Compute Node The distance is The positive neighbor set of Negative Neighbor Set The rules include: when hour: when : in, For Node Motif m 1 A collection of nodes, For Node Motif m 2 Node collection; The training process of the weighted signed graph convolutional network includes: The difference between the symbolic graph structure loss function and the modularity maximization loss function is used as an objective function; Training the weighted signed graph convolutional network according to the objective function, a preset number of training iterations, the number of network layers of the weighted signed graph convolutional network, and the dimensions of each network layer; Among them, the dimension of the last layer of the network is set to the number of communities; The step of inputting the neighbor node set into a trained weighted symbolic graph convolutional network to obtain node representations corresponding to social relationships between neighbor nodes and retaining community structure includes: When there is a layer of the weighted signed graph convolutional network, a positive representation of the set of neighbor nodes is obtained through the weighted signed graph convolutional network according to the connection weight of the positive edge; a negative representation of the set of neighbor nodes is obtained through the weighted signed graph convolutional network according to the connection weight of the negative edge; the positive representation and the negative representation are used as the node representation; When the weighted signed graph convolutional network has two or more layers, the positive representation of the neighbor node set is obtained through the weighted signed graph convolutional network according to the connection weight of the positive edge; the negative representation of the neighbor node set is obtained through the weighted signed graph convolutional network according to the connection weight of the negative edge; the positive representation and the negative representation are connected and passed through the multilayer perceptron network of the last layer of the weighted signed graph convolutional network, and the final representation obtained is used as the node representation; When the weighted signed graph convolutional network iteratively converges, Determine the node Community ID .
2. A directed weighted symbolic social network community discovery device, It is characterized in that include: A directed weighted graph construction unit, used to construct a directed weighted graph according to a set of nodes and social relationships between the nodes; each node of the directed weighted graph corresponds to a user, and the nodes are connected by directed edges; A node set determination unit, used to determine a neighbor node set according to directed edges between nodes; A node representation acquisition unit, used to input the neighbor node set into a trained weighted symbolic graph convolutional network to obtain node representations corresponding to social relationships between neighbor nodes and preserving community structure; The nodes are connected by directed edges, including: nodes corresponding to users with positive social relationships are connected by a first directed edge, and nodes corresponding to users with negative social relationships are connected by a second directed edge; wherein the first directed edge is used as a positive edge, and the second directed edge is used as a negative edge; The loss function of the weighted signed graph convolutional network includes a signed graph structure loss function and a modularity maximization loss function; wherein the signed graph structure loss function is used to make the node pairs connected by positive edges close to each other in the representation space, and make the node pairs connected by negative edges far away from each other; the modularity maximization loss function is used to make the node representation output by the weighted signed graph convolutional network retain the community structure; The symbolic graph structure loss function is as follows: in represents the symbolic graph structure loss function, Represents the source node, target node, and the set of positive edge (+) and no edge (?) relationships between nodes. Represents the source node, target node, and the set of negative edges (-) and no edge (?) relationships between nodes; The modularity maximization loss function is as follows: in represents the modularity maximization loss function, matrix, , Represents a node is the sum of the positive edge weights of the source node, Represents a node is the sum of the negative edge weights of the source node, Represents a node is the sum of the weights of the positive edges of the destination node, Represents a node is the sum of the negative edge weights of the destination node, It is composed of the final representation vector of each node; Combining the signed graph structure loss function and the modularity maximization loss function to obtain a final loss function, wherein the final loss function is used as an objective function of the trained weighted signed graph convolutional network; The final loss function is as follows: in represents the final loss function; Determining a set of neighbor nodes according to directed edges between nodes includes: Determine the set of neighbor nodes based on the direction and number of directed edges between nodes; Determining the neighbor node set according to the directions and quantities of directed edges between nodes includes: The node pointed to by the positive edge is taken as the first positive node, and a first positive relationship neighbor node set connected to the first positive node through the positive edge is determined; the node pointed to by the negative edge is taken as the first negative node, and a first negative relationship neighbor node set connected to the first negative node through the negative edge is determined; For any three nodes connected by a triangle structure, determine three nodes that do not have negative edge connections and combine them into a second positive relationship neighbor node set; determine three nodes that have an even number of negative edge connections and combine them into a second negative relationship neighbor node set; Compute Node The distance is The positive neighbor set of Negative Neighbor Set The rules include: when hour: when : in, For Node Motif m 1 A collection of nodes, For Node Motif m 2 Node collection; The training process of the weighted signed graph convolutional network includes: The difference between the symbolic graph structure loss function and the modularity maximization loss function is used as an objective function; Training the weighted signed graph convolutional network according to the objective function, a preset number of training iterations, the number of network layers of the weighted signed graph convolutional network, and the dimensions of each network layer; Among them, the dimension of the last layer of the network is set to the number of communities; The step of inputting the neighbor node set into a trained weighted symbolic graph convolutional network to obtain node representations corresponding to social relationships between neighbor nodes and retaining community structure includes: When there is a layer of the weighted signed graph convolutional network, a positive representation of the set of neighbor nodes is obtained through the weighted signed graph convolutional network according to the connection weight of the positive edge; a negative representation of the set of neighbor nodes is obtained through the weighted signed graph convolutional network according to the connection weight of the negative edge; the positive representation and the negative representation are used as the node representation; When the weighted signed graph convolutional network has two or more layers, the positive representation of the neighbor node set is obtained through the weighted signed graph convolutional network according to the connection weight of the positive edge; the negative representation of the neighbor node set is obtained through the weighted signed graph convolutional network according to the connection weight of the negative edge; the positive representation and the negative representation are connected and passed through the multilayer perceptron network of the last layer of the weighted signed graph convolutional network, and the final representation obtained is used as the node representation; When the weighted signed graph convolutional network iteratively converges, Determine the node Community ID .
3. An electronic device, It is characterized in that including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to claim 1.
4. A computer-readable storage medium, It is characterized in that The storage medium stores a program, and the program is executed by a processor to implement the method according to claim 1.
Citation Information
Patent Citations
Symbol network community discovery method based on structural balance constraint
CN110334285A
Community-enhanced graph convolutional neural network method
CN111476261A
Community structure detection method and system for movie social network
CN114020999A
Directed symbol network representation learning method and process with link prediction and node sorting functions
CN115578211A
Method for predicting relationship between users in social network and multi-head mixed aggregation graph convolutional network
CN115660882A
