A method for retrieving neighboring communities in location-based social networks

By sorting the nodes around the query point in the location social network by distance and performing k-core decomposition, combined with the three-point concircle algorithm, the problem of high cost of community retrieval in the existing technology is solved, and efficient neighborhood community retrieval is achieved.

CN113886714BActive Publication Date: 2025-01-14HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111169576.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-08
Publication Date
2025-01-14
Estimated Expiration
2041-10-08

AI Technical Summary

Technical Problem

In the process of searching for nearby communities in location-based social networks, existing technologies need to traverse a large number of communities to determine their geographical location, resulting in high search costs and low efficiency, especially when performing on large datasets.

Method used

By sorting the nodes around the query point in the social network by distance, the search range of each possible key node is limited, and the k-core decomposition and three-point concircle algorithm are used to narrow down the search area, so as to quickly determine the neighboring communities.

Benefits of technology

It effectively narrows the search scope of community retrieval, reduces computational complexity, improves retrieval efficiency, and can quickly return query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886714B_ABST
    Figure CN113886714B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of computer application technology, and discloses a method for retrieving neighboring communities in a location social network, including step 1, abstraction of the location social network; step 2, initialization of a list of pending nodes ListV for query; step 3, searching for an area corresponding to a node p in ListV; to a node list ListC; step 4, checking whether a circular area in which any two nodes and p are in a circle in ListC contains a k-core community (with a radius less than r); adding the found k-core community to ListKC; step 5, repeating the execution until ListV is empty or |ListKC|>k; step 6, returning a result list ListKC. After the nodes of the present invention are sorted by distance, it is not necessary to retrieve all communities in subsequent queries, and whether a node is a key node can be determined by searching only a part of the area around the node, thereby quickly returning the query result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer application technology, and in particular relates to a method for retrieving neighboring communities in a location social network. Background Art

[0002] With the popularization of computer networks, social network applications have entered people's daily lives. As more and more users log in to social networks using mobile devices such as smartphones, a new type of location-based social networks, LBSNs (location-based social networks), has emerged because smartphones have location attributes obtained from devices such as GPS. In LBSNs, a community consisting of a group of interconnected users takes into account the connection restrictions between users and the geographical location of each user. Therefore, the definition of the community has new location attribute requirements. LBSNs have many new applications, such as a merchant recommending services to nearby users.

[0003] Among the LBSNs recommendation applications, there is a community recommendation application that is suitable for recommendation applications for some multi-person or collective consumption projects. For example, if there is a badminton hall that is doing promotion, it can do promotion activities for some people who often come to play badminton nearby. Then it is obviously more effective to carry out targeted promotion for a small community (people who are geographically close and connected to each other, such as people who are usually connected nearby and often come to play badminton together) than to send group messages to all customers.

[0004] However, it is very time-consuming or difficult to search for user communities that are connected to each other, live nearby, and are relatively close to each other in location social networks. The usual approach is to find all the communities around the query node (such as the badminton hall), and judge these communities to see if they meet certain geographical location range restrictions, such as whether all nodes in the community are within a certain distance range, and then return the nearest community, the next closest community, and so on in turn based on the distance relationship between these communities and the query node. Since it is necessary to traverse all communities in the social network, judge their geographical location ranges, and then sort and return the results, the entire retrieval operation is costly and is particularly unsuitable for performing such search tasks on large data sets. Summary of the invention

[0005] The present invention aims to provide a method for retrieving neighboring communities in a location social network, so as to solve the technical problem that the existing community retrieval needs to traverse a large number of circular areas and has complex calculations.

[0006] In order to solve the above technical problems, a specific technical solution of a method for retrieving neighboring communities in a location social network of the present invention is as follows:

[0007] A method for retrieving neighboring communities in a location social network includes the following steps:

[0008] Step 1: Abstraction of location social network;

[0009] Step 2: Initialize the query pending node list ListV;

[0010] Step 3: Search the area corresponding to a node p in ListV; go to the node list ListC;

[0011] Step 4: Check whether the circular area where any two nodes and the three points p are in the same circle in ListC contains a k-core community (with a radius less than r); add the found k-core community to ListKC;

[0012] Step 5: Repeat until ListV is empty or |ListKC|>k;

[0013] Step 6: Return the result list ListKC.

[0014] Furthermore, the specific steps of step 1 are as follows:

[0015] Abstract all user nodes in a social network and represent them as a set of nodes V. The connections between users are represented as edges between two nodes, represented by a set of edges E. Each node v has a position attribute position v .

[0016] Furthermore, step 2 includes the following specific steps:

[0017] The user inputs the query conditions n, r, q, where q refers to the query point, n is the number of communities required to be returned, and r is the minimum radius of a circle that can cover the nodes of a returned community; with q as the center, all nodes in the social network graph are sorted according to their Euclidean distance from node q, and they are stored in a list ListV.

[0018] Furthermore, step 3 determines the search area of ​​a node, and performs k-core decomposition on the subgraph of this area to obtain a node list ListC included in the k-core community; the specific steps are as follows:

[0019] Step 3-1: Pop up a node p from the list ListV for operation;

[0020] Step 3-2: Get the search area V' of node p;

[0021] V'={v | v∈V & |q,p|<|q,p| & |p,v|≤2r} Formula-(1)

[0022] The symbol “||” used in formula (1) represents the distance between two points. The node v contained in the regional node set V' defined by the formula has three properties: first, v belongs to V; the distance between v and the query point q is less than the distance between p and the query point q, or in other words, the node v is located between nodes p and q; the distance between node v and node q is less than 2r;

[0023] Step 3-3, check whether the number of nodes in V' is less than k. If the number of nodes is less than k, repeat step 3-1;

[0024] Step 3-4: split the subgraph G'=(V',E') containing only the node set V' from the social network graph G;

[0025] Step 3-5: Perform k-core decomposition on the subgraph G'=(V',E');

[0026] The process of k-core decomposition is to sort the subgraph G' according to the degree of each node, iteratively delete all nodes with a degree less than k and the edges adjacent to the node, and the remaining graph is the k-core; the obtained k-core subgraph is checked for its connectivity using the union-find algorithm;

[0027] Step 3-6, insert all nodes in the k-core community obtained in step 3-5 into list ListC;

[0028] Step 3-7: Sort the list ListC by node name.

[0029] Furthermore, the specific steps of step 4 are as follows:

[0030] Step 4-1, initialize the list ListKC;

[0031] Step 4-2, set the loop variable i to 2, and execute steps 4-3 and 4-4 until the value of i exceeds |ListC|, where |ListC| represents the number of nodes in the list;

[0032] Step 4-3, set the loop variable j to 1, and execute step 4-4 until the value of j exceeds i-1;

[0033] Step 4-4: This step includes the following operations:

[0034] Take the node p, the nodes ListCi and ListCj in the list ListC, use the three-point common circle algorithm to determine the minimum radius circle covering these three points, and use circle to represent this circle;

[0035] Determine whether the radius of circle is less than r. If the radius is less than r, perform the following operations:

[0036] Get the set S consisting of all nodes contained in the circle according to the position relationship;

[0037] Perform k-core decomposition on the subgraph formed by the node set S, check connectivity, and determine whether it contains a k-core community that meets the definition of the present invention;

[0038] If there is a k-core community, insert it into the list ListKC;

[0039] Repeat step 4-4 until the loop control conditions in steps 4-2 and 4-3 are false.

[0040] Furthermore, step 5 includes the following specific steps:

[0041] If the list ListV is not empty and the length of the result list ListKC is less than k, that is, not all nodes have been searched, and the number of k-core communities required by the query has not been reached, repeat steps 3 and 4.

[0042] The present invention provides a method for retrieving neighboring communities in a location social network, which has the following advantages: the present invention aims at the retrieval requirements of neighboring communities of a query point in the location social network, by sorting the nodes around a query point by distance, limiting the community search range of each possible key node, and does not need to search all existing communities in the location social network, thereby speeding up the entire search query process. The characteristic is that after the nodes are sorted by distance, it is not necessary to search all communities in the subsequent query, and it is only necessary to search the partial area around the node to determine whether a node is a key node, and then quickly return the query result. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A schematic diagram of the steps of a method for retrieving a neighboring community in a location social network of the present invention;

[0044] Figure 2 A schematic diagram of a social network node according to an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of the search range of a node neighboring community of the present invention. DETAILED DESCRIPTION

[0046] In order to better understand the purpose, structure and function of the present invention, a method for retrieving neighboring communities in a location social network of the present invention is further described in detail below with reference to the accompanying drawings.

[0047] In the present invention, LBSNs is defined as a network G(V,E), where V is the node set of all users in the social network, E is the connection (edge) between all users in the network, and each node v has a position attribute position v .

[0048] The social network community referred to in the present invention is a k-core community. The k-core community is a connected subgraph C in the social network G(V,E), and the user nodes in this connected subgraph meet the predefined closeness criteria, that is, meet the following two conditions:

[0049] 1. The user nodes contained in community C have at least k (k is a non-negative integer) adjacent nodes, that is, the degree of all nodes in the subgraph composed of these user nodes is greater than or equal to k;

[0050] 2. There is a path between any two user nodes in community C, that is, any two user nodes in the community are connected.

[0051] The user neighborhood community search query involved in the present invention refers to inputting a user node q (query point) to retrieve n k-core communities {C1, C2, C3...Cn} near it and sorted by distance. The distance sorting standard is the distance between the query point and the node farthest from the query point among the nodes contained in each community. In addition, these returned communities must also meet the range restriction condition, and all nodes in the community are covered by a circle with a radius of r. Here n and r are the query conditions input by the user.

[0052] In the process of searching for the neighboring communities of the query point in the social network, the conventional method of distance sorting by judging the geographical location range limitation needs to traverse a large number of circular areas, and the number of traversals is the combination of three nodes randomly selected from the number of nodes, which is complicated to calculate. However, if the node farthest from the query point in a community is defined as a key node, then the nodes are first sorted according to the distance between each node and the query point, and then these nodes are checked in order from near to far to see if they are key nodes, that is, whether this node is the farthest node from the query point in a certain community. Obviously, the search range can be narrowed, and the node combination of the candidate circular area is changed from three to two (because the key node has been determined), thereby reducing the cost of the entire search. Based on this observation, the present invention accelerates the search query process of neighboring communities in the location social network by limiting the search range of each possible key node and checking whether there is a community that meets the conditions in this smaller range.

[0053] like Figure 1 As shown, the specific steps of the method of the present invention are as follows:

[0054] Step 1: Abstraction of location social network;

[0055] Abstract all user nodes in a social network and represent them as a set of nodes V. The connections between users are represented as edges between two nodes, represented by a set of edges E. Each node v has a position attribute position v .

[0056] Step 2: The user inputs the query conditions n, r, q, where q refers to the query point, n is the number of communities to be returned, and r is the minimum radius of a circle that can cover the nodes of a returned community. In this step, with q as the center, all nodes in the social network graph are sorted according to their Euclidean distance from node q, and they are stored in a list ListV.

[0057] Step 3: Determine the search area of ​​a node, and perform k-core decomposition on the subgraph of this area to obtain the node list ListC contained in the k-core community;

[0058] The specific process is as follows:

[0059] 3-1 Pop up a node p from the list ListV for operation.

[0060] 3-2 Obtain the search area V' of node p

[0061] V'={v | v∈V & |q,p|<|q,p| & |p,v|≤2r} Formula-(1)

[0062] The symbol "||" used in formula (1) represents the distance between two points. The node v included in the regional node set V' defined by the formula has three properties: first, v belongs to V; the distance between v and the query point q is less than the distance between p and the query point q, or the node v is located between nodes p and q; the distance between node v and node q is less than 2r. Since the query referred to in the present invention is to return a community with p as the key node (referring to the existence of a community, in which the node farthest from the query point is p), and can be covered by a circle with a radius of r, these nodes must be located in the area referred to by formula (1).

[0063] 3-3 Check whether the number of nodes in V' is less than k. If the number of nodes is less than k, repeat step 3-1.

[0064] If the number of nodes is less than k, then it is obvious that the V' node cannot form a k-core, or p cannot become a key node, so there is no need to perform subsequent operations on the p node.

[0065] 3-4 Split the subgraph G'=(V',E') containing only the node set V' from the social network graph G.

[0066] 3-5 Perform k-core decomposition on the subgraph G'=(V',E').

[0067] The basic process of k-core decomposition is to sort the subgraph G' according to the degree of each node, iteratively delete all nodes with a degree less than k and the edges adjacent to the node, then the remaining graph is the k-core.

[0068] The obtained k-core subgraph is then checked for connectivity using the union-find algorithm.

[0069] 3-6 Insert all nodes in the k-core community obtained in step 3-5 into list ListC.

[0070] 3-7 Sort the list ListC by node name.

[0071] Step 4: Search the community;

[0072] Take any two nodes in the node list ListC obtained in step (3), and check whether a circular area with a radius less than r determined by the three nodes formed by them and the p node contains a k-core community that meets the definition of the present invention. If such a community exists, insert it into the list ListKC.

[0073] The specific process is as follows:

[0074] 4-1 Initialize the list ListKC.

[0075] 4-2 Set the loop variable i to 2, and execute 4-3 and 4-4 until the value of i exceeds |ListC|, where |ListC| represents the number of nodes in the list.

[0076] 4-3 Set the loop variable j to 1 and execute step 4-4 until the value of j exceeds i-1.

[0077] 4-4 This step includes the following operations:

[0078] Take node p and node ListC in list ListC i、 ListC j , use the three-point common circle algorithm to determine the minimum radius circle covering these three points, and use circle to represent this circle.

[0079] Determine whether the radius of circle is less than r. If the radius is less than r, perform the following operations:

[0080] Get the set S consisting of all nodes contained in the circle according to the position relationship;

[0081] Perform k-core decomposition on the subgraph formed by the node set S, check connectivity, and determine whether it contains a k-core community that meets the definition of the present invention;

[0082] If there is a k-core community, insert it into the list ListKC;

[0083] Repeat step 4-4 until the loop control conditions in steps 4-2 and 4-3 are false.

[0084] Step 5: If the list ListV is not empty and the length of the result list ListKC is less than k, that is, all nodes have not been searched and the number of k-core communities required by the query has not been reached, then repeat steps 3 and 4.

[0085] Step 6: Return the result list ListKC.

[0086] Figure 2 is an example of the present invention. In this graph, the upper nodes and the edges between the nodes represent a social network user and the connection between the users; the lower network is the actual location of each user node. If the node v10 is the query point, the k value is 3. Then the node sets {v1, v2, v5, v6}, {v4, v5, v8, v9} and {v2, v3, v6, v7} are 3-core communities, each consisting of 4 nodes.

[0087] However, observing the actual positions of the nodes in the lower graph, only the nodes in {v4,v5,v8,v9} and {v2,v3,v6,v7} fall within the circular area with a radius of r. Therefore, only these two 3-core communities will be returned in the query.

[0088] Figure 3 Represents the search range of a node's neighboring community. With the query point v10 as the center, the surrounding nodes are sorted according to their distance from v10 to obtain a list<v6,v1,v2,v9,v7,v5,v8,v3,v4> .

[0089] According to step 3 of the present invention, node v3 is first checked, and it is found that within the area defined in step 3, that is, between nodes v3 and v10, within the distance range 2r from v3, there are not enough nodes to form a 3-core community.

[0090] Step 3 is repeated to obtain nodes v1, v2, v9, v7, v5, and v8 from the list, and it is found that they all belong to the situation similar to node v3.

[0091] When checking node v3, we find nodes v2, v6, and v7 in the shaded area of ​​the graph, which satisfy the 3-core community condition. Step 4 checks the combination of these nodes to determine if they all fall within a circular area of ​​radius r.

[0092] Similarly, after node v3, a search found that there is also a community {v4,v5,v8,v9} that meets the conditions.

[0093] The retrieval process returns { v2,v3,v6,v7} and {v4,v5,v8,v9}, ending the search.

[0094] It is to be understood that the present invention is described by some embodiments, and it is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the scope of protection of the present invention.

Claims

1. A method for retrieving neighboring communities in a location social network, characterized in that: The steps include: Step 1: Abstraction of location social network; Step 2: Initialize the query pending node list ListV; Step 3: Search the area corresponding to a node p in ListV; go to the node list ListC; Determine the search area of ​​a node, and perform k-core decomposition on the subgraph of this area to obtain the node list ListC contained in the k-core community; the specific steps are as follows: Step 3-1: Pop up a node p from the list ListV for operation; Step 3-2: Get the search area V' of node p; V'={v | v∈V & |v,p|<|q,p| & |p,v|≤2r} Formula-(1) The symbol "||" used in formula (1) represents the distance between two points. The node v contained in the regional node set V' defined by the formula has three properties: first, v belongs to V; the distance between v and the query point p is less than the distance between q and the query point p, or in other words, the node v is located between nodes p and q; the distance between node v and node p is less than or equal to 2r; Step 3-3, check whether the number of nodes in V' is less than k. If the number of nodes is less than k, repeat step 3-1; Step 3-4: split the subgraph G'=(V',E') containing only the node set V' from the social network graph G; Step 3-5: Perform k-core decomposition on the subgraph G'=(V',E'); The process of k-core decomposition is to sort the subgraph G' according to the degree of each node, iteratively delete all nodes with a degree less than k and the edges adjacent to the node, and the remaining graph is the k-core; the obtained k-core subgraph is checked for its connectivity using the union-find algorithm; Step 3-6, insert all nodes in the k-core community obtained in step 3-5 into list ListC; Step 3-7, sort the list ListC by node name; Step 4: Check whether the circular area where any two nodes in ListC and three points p are in the same circle contains a k-core community. The radius of the circular area is less than r. The k-core community is a connected subgraph C in the social network G(V,E). The user nodes in this connected subgraph meet the predefined compactness criteria; that is, it meets the following two conditions:

1. The user nodes contained in community C have at least k adjacent nodes, that is, the degree of all nodes in the subgraph composed of these user nodes is greater than or equal to k; Second, there is a path between any two user nodes in community C, that is, any two user nodes in the community are connected; Add the discovered k-core communities to ListKC; Step 4-1, initialize the list ListKC; Step 4-2, set the loop variable i to 2, and execute steps 4-3 and 4-4 until the value of i exceeds |ListC|, where |ListC| represents the number of nodes in the list; Step 4-3, set the loop variable j to 1, and execute step 4-4 until the value of j exceeds i-1; Step 4-4: This step includes the following operations: Take the node p, the nodes ListCi and ListCj in the list ListC, use the three-point common circle algorithm to determine the minimum radius circle covering these three points, and use circle to represent this circle; Determine whether the radius of circle is less than r. If the radius is less than r, perform the following operations: Get the set S consisting of all nodes contained in the circle according to the position relationship; Perform k-core decomposition on the subgraph composed of the node set S and check its connectivity to determine whether it contains a k-core community that meets the above definition; If there is a k-core community, insert it into the list ListKC; Repeat step 4-4 until the loop control conditions in steps 4-2 and 4-3 are false; Step 4-1, initialize the list ListKC; Step 4-2, set the loop variable i to 2, and execute steps 4-3 and 4-4 until the value of i exceeds |ListC|, where |ListC| represents the number of nodes in the list; Step 4-3, set the loop variable j to 1, and execute step 4-4 until the value of j exceeds i-1; Step 4-4: This step includes the following operations: Take the node p, the nodes ListCi and ListCj in the list ListC, use the three-point common circle algorithm to determine the minimum radius circle covering these three points, and use circle to represent this circle; Determine whether the radius of circle is less than r. If the radius is less than r, perform the following operations: Get the set S consisting of all nodes contained in the circle according to the position relationship; Perform k-core decomposition on the subgraph composed of the node set S and check its connectivity to determine whether it contains a k-core community that meets the above definition; If there is a k-core community, insert it into the list ListKC; Repeat step 4-4 until the loop control conditions in steps 4-2 and 4-3 are false; Step 5: Repeat until ListV is empty or |ListKC|>k; Step 6: Return the result list ListKC.

2. The method for retrieving neighboring communities in a location social network according to claim 1, characterized in that: The specific steps of step 1 are as follows: Abstract all user nodes in a social network and represent them as a set of nodes V. The connections between users are represented as edges between two nodes, represented by a set of edges E. Each node v has a position attribute position v .

3. The method for retrieving neighboring communities in a location social network according to claim 1, characterized in that: Step 5 includes the following specific steps: If the list ListV is not empty and the length of the result list ListKC is less than k, that is, not all nodes have been searched, and the number of k-core communities required by the query has not been reached, repeat steps 3 and 4.