A Community Retrieval Method Based on the Diversity of User Geographical Locations
By modeling and k-core decomposition of user check-in data, combined with EDC-index index structure, the problem of ignoring geographical location information in traditional methods is solved, and community retrieval of cross-regional user groups is achieved efficiently.
Patent Information
- Application Number
- CN202210340345.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-04-02
AI Technical Summary
Traditional user community analysis methods ignore users' geographical location information and cross-regional relationships, making it difficult to efficiently aggregate cross-regional user groups with similar behavioral characteristics in social networks based on location information.
By preprocessing user check-in data, establishing geographical location area tags, using the k-core decomposition algorithm to decompose social networks into groups with close social connections, and building an EDC-index index structure to search community based on geographical location diversity and social relationship constraints.
It realizes efficient aggregation of cross-regional user groups with similar behavioral characteristics in social networks, and improves the query efficiency and accuracy of community retrieval.
Smart Images

Figure CN114691958B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer applications. More specifically, the present invention relates to a community retrieval method based on the diversity of user geographical locations. Background Art
[0002] In recent years, with the continuous popularization of intelligent terminals, social networks based on user location information have become increasingly popular. In the application of social networks, a user community refers to a subgraph composed of a group of users with close internal connections and sparse external connections in a network (usually represented by a graph). User community analysis is an important part of social network analysis and research. Since a large amount of check-in data has been accumulated in the social network based on location information, and the geographical location information of these check-ins contains the behavioral characteristics of users, aggregating cross-regional user groups with similar behavioral characteristics is of great significance for applications such as cross-regional point-of-interest recommendation and marketing. However, traditional user community analysis methods often only focus on the social connections between users, ignoring the location information of users and the cross-regional relationship of geographical locations between users.
[0003] The innovation of the present invention lies in considering the diversity and mutual relationship of geographical locations between users during user community retrieval, and designing a suitable indexing technology to accelerate this retrieval process. Summary of the Invention
[0004] The object of the present invention is to overcome the deficiencies of the existing technologies, fully consider the diversity of user geographical location information, and aggregate user communities in the location social network. Given a social network G=(E, V), where V is the set of user nodes and E is the set of connections between users, that is, the set of edges between users. The geographical location attribute involved in the present invention is not specific longitude and latitude information, but the regional information of the user. For example, using the user ai (ai∈V) to represent that the geographical location of this user belongs to area A, and similarly, the user cj (cj∈V) represents that the geographical location of this user belongs to area C. The user community involved in the present invention refers to the k-core community. A k-core community satisfies three conditions: (1) the degrees of all user nodes in the community are greater than or equal to k (k is an integer), that is, the number of neighbors of any node is greater than or equal to k; (2) the subgraph formed by the nodes in the community is connected, that is, there is at least one path between any two nodes; (3) the k-core community is the maximum subgraph that satisfies conditions (1) and (2). In the present invention, if there is a third user ai' (ai'∈V), the two edges (ai, ai') and (ai, cj) represent different meanings. (ai, ai') represents the connection between users in the same region, while (ai, cj) represents the connection between users in different regions. The object of the present invention is to return the top-ranked user communities according to the degree of closeness of the connections between users in different regions in the community.
[0005] The present invention proposes a community retrieval method based on the diversity of user geographical locations. In a set of k-core communities, all communities are ranked according to the degree of connection between user nodes in different geographical location regions within the community, and the top-n user communities ranked in the top n are returned. Another innovation of the present invention lies in accelerating the query process by building an index on the edges for all communities.
[0006] The specific technical solution adopted by the present invention is as follows:
[0007] A community retrieval method based on the diversity of user geographical locations, comprising the following steps:
[0008] Step 1, data preprocessing of the geographical social network, modeling and integrating the check-in data of users, and finding the geographical location region of the user as its region label;
[0009] Step 2, using the community decomposition method to decompose the users in the location social network into one or more groups with close social connections, that is, performing k-core decomposition on the social network;
[0010] Step 3, establishing an EDC-index index structure; establishing an index structure of user communities according to the geographical location region information between user nodes or the connection between region labels;
[0011] Step 4, based on the input set of expected region labels, the social relationship constraint degree k value, and the number of communities n expected to be returned, query for user communities whose geographical location information diversity degree ranks in the top n and satisfies the social relationship constraints;
[0012] Step 5, returning the query result, that is, returning the n user communities in the priority queue.
[0013] Further, Step 1 is specifically as follows:
[0014] For each user in the dataset, obtain the corresponding set of all check-in locations L(U i ) = {l1, l2,...}, first clean its check-in data, calculate the offset dist(i) of each check-in location = avg(l i -l k ), l k ∈L(U i ), where l k refers to other check-in information other than l i ; delete the noisy check-in information with a very large dist offset, and then use the clustering algorithm to find a circle that contains as many check-in locations as possible and has the smallest possible radius, and then use the geographical location region where the center of the circle is located as the region label of the user.
[0015] Further, in step two, the k-core decomposition algorithm is used. First, all graph nodes are sorted in descending order according to their degrees. For a given graph G, the core number is defined as an integer ω, where v is a node of the ω-core of graph G. Then, the node v with the smallest degree is selected, and d is used to record the degree of the current node. All nodes with degree d and their edges are deleted, and it is determined whether the degrees of all remaining nodes are all greater than d. If not, nodes with degrees less than d and their edges are continuously deleted until the degrees of all nodes are greater than d. At the same time, the core numbers of all deleted nodes in this round are assigned the value d. This process is continuously repeated until all nodes are processed.
[0016] Further, in step three, based on the core numbers obtained by the decomposition in step two, all graph nodes and edges are sorted according to the following rules:
[0017] Sorting of graph nodes: For a set L of graph node labels, if there is a subset A contains two labels li and lj, then the type order of the two labels is set as li < lj according to a certain rule in the sorting. If two labels belong to the same type, they are sorted according to the ID numbers of the graph nodes;
[0018] Sorting of edges: When representing an edge (u, v), the core value of u is always greater than or equal to that of v. For two edges (u, v) and (u’, v’), their order is as follows:
[0019] First, sort according to the core values of u and u’. If the core value of u is greater than the core-number value of u’, and the Order() function is used to represent the sorting of an edge, then Order((u, v)) < Order((u’, v’));
[0020] Secondly, if the core value of u is equal to the core value of u’, and the label type sorting of u is less than that of u’, then Order((u, v)) < Order((u’, v’));
[0021] If the core value of u is equal to the core value of u’, and the label type order of u is equal to that of u’, but the label type order of v is less than that of v’, then Order((u, v)) < Order((u’, v’)).
[0022] If the core value of u is equal to the core value of u’, the label type order of u is equal to that of u’, and the label type order of v is equal to that of v’, then the two edges are sorted according to the ID of the graph node;
[0023] After sorting is completed, construct the EDC-index tree index; the construction of the index uses the union-find data structure, and the edges are selected in the order agreed upon above during the construction process. Starting from the edges with higher sorting, the merging operations of the edges are performed in sequence to generate the tree nodes in the index; when generating the index nodes, the attributes of the tree nodes are statistically calculated by the way.
[0024] Furthermore, in step 4, after constructing the EDC-index, the entire social network is decomposed into several k-core communities; only the subgraph formed by one k-core community is stored in the EDC-index. Given a set of geographical tags, an integer k, and an integer n, the query results are obtained by searching the k-list list of the EDC-index.
[0025] Furthermore, the specific query process is as follows:
[0026] 4-1 Search the k-list with the core number equal to k according to the input query value k;
[0027] 4-2 Use EDD (Edge Diversity Degree) to represent the geographical location diversity of a user community; use the minimum priority queue to store the search results, and the length of the priority queue is the input n; the priority queue stores the user communities with the top n EDD values found currently; each time a new user community is found and its EDD value is greater than the community at the top of the priority queue, then insert this community into the priority queue;
[0028] 4-3 For each tree node in the k-list list, search its corresponding subtree: first traverse the subtree and merge the geographical location tags of each child node from bottom to top; if it is found that the geographical location tag after merging a tree node contains the input tag set Q, that is, the merged tag contains Q, then perform the EDD statistics on the user community corresponding to this tree node; after the EDD value is statistically calculated, if the result is greater than the EDD value of the tree node at the top of the priority queue, then this tree node is pushed into the priority queue;
[0029] 4-4 After traversing the subtree in a k-list tree node, search the next tree node in the k-list until the entire EDC-index is traversed.
[0030] The beneficial effects of adopting this technical solution:
[0031] The present invention innovatively uses user check-in data as the basis, utilizes an effective semantic distance conversion model, converts spatial locations into semantic geographical location tags, establishes an efficient indexing mechanism, and provides queries for social network user communities based on geographical location diversity in different scenarios. Since this method uses a tag conversion model based on regional information and designs a suitable index structure, it has higher query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] To more clearly elaborate on the technical process of the present invention, the following further explains the drawings required for the present invention;
[0033] Figure 1 is the overall flowchart of the method of the present invention;
[0034] Figure 2 is an example of a social network based on location information of the present invention;
[0035] Figure 3 is a parameter diagram of the node situation during the construction of the EDC-index index structure;
[0036] Figure 4 is a schematic diagram of the construction process of the EDC-Index index structure of the present invention;
[0037] Figure 5 An example diagram of the EDC-Index index structure;
[0038] Figure 6 is the flowchart of the geographical diversity user community search based on the input query parameters of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] The following further explains the present invention with reference to the drawings.
[0040] As Figure 1 shown, the community retrieval method based on user geographical location diversity of the present invention includes the following steps:
[0041] Step 1: Data preprocessing of the geographical social network, modeling and integrating the user check-in data, finding the geographical location area of the user as its area tag, and establishing a basis for subsequent community retrieval of user diversity;
[0042] Step 2: Use the community decomposition method to decompose the users in the location social network into one or more groups with close social connections, that is, perform k-core decomposition on the social network;
[0043] Step 3. On the basis of Steps 1 and 2, establish an EDC-index index structure. According to the geographical area information between user nodes or the connection between area tags, establish an index structure for user communities, which can accelerate the query process of diverse user communities;
[0044] Step 4. Based on the input set of expected area tags and the social relationship constraint degree k value, and the number of communities n expected to be returned, query user communities whose geographical location information diversity degree ranks among the top n and satisfies social relationship constraints.
[0045] Step 5. Return the query result.
[0046] In Figure 1 the overall flowchart of the method of the present invention shown, the specific implementation of Step 1 is as follows:
[0047] For each user in the dataset, obtain the corresponding set of all check-in locations L(U i ) = {l1, l2,...}. First, clean its check-in data, calculate the offset dist(i) of each check-in location = avg(l i - l k ), l k ∈ L(U i ), where l k refers to other check-in information other than l i . Delete the noisy check-in information with a very large dist offset, and then use a clustering algorithm to find a circle that contains as many check-in locations as possible and has the smallest possible radius, and then use the geographical location area where the center of the circle is located as the area tag of the user.
[0048] Figure 2 Figure 3 shows an example in a geosocial network, where a, b, and c represent three different area tags. For ease of understanding, the graph nodes are named with their area tags, which are obtained by modeling in Step 1, and the user groups circled by the dotted line are two user groups with relatively close social relationships obtained by the k-core decomposition algorithm in Step 3 described below.
[0049] The specific implementation of Step 2 is as follows:
[0050] In this step, the k-core decomposition algorithm is used. First, all graph nodes are sorted in descending order according to their degrees. In the present invention, for a given graph G, the core number is defined as an integer ω, where v is a node of the ω-core of graph G but not a node of the (ω + 1)-core of graph G. Then, the node v with the smallest degree is selected, and d is used to record the degree of the current node. All nodes with degree d and the edges of these nodes are deleted, and it is judged whether the degrees of all remaining nodes are all greater than d. If not, continue to delete nodes with degrees less than d and the edges of these nodes until the degrees of all nodes are greater than d. At the same time, assign the core-number of all deleted nodes in this round to d. Repeat this process continuously until all nodes are processed.
[0051] Figure 2 The nodes that form the intermediate connected component, namely the graph nodes (a1, a2, a3, b1, b2, b3, c1, c2), after this step, the core-number of graph nodes a2, b1, b2, c2 is 3, the core-number of nodes a1, b3 is 2, and the core-number of nodes a3, c1 is 1.
[0052] The specific implementation of Step 3 is as follows:
[0053] In this step, based on the core-number obtained by decomposition in Step 2, all graph nodes and edges are sorted according to the following rules:
[0054] Sorting of graph nodes: For a set of graph node labels L, if there is a subset A contains two labels li and lj, then set the type order of the two labels as li < lj according to a certain rule in the sorting; if the two labels belong to the same type, they are sorted according to the ID number of the graph node.
[0055] Sorting of edges: When representing an edge (u, v), the core-number value of u is always greater than or equal to v. For two edges (u, v) and (u’, v’), their order is as follows:
[0056] First, sort according to the core-number values of u and u’. If the core-number value of u is greater than the core-number value of u’, and the Order() function is used to represent the sorting of an edge, then Order((u, v)) < Order((u’, v’)).
[0057] Secondly, if the core - number value of u is equal to the core - number value of u', but the sorting of the label types of u is less than that of u', then Order((u, v)) < Order((u', v')).
[0058] If the core - number value of u is equal to the core - number value of u', and the order of the label types of u is equal to the order of the label types of u', but the order of the label types of v is less than the order of the label types of v', then Order((u, v)) < Order((u', v')).
[0059] If the core - number value of u is equal to the core - number value of u', the order of the label types of u is equal to the order of the label types of u', and the order of the label types of v is equal to the order of the label types of v', then the two edges are sorted according to the IDs of the graph nodes.
[0060] After sorting, an EDC - index tree - shaped index is constructed. The construction of the index uses the union - find data structure. However, different from the general union - find operations, during the construction process, the edges are selected in the order agreed upon above. Starting from the edges with higher sorting, the union operations of the edges are performed in sequence to generate the tree nodes in the index. When generating the index nodes, the attributes of the tree nodes are counted by the way, such as the label set of the subtree to which the node belongs, etc. Specifically, a tree node contains the following attributes:
[0061] Set of subtree nodes; Set of subtree labels; List of edges corresponding to each label, classified according to the originating graph nodes of the edges and sorted according to the terminating nodes of the edges; Pointers, including pointers to the parent node, left and right sibling nodes of the index tree. For each k - core value, a k - list list is established in the index to facilitate subsequent searches.
[0062] Figure 3 Shown is a Figure 2 table of the tree node situations during the process of constructing the EDC - index index structure based on an example. To simplify the complexity of the table, only the index of the intermediate connected component part in Figure 2 is shown here, that is, the index of the graph nodes (a1, a2, a3, b1, b2, b3, c1, c2). Each row in the table in the figure represents the process of traversing the edges from top to bottom, starting from (a2, b1) and ending at (c1, c2), while from left to right represents the tree node situations in the index tree. Initially, all graph nodes are initialized as a tree node, and then each time an edge is traversed, a union merge operation is performed on the two tree nodes, and finally an index tree is obtained.
[0063] Figure 4The figure shows a schematic diagram of the process of constructing an EDC-index index structure using these graph nodes (a1, a2, a3, b1, b2, b3, c1, c2). This figure is constructed based on Figure 2 the geographical social network shown, where each tree node is a user group with close social relationships, and an inverted index of relevant edges is constructed in each tree node.
[0064] Figure 5 The figure shows the completed EDC-index index structure.
[0065] The specific implementation of Step Four is as follows:
[0066] In this step, based on the input set Q of expected region labels, the social relationship constraint degree k value, and the number n of communities to be returned, query user communities whose geographical location information diversity degree ranks among the top n. The specific steps are as follows:
[0067] After constructing the EDC-index in Step Three, the entire social network is decomposed into several k-core communities. Only the subgraph formed by one k-core community is stored in the EDC-index. Obviously, in the index, the child node is a part of the k-core community of the parent node. Therefore, each tree node corresponds to a user community. Given a set of geographical labels, the integer k, and n, the query result can be conveniently obtained by searching the k-list list of the EDC-index. For example, if the user inputs k = 3 and n = 9, then only need to search the list with k value greater than or equal to 3 and select the top 9 communities. During the search process, the minimum value of the geographical location information diversity known currently can be used to prune the EDC-index to speed up the search.
[0068] The query algorithm is divided into two steps:
[0069] Verification of labels: The k-core community corresponding to the tree node in the EDC-index actually contains the users in its subtree nodes. Therefore, it is necessary to consider the geographical location labels contained in the subtree nodes at the same time to determine whether they meet the query conditions.
[0070] Calculation of geographical location diversity: If the community corresponding to a tree node meets the requirements of geographical location labels, then the calculation of geographical location diversity is carried out, that is, counting the number of edges with different geographical location labels in the subtree. If the geographical location diversity calculated for the community corresponding to a tree node is higher than the existing n communities, then the newly discovered community is retained and the community with the smallest existing diversity is removed.
[0071] The specific process is as follows:
[0072] 4-1 Search for the k-list whose core-number is equal to k according to the input query value k.
[0073] 4-2 Use Edge Diversity Degree (EDD) to represent the geographical diversity of a user community. EDD is the ratio of the number of edges in different geographical regions in a user community to the total number of edges in the user community. Use a minimum priority queue to store the search results, and the length of the priority queue is the input n. What is stored in the priority queue are the currently discovered user communities with the top n EDD values sorted. Each time a new user community is discovered and its EDD value is greater than that of the community at the top of the priority queue, then this community is inserted into the priority queue. Since the length of the priority queue is n, the priority queue automatically deletes the user community with the original minimum EDD value. Therefore, there are always n or less than n user communities maintained in the priority queue.
[0074] 4-3 For each tree node in the k-list, search its corresponding subtree. First, traverse the subtree and merge the geographical location labels of each child node from bottom to top. If it is found that the merged geographical location label of a tree node contains the input label set Q, that is, the merged label contains Q, then perform EDD statistics on the user community corresponding to this tree node. Since all the edges have been arranged in a certain order, it is very convenient to complete the EDD statistics. After the EDD value is calculated, if the result is greater than the EDD value of the tree node at the top of the priority queue, then this tree node is pushed into the priority queue.
[0075] 4-4 After traversing the subtree in a k-list tree node, search for the next tree node in the k-list until the entire EDC-index is traversed.
[0076] Figure 6 What is shown is the query process in step four. Through the input query parameters k, S, n, processes such as k-core decomposition, index construction, and traversing tree nodes are carried out, and finally, the user group with the greatest geographical location information diversity in the geographical location social network is output.
[0077] Step Five: Return the query results, that is, return the n user communities in the priority queue.
Claims
1. A community retrieval method based on the diversity of user geographical locations, characterized in that The steps include: Step 1: Data preprocessing of geographic social network: Modeling and integrating the user's check-in data, and finding the user's geographic location area as its regional label; Step 2: Use community decomposition method to decompose users in the location social network into one or more groups with close social connections, that is, perform k-core decomposition on the social network; Step 3: Establish the EDC-index index structure; Establish an index structure of the user community based on the geographical location information or the connection between regional labels between user nodes; Step 4: Based on the input expected area label set and social relationship constraint degree k value, the expected number of communities n to be returned, query the user communities whose geographic location information diversity ranks in the top n and that meet the social relationship constraints; Step 5: Return the query result, i.e., return the n user communities in the priority queue; In step 2, use the k-core decomposition algorithm to first sort all graph nodes in reverse order of degree; for a given graph G, define the core number core-number as an integer ω, where v is the node in the ω-core of graph G, then select the node v with the smallest degree, use d to record the degree of the current node, delete all nodes with degree d and the edges of these nodes, and determine whether the degrees of all remaining nodes are greater than d. If not, continue to delete nodes with degree less than d and the edges of these nodes until all node degrees are greater than d, and at the same time assign the core number of all deleted nodes in this round to d; repeat this process until all nodes are processed.
2. The community retrieval method based on user geographical location diversity according to claim 1, wherein Step 1 is as follows: For each user in the dataset, obtain the set of all corresponding check-in locations L(U i ) = {l1, l2, …}. First, clean its check-in data and calculate the offset dist(i) of each check-in location as dist(i) = avg(l i -l k ), where l k ∈L(U i ). Here, l k refers to other check-in information other than l i . Delete the noisy check-in information with a very large dist offset, and then use a clustering algorithm to find a circle that contains as many check-in locations as possible and has the smallest possible radius. Then, use the geographical location area where the center of the circle is located as the area label of the user.
3. The community search method based on the diversity of user geographical locations as claimed in claim 1, characterized in that: In step 3, based on the number of cores obtained by decomposition in step 2, all graph nodes and edges are sorted according to the following rules: Sorting of graph nodes: For a set L of graph node labels, if there is a subset A contains two labels li and lj, then set the type order of the two labels as li < lj according to a certain rule; in the sorting, if two labels belong to the same type, they are sorted according to the ID number of the graph node; Edge ordering: When representing an edge (u, v), the kernel value of u is always greater than or equal to v; for two edges (u, v) and (u', v'), their order is as follows: First, sort by the kernel values of u and u'. If the kernel value of u is greater than that of u', and the Order() function is used to represent the order of an edge, then Order((u, v)) <Order((u’,v’)); Secondly, if the core value of u is equal to the core value of u', and the label type ranking of u is less than the label type ranking of u', then Order((u, v)) <Order((u’,v’)); If the kernel value of u is equal to the kernel value of u', and the label type order of u is equal to the label type order of u', but the label type order of v is less than the label type order of v', then Order((u, v)) <Order((u’,v’)); If the core value of u is equal to the core value of u', the label type order of u is equal to the label type order of u', and the label type order of v is equal to the label type order of v', then the two edges are sorted according to the ID of the graph node; After sorting is completed, construct the EDC-index tree index; the construction of the index uses the union-find data structure, and the edges are selected in the order agreed upon above during the construction process. Starting from the edges with higher sorting, the edge merging operations are performed in sequence to generate the tree nodes in the index; the attributes of the tree nodes are counted incidentally when generating the index nodes.
4. The community retrieval method based on user geographical location diversity according to claim 3, characterized in that: In step four, after constructing the EDC-index, the entire social network is decomposed into several k-core communities; only the subgraph formed by one k-core community is stored in the EDC-index. Given a set of geographical tags, an integer k, and n, the query results are obtained by searching the k-list list of the EDC-index.
5. The community retrieval method based on user geographical location diversity according to claim 4, wherein: The specific query process is as follows: 4-1 Search the k-list with the core number equal to k according to the input query value k; 4-2 Use EDD, that is, Edge Diversity Degree, to represent the geographical location diversity of a user community; use the minimum priority queue to store the search results, and the length of the priority queue is the input n; the priority queue stores the user communities with the top n EDD values found currently; Each time a new user community is discovered and the EDD value is greater than the community at the top of the priority queue, insert the community into the priority queue; 4-3 For each tree node in the k-list list, search its corresponding subtree: first traverse the subtree and merge the geographical location tags of each child node from bottom to top; If it is found that the merged geographical location tag of a tree node contains the input tag set Q, that is, the merged tag contains Q, then the EDD of the corresponding user community of this tree node is counted; after counting the EDD value, if the result is greater than the EDD value of the tree node at the top of the priority queue, this tree node is pushed into the priority queue; 4-4 After traversing the subtree in a k-list tree node, search the next tree node in the k-list until the entire EDC-index is traversed.
Citation Information
Patent Citations
Error code and packet loss resistance source coding and intelligent decoding method
CN104486640A
Social network community indexing and querying method
CN112052400A