Two-stage extension community discovery method based on local triangle

By introducing a two-stage expansion method of local triangles into the community discovery algorithm, the problem of inaccurate selection of seed nodes and community expansion in the existing technology is solved, and more accurate and efficient community structure mining and expansion are achieved.

CN119904325APending Publication Date: 2025-04-29NORTHEASTERN UNIV AT QINHUANGDAO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510075097.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing community found that the algorithm has shortcomings in selecting seed nodes and community expansion stages, and it is impossible to accurately evaluate the importance of nodes, resulting in insufficient mining of community structures and insufficient community fitness function to reflect the relationship between nodes and communities.

Method used

A two-stage extended community discovery method based on local triangles is proposed. By calculating the dominance and agglomeration coefficient of the nodes, the seed nodes are accurately selected, and a targeted community expansion strategy is adopted, combined with the new matching function, and the nodes are connected to the inside and outside of the community and the triangle structure to improve the accuracy and efficiency of community discovery.

Benefits of technology

By accurately selecting seed nodes and targeted community expansion, the mining accuracy and expansion accuracy of community structure are improved, and the cohesion and structural stability of the community are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_2
    Figure SMS_2
  • Figure SMS_3
    Figure SMS_3
Patent Text Reader

Abstract

The invention provides a two-stage extension community discovery method based on a local triangle, relates to the technical field of community discovery, and designs node governing power, and comprehensively considers the degree and cosine similarity of node neighborhoods on the basis of node degrees, which requires that seed nodes not only have large degrees, but also have compact structures in the neighborhoods, so that the degree and cosine similarity of node neighborhoods are considered. The node with the maximum node control force is selected as a seed every time, so that seed nodes can be screened out more accurately. For the seed nodes with weak aggregation capability, a targeted community expansion strategy is adopted, and meanwhile, large-scale community expansion is performed on the basis of the undirected network, so that the influence of the seed nodes is expanded, and the accuracy of community expansion is improved. A new matching degree function is provided, the number of triangular structures formed by the nodes and the interiors and exteriors of the community is added on the basis of considering the nodes and the interiors and exteriors of the community, and whether each node can be added into the community only needs to be calculated once, so that the community discovery efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of community discovery, in particular to a two-stage extended community discovery method based on local triangles. Background Art

[0002] With the continuous advancement of computer technology, the application of complex networks has penetrated into all walks of life. Community detection, as a hot area in the study of complex networks, is crucial to understanding the network structure composed of nodes of different properties and types. A community is a group of nodes with dense internal connections and sparse mutual connections, which is one of the characteristics of complex networks. The practical application range of community detection is wide. It not only has important theoretical significance in fields such as sociology, biology, and e-commerce, but also has practical application value in the field of network security. In order to accurately analyze the community structure in the network and thus gain a deeper understanding of the functional organization of the network, researchers have proposed many community detection algorithms based on different standards. Classic algorithms mainly include community detection algorithms based on label propagation, community detection algorithms based on modularity, and local community detection algorithms. The traditional local community detection algorithm mines important nodes in the complex network as seeds, then makes local expansions with the seeds as the center, and finally merges the initial communities.

[0003] The community discovery algorithm in the above research still has the following shortcomings: 1) In the seed node selection stage, there is a lack of an indicator that can accurately evaluate and rank the importance of nodes. Only the degree value of the node is considered, and its impact on the entire community structure cannot be fully considered, and it cannot ensure that the selected nodes can effectively represent the characteristics of the potential community. 2) In the community expansion stage, facing networks of different complexities and seed nodes with different aggregation capabilities, if only a single community expansion strategy is adopted, the complex structure around the seed nodes cannot be effectively mined, which can easily lead to unnecessary nodes being mistakenly included or important nodes being omitted. 3) The community fitness function cannot accurately reflect the relationship between nodes and existing communities, and cannot ensure that newly added nodes can effectively enhance the cohesion and structural stability of the community. In the face of different types of networks, there is a lack of a more universal community fitness function. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present invention aims to propose a two-stage extended community discovery method based on local triangles, comprising:

[0005] Step 1: Obtain an undirected network, wherein the undirected network includes a plurality of nodes, and two nodes are connected by edges;

[0006] Step 2: Calculate the cosine similarity between two connected nodes in the undirected network;

[0007] Step 3: Calculate the node dominance of each node in the undirected network based on the cosine similarity between nodes;

[0008] Step 4: Sort the nodes according to their node dominance from large to small to obtain a dominance list, and obtain the node with the largest node dominance in the dominance list as the seed node;

[0009] Step 5: Calculate the clustering coefficient of the seed node, and determine the nodes in the undirected network according to the clustering coefficient of the seed node. The determined nodes and the seed node constitute the first community.

[0010] Step 6: For each node to be divided in the undirected network and not in the first community, divide it to obtain a second community;

[0011] Step 7: Delete all nodes in the second community from the dominance list, and then obtain the node with the largest node dominance in the deleted dominance list as the seed node, and return to step 5 until all nodes in the undirected network have gone through steps 5 to 6, and multiple second communities are obtained;

[0012] Step 8: For each node belonging to multiple second communities, recalculate the fitness of the node for each second community to obtain multiple new fitnesses, obtain the maximum value among all new fitnesses, and divide the node into the second community corresponding to the maximum value. After all nodes belonging to multiple communities are divided, multiple final communities are obtained.

[0013] Optionally, step 3 is specifically implemented by the following formula:

[0014] P(u)=d(u)×∑ v∈N(u) (S(u,v) / d(v));

[0015] Among them, P(u) represents the node dominance of node u, N(u) represents the set of nodes connected to node u, d(u) represents the degree of node u, S(u,v) represents the cosine similarity between node u and node v, node u and node v are connected, and d(v) represents the degree of node v.

[0016] Optionally, step 6 specifically includes:

[0017] Step 6.1: For each node to be divided that is in the undirected network and not in the first community, determine the number of edges l that are connected to the node to be divided that are in the undirected network and not in the first community. oc Is it equal to 0? oc When it is equal to 0, the node to be divided is classified into the first community. oc If it is not equal to 0, execute step 6.2;

[0018] Step 6.2: Calculate the fitness f of the node to be divided to the first community;

[0019] Step 6.3: When the fitness f of the node to be divided for the first community is greater than or equal to 1, the node to be divided is included in the first community. When the fitness f of the node to be divided for the first community is less than 1, no processing is performed. All nodes to be divided are divided from step 6.1 to step 6.3 to obtain the second community.

[0020] Optionally, step 6.2 is specifically calculated by the following formula:

[0021]

[0022] Among them, T mc is the number of triangles formed by the nodes to be divided and the nodes in the first community c; T me is the number of triangles formed by the nodes in the undirected network that are not in the first community and the nodes to be divided; l ic is the number of edges connecting the node to be divided and the nodes in the first community c; l oc is the number of edges connecting the nodes to be divided in the undirected network that are not in the first community; α is a parameter that controls the size of community division;

[0023] In step 8, the fitness of the node for each second community is recalculated. Specifically, let α=1, and then recalculate the fitness of the node for each second community based on the fitness formula.

[0024] Optionally, the clustering coefficient of the seed node is calculated in step 5, which is specifically implemented by the following formula:

[0025]

[0026] Among them, I u is the clustering coefficient of seed node u, E u Represents the number of edges connected to the seed node u.

[0027] Optionally, in step 5, nodes are determined in the undirected network according to the clustering coefficient of the seed node, and the determined nodes and the seed node constitute a first community, including:

[0028] Determine the clustering coefficient I of the seed node u Is it greater than 0.35?

[0029] The clustering coefficient I at the seed node uWhen the similarity is greater than 0.35, among all nodes connected to the seed node, the node with the largest cosine similarity to the seed node is obtained as the first node, and then in the undirected network, multiple second nodes forming a triangle with the seed node and the first node are obtained, that is, nodes connected to both the seed node and the first node; the seed node, the first node and the multiple second nodes constitute a first community, wherein the first node and the multiple second nodes are determined nodes;

[0030] The clustering coefficient I at the seed node u When it is less than or equal to 0.35, in an undirected network, multiple third nodes that form a triangle with the seed node are obtained, that is, two third nodes that are connected to the seed node, and the two third nodes are also connected; the seed node and the multiple third nodes form a first community, wherein the multiple third nodes are determined nodes.

[0031] Optionally, step 2 is specifically implemented by the following formula:

[0032]

[0033] Among them, S(u,v) represents the cosine similarity between node u and node v, node u and node v are connected, N(u) represents the set of nodes connected to node u, N(v) represents the set of nodes connected to node v, d(u) represents the degree of node u, and d(v) represents the degree of node v.

[0034] The beneficial effects of adopting the above technical solution are:

[0035] The present invention designs node dominance, and comprehensively considers the degree and cosine similarity of the node neighbors on the basis of the node degree. This requires that the seed node must not only have a large degree, but also have a tight structure in its neighborhood. Each time, the node with the largest node dominance is selected as the seed, which helps to screen out the seed node more accurately. For seed nodes with weaker aggregation ability, a targeted community expansion strategy is adopted. At the same time, large-scale community expansion is carried out based on undirected networks, which expands the influence of seed nodes and improves the accuracy of community expansion. A new matching function is proposed. On the basis of considering the edges between nodes and the inside and outside of the community, the number of triangular structures formed by nodes and the inside and outside of the community is added, and whether each node can join the community only needs to be calculated once, which improves the efficiency of community discovery. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 Schematic diagram of the process of a two-stage extended community discovery method based on local triangles in an embodiment of the present invention;

[0037] Figure 21 is an experimental comparison diagram of different algorithms on artificial synthetic networks in an embodiment of the present invention, wherein (a) is a curve showing the variation of NMI of multiple algorithms with parameter μ in an LFR1 network, (b) is a curve showing the variation of NMI of multiple algorithms with parameter μ in an LFR2 network, (c) is a curve showing the variation of NMI of multiple algorithms with parameter μ in an LFR3 network, and (d) is a curve showing the variation of NMI of multiple algorithms with parameter μ in an LFR4 network;

[0038] Figure 3 Schematic diagram of the experimental results of parameter α in a real social network and an artificial synthetic network in an embodiment of the present invention, wherein Figure (a) is the experimental result of parameter α in a real social network, and Figure (b) is the experimental result of parameter α in an artificial synthetic network. DETAILED DESCRIPTION

[0039] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0040] In view of the problems existing in the prior art, the present invention provides a two-stage extended community discovery method based on local triangles, combined with Figure 1 , which may include the following steps:

[0041] Step 1: Obtain an undirected network, wherein the undirected network includes a plurality of nodes, and two nodes are connected by edges;

[0042] The selection of seed nodes is crucial for community discovery. Seed nodes are the starting point of community division, and their selection directly affects the final community division results. Selecting appropriate seed nodes can help the algorithm find the community structure in the network faster and more accurately, while improperly selected seed nodes may cause the algorithm to fall into a local optimal solution or fail to converge. Therefore, carefully selecting seed nodes is a key step in the community discovery process, which can improve the efficiency and accuracy of the algorithm, thereby better revealing the hidden community structure in the network. Therefore, the present invention first determines the seed nodes, specifically through steps 2 to 4.

[0043] Step 2: Calculate the cosine similarity between two connected nodes in an undirected network, which is implemented by the following formula:

[0044]

[0045] Among them, S(u,v) represents the cosine similarity between node u and node v, node u and node v are connected, N(u) represents the set of nodes connected to node u, N(v) represents the set of nodes connected to node v, d(u) represents the degree of node u, and d(v) represents the degree of node v.

[0046] Step 3: Calculate the node dominance of each node in the undirected network based on the cosine similarity between nodes, which is implemented by the following formula:

[0047] P(u)=d(u)×∑ v∈N(u) (S(u,v) / d(v));

[0048] Among them, P(u) represents the node dominance of node u, N(u) represents the set of nodes connected to node u, d(u) represents the degree of node u, S(u,v) represents the cosine similarity between node u and node v, node u and node v are connected, and d(v) represents the degree of node v.

[0049] Since the greater the node dominance, the more likely the node is to be at the center of the community and the greater the possibility of becoming a seed node, step 4 is executed.

[0050] Step 4: Sort the nodes according to their node dominance from large to small to obtain a dominance list, and obtain the node with the largest node dominance in the dominance list as the seed node.

[0051] The node clustering coefficient refers to the ratio of the number of actual connections between the neighbors of a node to the number of possible connections. It reflects the closeness of the connection between the neighbors of a node, that is, whether it is easy for the neighbors of the node to form a close subnetwork. The node clustering coefficient can be used to describe the local structural characteristics of the network, such as the closeness of the connection between friends in a social network, so the community can be determined based on the clustering coefficient, which can be achieved through the following steps.

[0052] Step 5: Calculate the clustering coefficient of the seed node. According to the clustering coefficient of the seed node, it is implemented by the following formula:

[0053]

[0054] Among them, I u is the clustering coefficient of seed node u, E u Indicates the number of edges connected to the seed node u. The node clustering coefficient is in the range of [0,1]. The closer the value is to 1, the closer the connection between the neighbors of the node is.

[0055] After the seed nodes are mined, different small-scale community expansion strategies are adopted for seed nodes with different clustering coefficients. Specifically, nodes are determined in the undirected network, and the determined nodes and seed nodes constitute the first community, which specifically includes:

[0056] Determine the clustering coefficient I of the seed node u Is it greater than 0.35?

[0057] The clustering coefficient I at the seed node u When the similarity is greater than 0.35, among all nodes connected to the seed node, the node with the largest cosine similarity to the seed node is obtained as the first node, and then in the undirected network, multiple second nodes forming a triangle with the seed node and the first node are obtained, that is, nodes connected to both the seed node and the first node; the seed node, the first node and the multiple second nodes constitute a first community, wherein the first node and the multiple second nodes are determined nodes;

[0058] The clustering coefficient I at the seed node u When it is less than or equal to 0.35, in an undirected network, multiple third nodes that form a triangle with the seed node are obtained, that is, two third nodes that are connected to the seed node, and the two third nodes are also connected; the seed node and the multiple third nodes form a first community, wherein the multiple third nodes are determined nodes.

[0059] After building the first community, the nodes to be divided in the undirected network are obtained and accessed, and the initial community is further expanded on a large scale according to the community matching function. Whenever a new node joins the community, the community neighbors are re-obtained to ensure the real-time nature of the community during the expansion process, until no new nodes are added. This is specifically achieved through the following steps.

[0060] Step 6: For each node to be divided in the undirected network and not in the first community, divide it to obtain a second community;

[0061] Step 6.1: For each node to be divided that is in the undirected network and not in the first community, determine the number of edges l that are connected to the node to be divided that are in the undirected network and not in the first community. oc Is it equal to 0? oc When it is equal to 0, the node to be divided is classified into the first community. oc If it is not equal to 0, execute step 6.2;

[0062] Step 6.2: Calculate the fitness f of the node to be divided to the first community, which is calculated by the following formula:

[0063]

[0064] Among them, T mc is the number of triangles formed by the nodes to be divided and the nodes in the first community c; T me is the number of triangles formed by the nodes in the undirected network that are not in the first community and the nodes to be divided; l ic is the number of edges connecting the node to be divided and the nodes in the first community c; l ocis the number of edges connecting the nodes to be divided in the undirected network that are not in the first community; α is a parameter that controls the scale of community division, and its value is generally 0 to 3;

[0065] Step 6.3: When the fitness f of the node to be divided for the first community is greater than or equal to 1, it means that the node to be divided is more closely connected with the first community, so the node to be divided is included in the first community. When the fitness f of the node to be divided for the first community is less than 1, no processing is performed; wherein, all nodes to be divided are divided from step 6.1 to step 6.3 to obtain the second community.

[0066] Step 7: Delete all nodes in the second community from the dominance list, and then obtain the node with the largest node dominance in the deleted dominance list as the seed node, and return to step 5 until all nodes in the undirected network have gone through steps 5 to 6, and multiple second communities are obtained;

[0067] Since it is a preliminary division of communities, the edges of communities are relatively fuzzy, and there is a problem that one node belongs to multiple communities. For overlapping nodes with non-unique affiliations, it is necessary to determine the strength of the relationship between the conflicting nodes and the communities they belong to. The determination formula here is the community matching formula in the previous process. Since the community has basically taken shape, it is only necessary to determine the strength of the relationship between the multi-attributed nodes and the community, so the α value can be set to 1. This step divides the controversial nodes into the correct communities and refines the edges of the communities. The traditional algorithm based on modularity increment merges communities in units of communities, which has a high time complexity. This method focuses more on controversial nodes, and the formula is simple and effective, which improves the efficiency of the community optimization process, which is specifically achieved through step 8.

[0068] Step 8: For each node belonging to multiple second communities, recalculate the fitness of the node for each second community. Specifically, let α=1, and then recalculate the fitness of the node for each second community based on the fitness formula to obtain multiple new fitnesses. Obtain the maximum value among all new fitnesses, and divide the node into the second community corresponding to the maximum value. After all nodes belonging to multiple communities are divided, multiple final communities are obtained.

[0069] Based on the above scheme, the present invention carried out the following experiments:

[0070] Get the real social network data set information, detailed data is shown in Table 1, and compare the NMI, P, ARI of various algorithms based on the real social network data, detailed data is shown in Table 2, among which, the parameter settings of the artificial synthetic network are shown in Table 3. Based on this, the experimental results can be obtained, such as Figure 2, where (a) is the curve of NMI of multiple algorithms changing with parameter μ in LFR1 network, (b) is the curve of NMI of multiple algorithms changing with parameter μ in LFR2 network, (c) is the curve of NMI of multiple algorithms changing with parameter μ in LFR3 network, and (d) is the curve of NMI of multiple algorithms changing with parameter μ in LFR4 network.

[0071] Table 1 Real social network dataset information

[0072]

[0073] Table 2 Comparison of NMI, P, and ARI of various algorithms on real social network datasets

[0074]

[0075] Table 3 Parameter settings of artificial synthetic network

[0076]

[0077] The present invention also conducts parameter experiments: the parameter α in the community matching function is obtained through experiments. The experiments are conducted on artificial synthetic networks with a mixing coefficient μ of 0.5 and the number of nodes being 1000, 2000, 3000 and 5000 respectively. To ensure the accuracy of the parameters, experiments are also conducted on four real networks. The experimental results are shown in Figure 2. Figure 3 As shown in Figure 2, Figure (a) shows the experimental results of parameter α in a real social network, and Figure (b) shows the experimental results of parameter α in an artificial synthetic network. Figure 3 It can be seen that in the real social network experiment, on the Karate, Dolphin, and Football networks, the algorithm works best when α is 1.8 to 2.0; on the Polbooks network, the algorithm works best when α is 2.4 to 2.6, but the difference in algorithm effect is not large when α is 1.8 to 2.0, so α is 1.8 to 2.0 on the real social network. In the artificial synthetic network experiment, the algorithm works best when α is 1.6 to 1.8, so α is 1.6 to 1.8 on the artificial synthetic network. Considering both, the parameter α value is selected as 1.8.

[0078] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.

Claims

1. A two-stage extended community discovery method based on local triangles, characterized in that: include: Step 1: Obtain an undirected network, wherein the undirected network includes a plurality of nodes, and two nodes are connected by edges; Step 2: Calculate the cosine similarity between two connected nodes in the undirected network; Step 3: Calculate the node dominance of each node in the undirected network based on the cosine similarity between nodes; Step 4: Sort the nodes according to their node dominance from large to small to obtain a dominance list, and obtain the node with the largest node dominance in the dominance list as the seed node; Step 5: Calculate the clustering coefficient of the seed node, and determine the nodes in the undirected network according to the clustering coefficient of the seed node. The determined nodes and the seed node constitute the first community. Step 6: For each node to be divided in the undirected network and not in the first community, divide it to obtain a second community; Step 7: Delete all nodes in the second community from the dominance list, and then obtain the node with the largest node dominance in the deleted dominance list as the seed node, and return to step 5 until all nodes in the undirected network have gone through steps 5 to 6, and multiple second communities are obtained; Step 8: For each node belonging to multiple second communities, recalculate the fitness of the node for each second community to obtain multiple new fitnesses, obtain the maximum value among all new fitnesses, and divide the node into the second community corresponding to the maximum value. After all nodes belonging to multiple communities are divided, multiple final communities are obtained.

2. The two-stage extended community discovery method based on local triangles according to claim 1 is characterized in that: Step 3 is specifically implemented by the following formula: P(u)=d(u)×∑ v∈N(u) (S(u,v) / d(v)); Among them, P(u) represents the node dominance of node u, N(u) represents the set of nodes connected to node u, d(u) represents the degree of node u, S(u,v) represents the cosine similarity between node u and node v, node u and node v are connected, and d(v) represents the degree of node v.

3. The two-stage extended community discovery method based on local triangles according to claim 1, characterized in that: Step 6 specifically includes: Step 6.1: For each node to be divided that is in the undirected network and not in the first community, determine the number of edges l that are connected to the node to be divided that are in the undirected network and not in the first community. oc Is it equal to 0? oc When it is equal to 0, the node to be divided is classified into the first community. oc If it is not equal to 0, execute step 6.2; Step 6.2: Calculate the fitness f of the node to be divided to the first community; Step 6.3: When the fitness f of the node to be divided for the first community is greater than or equal to 1, the node to be divided is included in the first community. When the fitness f of the node to be divided for the first community is less than 1, no processing is performed. All nodes to be divided are divided from step 6.1 to step 6.3 to obtain the second community.

4. The two-stage extended community discovery method based on local triangles according to claim 3 is characterized in that: Step 6.2 is specifically calculated using the following formula: Among them, T mc is the number of triangles formed by the nodes to be divided and the nodes in the first community c; T me is the number of triangles formed by the nodes in the undirected network that are not in the first community and the nodes to be divided; l ic is the number of edges connecting the node to be divided and the nodes in the first community c; l oc is the number of edges connecting the nodes to be divided in the undirected network that are not in the first community; α is a parameter that controls the size of community division; In step 8, the fitness of the node for each second community is recalculated. Specifically, let α=1, and then recalculate the fitness of the node for each second community based on the fitness formula.

5. The two-stage extended community discovery method based on local triangles according to claim 1, characterized in that: In step 5, the clustering coefficient of the seed node is calculated, which is specifically implemented by the following formula: Among them, I u is the clustering coefficient of seed node u, E u Represents the number of edges connected to the seed node u.

6. The two-stage extended community discovery method based on local triangles according to claim 1, characterized in that: In step 5, nodes are determined in the undirected network according to the clustering coefficient of the seed node. The determined nodes and the seed node constitute the first community, including: Determine the clustering coefficient I of the seed node u Is it greater than 0.35? The clustering coefficient I at the seed node u When the similarity is greater than 0.35, among all nodes connected to the seed node, the node with the largest cosine similarity to the seed node is obtained as the first node, and then in the undirected network, multiple second nodes forming a triangle with the seed node and the first node are obtained, that is, nodes connected to both the seed node and the first node; the seed node, the first node and the multiple second nodes constitute a first community, wherein the first node and the multiple second nodes are determined nodes; The clustering coefficient I at the seed node u When it is less than or equal to 0.35, in an undirected network, multiple third nodes that form a triangle with the seed node are obtained, that is, two third nodes that are connected to the seed node, and the two third nodes are also connected; the seed node and the multiple third nodes form a first community, wherein the multiple third nodes are determined nodes.

7. The two-stage extended community discovery method based on local triangles according to claim 1, characterized in that: Step 2 is specifically implemented by the following formula: Among them, S(u,v) represents the cosine similarity between node u and node v, node u and node v are connected, N(u) represents the set of nodes connected to node u, N(v) represents the set of nodes connected to node v, d(u) represents the degree of node u, and d(v) represents the degree of node v.