A friend recommendation method and system based on community search
By improving the FP algorithm to find vertices that do not affect the connectivity of the graph on the attribute graph and iteratively finding the vertex with the largest dense modularity, the problem that the FP algorithm cannot be directly used for friend recommendation on the attribute graph is solved, and efficient friend recommendation is achieved.
Patent Information
- Application Number
- CN202310200246.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-03-02
AI Technical Summary
Existing FP algorithms cannot be directly used for friend recommendation on attribute graphs and cannot meet the real-world recommendation requirements based on user attributes and application needs.
The FP algorithm is improved to make it suitable for attribute community search. This algorithm finds vertices on the attribute graph that do not affect the connectivity after removal, and iteratively uses a greedy strategy to find the vertex with the largest dense modularity. Friend recommendations are made based on the communities after the iteration is completed.
It achieves high-accuracy and low-time-cost friend recommendation on attribute graphs, overcomes the applicability problem of FP algorithm on attribute graphs, and provides an effective and high-speed friend recommendation method.
Smart Images

Figure CN116226529B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of community search, and in particular to a friend recommendation method and system based on community search. Background Art
[0002] With the development of social networks, more and more users are using various online social applications. Friend recommendation is an essential feature of these applications. Applications use shared interests and hobbies to filter information and recommend friends with similar interests, thereby increasing user activity.
[0003] The process of recommending friends to a user can also be understood as finding the most appropriate community in a graph that contains a specific vertex. Therefore, community search algorithms can be used for friend recommendations. A cutting-edge community search algorithm is the Fast Peeling (FP) algorithm. The FP algorithm introduces the concept of dense modularity and uses a greedy strategy to find a community that maximizes dense modularity and contains a specific vertex.
[0004] While the FP algorithm offers high accuracy and low time overhead, it's not well-suited for attribute graphs. In real-world friend recommendations, recommendations must be made based on user attributes and application requirements on an attribute graph. Therefore, the FP algorithm cannot be directly used for friend recommendations. Summary of the Invention
[0005] In view of this, the present invention provides a friend recommendation method and system based on community search, which can improve the FP algorithm so that it can be used for attribute community search to achieve friend recommendation, while retaining the high accuracy and low time overhead of the original FP algorithm.
[0006] To achieve the above-mentioned objectives, the technical solution of the present invention is: a friend recommendation method based on community search, which is used to use community search on an attribute graph to find communities that meet the requirements and recommend friends based on the communities; the method comprises the following steps: constructing an attribute graph based on original data; finding vertices on the graph that do not affect the connectivity of the graph after removal; iteratively using a greedy strategy to find vertices that maximize the dense modularity of the graph after removal; and recommending friends based on the communities obtained after the iteration is completed.
[0007] Furthermore, the method of constructing the attribute graph based on the original data is:
[0008] S101: Take the input user set V and its keywords, user relationships, starting vertex set V0 and starting keyword set L, and preset keyword distance D;
[0009] There are n vertices in the starting vertex set V0 and m keywords in the starting keyword set L;
[0010] S102: Construct an attribute graph G = (V, E, W) based on the input user set, its keywords, and user relationships, and mark V0 as the corresponding vertex, where V is the input user set, E is the edge set in the input user, and W is the keyword of the input user;
[0011] S103: Select a vertex v0 from V0, calculate the shortest path from v0 to other vertices in V0, and take the union of the vertices in all the shortest paths as the connected graph V1.
[0012] Furthermore, we find the vertices on the graph that do not affect the connectivity of the graph after removal, specifically:
[0013] S201: Calculate the distance dist(u,v) from each vertex in V0 to other vertices, u∈V0, v∈V-V1; u is a vertex in V0, v is a vertex in V-V1;
[0014] S202: Calculate the distance between the vertex set V0 and other vertices v: dist(v) = min(dist(u,v)), u∈V0;
[0015] S203: Classify the vertices in V-V1 into S1...S according to the size of dist(v) d ; S1 is the vertex where dist(v)=1, S d is the vertex where dist(v)=d;
[0016] S d The vertices in are the vertices that do not affect the connectivity of the graph after being removed.
[0017] Furthermore, we iteratively use a greedy strategy to find the vertex that maximizes the dense modularity of the graph after removal, specifically:
[0018] S301: Let C = C0 = G, and calculate the dense modularity DM(G, C) of C;
[0019] S302: Calculate the keyword distance from the vertex in G to L;
[0020] S303: Calculate the keyword distance kdist(C, L) from C to L;
[0021] S304: Calculate S d The density ratio of the middle vertex;
[0022] S305: Find S d The vertex v1 with the largest density in S d and C0 removed;
[0023] S306: Update the density ratio of the neighbor vertices of v1;
[0024] S307: Calculate the dense modularity DM(G, C0) of C0 and the keyword distance kdist(C0, L) from C to L. If DM(G, C0)>DM(G, C) and kdist(C0, L)≤D, set C=C0, otherwise go to S308;
[0025] S308: If S d If not empty, proceed to S305, otherwise proceed to S309;
[0026] S309: Decrement d by 1. If d>0, proceed to S308. Otherwise, output C, which is the community with the maximum dense modularity obtained after removing the vertices.
[0027] Furthermore, the method for recommending friends based on the community obtained after the iteration is as follows:
[0028] Let C-V1 be the new C; sort the vertices in C from small to large according to the keyword distance; output the vertices in C in order, and the vertices output first have higher recommendation priority.
[0029] Another embodiment of the present invention provides a friend recommendation system based on community search, which is used to use community search on an attribute graph to find communities that meet requirements and recommend friends based on the communities. The system specifically includes the following modules:
[0030] The attribute graph construction module receives the input raw data and constructs an attribute graph based on the raw data.
[0031] The module for selecting vertices irrelevant to graph connectivity is used to find vertices on the constructed attribute graph that do not affect the connectivity of the graph after being removed.
[0032] The module for selecting vertices related to the graph dense modularity selects vertices that do not affect the connectivity of the graph after removal in the module for selecting vertices irrelevant to the graph connectivity, and iteratively uses a greedy strategy to find the vertices that maximize the graph dense modularity after removal.
[0033] The friend recommendation module is used to recommend friends based on the community obtained by the vertex selection module related to the dense modularity of the graph.
[0034] Furthermore, the property graph construction module is specifically:
[0035] The input of the attribute graph construction module includes: input user set V and its keywords, user relationship, starting vertex set V0 and starting keyword set L, and preset keyword distance D.
[0036] There are n vertices in the starting vertex set V0 and m keywords in the starting keyword set L.
[0037] This attribute graph construction module constructs an attribute graph G = (V, E, W) based on the input user set, its keywords and user relationships, and marks V0 as the corresponding vertex, where V is the input user set, E is the edge set in the input user, and W is the keyword of the input user; selects a vertex v0 from V0, calculates the shortest path from v0 to other vertices in V0, and takes the union of the vertices in all shortest paths as the connected graph v1.
[0038] Furthermore, the module for selecting vertices that are irrelevant to graph connectivity is specifically:
[0039] Calculate the distance dist(u,v) from each vertex in V0 to other vertices, u∈V0, v∈V-V1; u is a vertex in V0, and v is a vertex in V-V1.
[0040] Calculate the distance from the vertex set V0 to other vertices v: dist(v) = min(dist(u,v)), u∈V0.
[0041] According to the size of dist(v), the vertices in V-v1 are classified into S1...S d ; S1 is the vertex where dist(v)=1, S d is the vertex where dist(v)=d.
[0042] S d The vertices in are the vertices extracted by the selection module of the graph connectivity-irrelevant vertices, which do not affect the graph connectivity after being removed.
[0043] Furthermore, the graph dense modularity related vertex selection module specifically adopts the following steps:
[0044] S301: Let C=C0=G, and calculate the dense modularity DM(G,C) of C.
[0045] S302: Calculate the keyword distance from the vertex in G to L.
[0046] S303: Calculate the keyword distance kdist(C, L) from C to L.
[0047] S304: Calculate S d The density of the vertices in the image.
[0048] S305: Find S d The vertex v1 with the largest density in S d and C0 are removed.
[0049] S306: Update the density ratio of the neighboring vertices of v1.
[0050] S307: Calculate the dense modularity DM(G, C0) of C0 and the keyword distance kdist(C0, L) from C to L. If DM(G, C0)>DM(G, C) and kdist(C0, L)≤D, set C=C0, otherwise go to S308.
[0051] S308: If S d If it is not empty, proceed to S305; otherwise, proceed to S309.
[0052] S309: Decrement d by 1. If d>0, proceed to S308. Otherwise, output C, which is the community with the maximum dense modularity obtained after removing the vertices.
[0053] Furthermore, the friend recommendation module is specifically as follows: let C-V1 be the new C; sort the vertices in C from small to large according to the keyword distance; output the vertices in C in order, and the vertices output first have a higher recommendation priority.
[0054] Beneficial effects:
[0055] This invention provides a friend recommendation method based on community search. It uses community search on an attribute graph to discover qualified communities and recommend friends based on these communities. The method first constructs an attribute graph based on the original data. Vertices on the graph that, when removed, do not affect the graph's connectivity are identified. An iterative greedy strategy is then used to identify vertices that maximize the graph's dense modularity after removal. Friend recommendations are then made based on the resulting communities. This method overcomes the difficulty of using dense modularity-based community search algorithms for attribute community search. By improving this method for friend recommendation on attribute graphs, it achieves efficient and high-speed friend recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is an example attribute graph G, whose edge weights are all 1;
[0057] Figure 2 This is a schematic diagram of the result of distance partitioning the example attribute graph G;
[0058] Figure 3 Schematic diagram of the result of calculating the keyword distance between the keyword set L = (ML, C) and the vertex v2 on the graph G;
[0059] Figure 4 This is a flow chart of a friend recommendation method based on community search provided by the present invention. DETAILED DESCRIPTION
[0060] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0061] The present invention provides a friend recommendation method based on community search, which is used to use community search on an attribute graph to find communities that meet requirements and recommend friends based on the communities. The process is as follows: constructing an attribute graph based on original data; finding vertices on the graph that do not affect the connectivity of the graph after removal; iteratively using a greedy strategy to find vertices that maximize the dense modularity of the graph after removal; and recommending friends based on the communities obtained after the iteration is completed.
[0062] The specific process is as follows Figure 4 As shown:
[0063] Step 1: Build an attribute graph based on the original data; specifically:
[0064] S101: Take the input user set V and its keywords, user relationships, starting vertex set V0 and starting keyword set L, and preset keyword distance D;
[0065] There are n vertices in the starting vertex set V0 and m keywords in the starting keyword set L;
[0066] S102: Construct an attribute graph G = (V, E, W) based on the input user set, its keywords, and user relationships, and mark V0 as the corresponding vertex, where V is the input user set, E is the edge set in the input user, and W is the keyword of the input user;
[0067] S103: Select a vertex v0 from V0, calculate the shortest path from v0 to other vertices in V0, and take the union of the vertices in all the shortest paths as the connected graph V1.
[0068] Figure 1 is an example attribute graph G, whose edge weights are all 1.
[0069] Step 2: Find the vertices on the graph that do not affect the connectivity of the graph after removal. Specifically:
[0070] S201: Calculate the distance dist(u,v) from each vertex in V0 to other vertices, u∈V0, v∈V-V1; u is a vertex in V0, v is a vertex in V-V1;
[0071] S202: Calculate the distance between the vertex set V0 and other vertices v: dist(v) = min(dist(u,v)), u∈V0;
[0072] S203: Classify the vertices in V-V1 into S1...S according to the size of dist(v) d ; S1 is the vertex where dist(v)=1, S d is the vertex where dist(v)=d;
[0073] S d The vertices in are the vertices that do not affect the connectivity of the graph after being removed.
[0074] Figure 2 Schematic diagram of the result of distance partitioning of the example attribute graph G.
[0075] Step 3: Iteratively use the greedy strategy to find the vertex that maximizes the dense modularity of the graph after removal;
[0076] S301: Let C = C0 = G, and calculate the dense modularity DM (G, C) of C; In this embodiment of the present invention, the dense modularity of C is calculated Where |C| represents the number of vertices in C, w C represents the sum of the edge weights within C, w G represents the sum of the edge weights in G, d C Represents the sum of the weights of the vertices in C;
[0077] S302: Calculate the keyword distance from the vertex in G to L; In the embodiment of the present invention, for vertex u and keyword l, let V(l) represent the vertex set with keyword l, and the keyword distance from u to l is The distance from u to the keyword set L is
[0078] S303: Calculate the keyword distance kdist(C, L) from C to L; In this embodiment of the present invention, calculate the keyword distance from C to L If kdist(C,L)>D,
[0079] S304: Calculate S d In the embodiment of the present invention, the density rate of the vertices in the calculation S d Density of midpoints where k v,C Represents the sum of the edge weights of the vertex v connected to C. Θ density, d v Represents the sum of the weights of all edges connected to v.
[0080] S305: Find S d The vertex v1 with the largest density in S d and C0 removed;
[0081] S306: Update the density ratio of the neighbor vertices of v1;
[0082] S307: Calculate the dense modularity DM(G, C0) of C0 and the keyword distance kdist(C0, L) from C to L. If DM(G, C0)>DM(G, C) and kdist(C0, L)≤D, set C=C0, otherwise go to S308;
[0083] S308: If Sd If not empty, proceed to S305, otherwise proceed to S309;
[0084] S309: Decrement d by 1. If d>0, proceed to S308. Otherwise, output C, which is the community with the maximum dense modularity obtained after removing the vertices.
[0085] Figure 3 Schematic diagram of the result of calculating the keyword distance between the keyword set L = (ML, C) and vertex v2 on graph G.
[0086] Step 4: Recommend friends based on the community obtained after the iteration of step 3. Specifically:
[0087] S401: Let C-V1 be the new C.
[0088] S402: Sort the vertices in C from smallest to largest according to the keyword distance.
[0089] S403: Output the vertices in C in order, and the vertices output first have a higher recommendation priority.
[0090] Another embodiment of the present invention provides a friend recommendation system based on community search, which is used to use community search on an attribute graph to find communities that meet requirements and recommend friends based on the communities. The system specifically includes the following modules:
[0091] The attribute graph construction module receives the input raw data and constructs the attribute graph based on the raw data;
[0092] The module for selecting vertices irrelevant to graph connectivity is used to find vertices on the constructed attribute graph that do not affect the connectivity of the graph after being removed.
[0093] The module for selecting vertices related to the graph dense modularity selects vertices that do not affect the connectivity of the graph after removal in the module for selecting vertices irrelevant to the graph connectivity, and iteratively uses a greedy strategy to find the vertices that maximize the graph dense modularity after removal.
[0094] The friend recommendation module is used to recommend friends based on the community obtained by the vertex selection module related to the dense modularity of the graph.
[0095] Property graph building blocks, specifically:
[0096] The input of the attribute graph construction module includes: input user set V and its keywords, user relationships, starting vertex set V0 and starting keyword set L, and preset keyword distance D;
[0097] There are n vertices in the starting vertex set V0 and m keywords in the starting keyword set L;
[0098] This attribute graph construction module constructs an attribute graph G = (V, E, W) based on the input user set, its keywords and user relationships, and marks V0 as the corresponding vertex, where V is the input user set, E is the edge set in the input user, and W is the keyword of the input user; selects a vertex v0 from V0, calculates the shortest path from v0 to other vertices in V0, and takes the union of the vertices in all shortest paths as the connected graph V1.
[0099] The module for selecting vertices that are irrelevant to graph connectivity is as follows:
[0100] Calculate the distance dist(u,v) from each vertex in V0 to other vertices, u∈V0, v∈V-V1; u is a vertex in V0, v is a vertex in V-V1;
[0101] Calculate the distance from vertex set V0 to other vertices v: dist(v) = min(dist(u,v)), u∈V0;
[0102] According to the size of dist(v), the vertices in V-V1 are classified into S1...S d ; S1 is the vertex where dist(v)=1, S d is the vertex where dist(v)=d;
[0103] S d The vertices in are the vertices extracted by the selection module of the graph connectivity-irrelevant vertices, which do not affect the graph connectivity after being removed.
[0104] The graph dense modularity related vertex selection module adopts the following steps:
[0105] S301: Let C = C0 = G, and calculate the dense modularity DM(G, C) of C;
[0106] S302: Calculate the keyword distance from the vertex in G to L;
[0107] S303: Calculate the keyword distance kdist(C, L) from C to L;
[0108] S304: Calculate S d The density ratio of the middle vertex;
[0109] S305: Find S d The vertex v1 with the largest density in S d and C0 removed;
[0110] S306: Update the density ratio of the neighbor vertices of v1;
[0111] S307: Calculate the dense modularity DM(G, C0) of C0 and the keyword distance kdist(C0, L) from C to L. If DM(G, C0)>DM(G, C) and kdist(C0, L)≤D, set C=C0, otherwise go to S308;
[0112] S308: If S d If not empty, proceed to S305, otherwise proceed to S309;
[0113] S309: Decrement d by 1. If d>0, proceed to S308. Otherwise, output C, which is the community with the maximum dense modularity obtained after removing the vertices.
[0114] The friend recommendation module is as follows: let C-V1 be the new C; sort the vertices in C from small to large according to the keyword distance; output the vertices in C in order, and the vertices output first have higher recommendation priority.
[0115] This embodiment provides a friend recommendation system based on community search, which can be implemented using the following devices, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. Four functional modules are set in the processor according to the above functions, namely, a property graph construction module, a graph connectivity-irrelevant vertex selection module, a graph dense modularity-related vertex selection module, and a friend recommendation module. When the processor executes the program, friend recommendation based on community search can be implemented.
[0116] In addition, the method steps of the present application can be implemented not only by data processing programs but also by hardware, for example, by logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Therefore, such hardware that can implement the method of the present application can also constitute the present application.
[0117] The flowcharts and block diagrams in the accompanying drawings of the present application show the possible implementation architecture, functions and operations of the systems, methods and computer program products according to the various embodiments disclosed in the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in the order of the standards in different figures. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0118] In summary, the above are merely preferred embodiments of the present invention. Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly disclosed in this application. In particular, without departing from the spirit and teachings of this application, the features described in the various embodiments and / or claims of this application may be combined and / or coupled in various ways, and all such combinations and / or couplings fall within the scope of this application.
Claims
1. A friend recommendation method based on community search, characterized in that: It is used to use community search on the attribute graph to find communities that meet the requirements and recommend friends based on the communities. The method includes the following steps: Build an attribute graph based on the original data; find vertices on the graph that do not affect the connectivity of the graph after removal; iteratively use a greedy strategy to find vertices that maximize the dense modularity of the graph after removal; and make friend recommendations based on the communities obtained after the iteration. The method for constructing a property graph based on raw data is: S101: Take the input user set V and its keywords, user relationships, starting vertex set V0 and starting keyword set L, and preset keyword distance D; There are n vertices in the starting vertex set V0 and m keywords in the starting keyword set L; S102: Construct an attribute graph G = (V, E, W) based on the input user set, its keywords, and user relationships, and mark V0 as the corresponding vertex, where V is the input user set, E is the edge set in the input user, and W is the keyword of the input user; S103: Select a vertex v0 from V0, calculate the shortest path from v0 to other vertices in V0, and take the union of the vertices in all shortest paths as the connected graph V1; The method of finding vertices on the graph that do not affect the connectivity of the graph after removal is as follows: S201: Calculate the distance dist(u,v) from each vertex in V0 to other vertices, u∈V0, v∈V-V1; u is a vertex in V0, v is a vertex in V-V1; S202: Calculate the distance between the vertex set u0 and other vertices v: dist(v) = min(dist(u,v)), v∈V0; S203: Classify the vertices in V-V1 into S1...S according to the size of dist(v) d ; S1 is the vertex where dist(v)=1, S d is the vertex where dist(v)=d; S The vertices in d are the vertices that do not affect the connectivity of the graph after being eliminated; The iterative greedy strategy is used to find the vertices that maximize the dense modularity of the graph after removal, specifically: S301: Let C = C0 = G, and calculate the dense modularity DM(G, C) of C; S302: Calculate the keyword distance from the vertex in G to L; S303: Calculate the keyword distance kdist(C, L) from C to L; S304: Calculate S d The density ratio of the middle vertex; S305: Find S d The vertex v1 with the largest density in S d and C0 removed; S306: Update the density ratio of the neighbor vertices of v1; S307: Calculate the dense modularity DM(G, C0) of C0 and the keyword distance kdist(C0, L) from C to L. If DM(G, C0)>DM(G, C) and kdist(C0, L)≤D, set C=C0, otherwise go to S308; S308: If S d If not empty, proceed to S305, otherwise proceed to S309; S309: Decrement d by 1. If d>0, proceed to S308. Otherwise, output C, where C is the community with the maximum dense modularity obtained after removing the vertices.
2. A friend recommendation method based on community search according to claim 1, characterized in that: The method for recommending friends based on the community obtained after the iteration is as follows: Let C-V1 be the new C; sort the vertices in C from small to large according to the keyword distance; output the vertices in C in order, and the vertices output first have higher recommendation priority.
3. A friend recommendation system based on community search, characterized in that: It is used to use community search on the attribute graph to find communities that meet the requirements and recommend friends based on the communities. The system specifically includes the following modules: The attribute graph construction module receives the input raw data and constructs the attribute graph based on the raw data; The module for selecting vertices irrelevant to graph connectivity is used to find vertices on the constructed attribute graph that do not affect graph connectivity after being removed; A graph dense modularity-related vertex selection module is configured to iteratively use a greedy strategy to find vertices that maximize the graph dense modularity after removal, selected from the graph connectivity-irrelevant vertex selection module, which do not affect the graph connectivity after removal. The friend recommendation module is used to recommend friends based on the community obtained by the vertex selection module related to the dense modularity of the graph; The property graph construction module is specifically: The input of the attribute graph construction module includes: input user set V and its keywords, user relationships, starting vertex set V0 and starting keyword set L, and preset keyword distance D; There are n vertices in the starting vertex set V0 and m keywords in the starting keyword set L; This attribute graph construction module constructs an attribute graph G = (V, E, W) based on the input user set, its keywords, and user relationships, and marks V0 as the corresponding vertex, where V is the input user set, E is the edge set in the input user, and W is the keyword of the input user. It selects a vertex v0 from V0, calculates the shortest path from v0 to other vertices in V0, and takes the union of the vertices in all shortest paths as the connected graph V1. The module for selecting vertices irrelevant to the graph connectivity is specifically: Calculate the distance dist(u,v) from each vertex in V0 to other vertices, u∈V0, v∈V-V1; u is a vertex in V0, v is a vertex in V-V1; Calculate the distance from vertex set V0 to other vertices v: dist(v) = min(dist(u,v)), u∈V0; According to the size of dist(v), the vertices in V-V1 are classified into S1...S d ; S1 is the vertex where dist(v)=1, S d is the vertex where dist(v)=d; S d The vertices in are the vertices extracted by the graph connectivity irrelevant vertex selection module and which do not affect the graph connectivity after being removed; The graph dense modularity related vertex selection module specifically adopts the following steps: S301: Let C = C0 = G, and calculate the dense modularity DM(G, C) of c; S302: Calculate the keyword distance from the vertex in G to L; S303: Calculate the keyword distance kdist(C, L) from C to L; S304: Calculate S d The density ratio of the middle vertex; S305: Find S d The vertex v1 with the largest density in S d and C0 removed; S306: Update the density ratio of the neighbor vertices of v1; S307: Calculate the dense modularity DM(G, C0) of C0 and the keyword distance kdist(C0, L) from C to L. If DM(G, C0)>DM(G, C) and kdist(C0, L)≤D, set C=C0, otherwise go to S308; S308: If S d If not empty, proceed to S305, otherwise proceed to S309; S309: Decrement d by 1. If d>0, proceed to S308. Otherwise, output C, which is the community with the maximum dense modularity obtained after removing the vertices.
4. A friend recommendation system based on community search according to claim 3, characterized in that: The friend recommendation module specifically comprises the following steps: setting C-V1 as a new C; sorting the vertices in C from small to large according to the keyword distance; and outputting the vertices in C in order, with the vertices output first having a higher recommendation priority.
Citation Information
Patent Citations
Linear time friend recommendation method and system, terminal and storage medium
CN113836444A
Community search algorithm based on k-kernel
WO2016078368A1