Community search method in attribute heterogeneous information network

By constructing the network using symmetric element paths and triangle support values ​​in the heterogeneous information network, and optimizing community attributes with Jaccard Distance, the problem of community search ignoring node attributes in the heterogeneous information network is solved, and the structural compactness and attribute correlation are achieved. Community discovery improves the accuracy and efficiency of search results.

CN118733895APending Publication Date: 2024-10-01YUNNAN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410717344.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing community search technology ignores node attribute information in heterogeneous information networks, resulting in search results lacking in-depth characterization of users or entities. It is difficult to provide highly customized and personalized search results, and it is difficult to satisfy both structural cohesion and Community discovery by attribute similarity.

Method used

A community search method is used to construct the network through symmetric element paths and triangle support values, eliminate edges that do not meet the conditions, find the largest connected subgraph containing the query node, and optimize the attribute similarity of the community by combining the Jaccard Distance value. Bipartite heuristic strategy improves efficiency.

Benefits of technology

It significantly improves the accuracy and practicality of community identification, ensures that the community structure is compact and member attributes are highly correlated, improves algorithm efficiency, overcomes the limitation of neglecting node attributes of traditional methods, and is suitable for large-scale heterogeneous information networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733895A_ABST
    Figure CN118733895A_ABST
Patent Text Reader

Abstract

The invention discloses a community search method in an attribute heterogeneous information network, which comprises the following steps: S1, inputting a search condition by a user according to the attribute heterogeneous information network G; S2, acquiring a target node set S from the attribute heterogeneous information network G; s3, calculating a P neighbor of each target node in the set S; s4, constructing a network G according to P neighbors of all target nodes; s5, calculating a triangle support degree value of each edge in the network G; s6, removing edges which do not meet conditions from the network G; s7, finding out a maximum connected subgraph g containing q from the network G; and S8, finding out communities meeting conditions from the sub-graph g and outputting the communities. According to the method, the limitation that node attribute information is neglected in a traditional method is overcome, a systematic solution is provided for processing community search in a large-scale heterogeneous information network, and wide application potential and remarkable performance improvement are shown in multiple fields of social network analysis, recommendation system optimization and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present embodiment belongs to the technical field of information retrieval and recommendation, and in particular, relates to a community search method in an attribute heterogeneous information network. Background Art

[0002] In the current information age, with the rapid advancement of Internet technology, heterogeneous information networks (HINs), as a complex data structure model, have increasingly become the focus of data mining and analysis. This type of network can effectively integrate multi-source, multi-type data entities and their complex relationships, and is widely used in social network analysis, e-commerce recommendations, bioinformatics research and other scenarios. Among them, community search technology, as a key means of mining the internal structure pattern of the network, aims to identify a set of highly correlated nodes with intrinsic cohesive characteristics from a given query node, which is of great value for understanding network dynamics, optimizing service recommendations, and tracking hot spots of interest.

[0003] Although community search technology has made significant progress in homogeneous networks, existing technologies face significant limitations in the face of the complexity of heterogeneous information networks, especially the rich structural and semantic information they contain. In particular, most existing methods focus on the topological structure analysis of the network and fail to fully integrate the attribute information of the nodes, resulting in search results that often lack an accurate description of the deep characteristics of users or entities. For example, in the context of e-commerce, communities built solely based on purchasing behavior ignore the user's occupation, age and other attributes, which may lead to deviations in marketing strategies.

[0004] The current community search methods can be divided into two categories according to different information networks. One is the community search method on a homogeneous information network containing only one node type and one edge type, and the other is the community search method on a heterogeneous information network, and most of the community search methods are on homogeneous information networks. For example, Wang Chaokun (<Invention Patent CN202210055745.2>, 2022) and others optimized the community search process by introducing a prohibited node perception mechanism, emphasizing the role of node weight and network export degree. Qu Qiang et al. (<Invention Patent CN201910266196.1>, 2019) focused on defining the community boundaries based on the closeness of the connection between users in the attribute network, emphasizing the importance of spatial cohesion. Xie Xiaoqin et al. (<Invention Patent CN202010636070.1>, 2020) proposed an attribute community search method that integrates hidden relationships in response to the problem that the existing community search technology does not consider the hidden relationships between nodes. This method provides a stacked autoencoder that can extract network structure and attribute information, which can effectively discover hidden relationships within the community. Cui Boyuan et al. (<Invention Patent CN202310200246.2>, 2023) disclosed a friend recommendation method based on community search. This method iteratively uses a greedy strategy to delete nodes on the attribute graph that do not affect the connectivity of the graph and maximize the modularity, and recommends friends based on the community obtained after iteration. Li Yanhong et al. (<Invention Patent CN202310663187.2>, 2023) disclosed a scale-restricted community search method on an attribute graph. This method not only considers the attribute information, but also the scale limit range of the community. On heterogeneous information networks, Wang Jialong et al. (<Journal of Software>, 2023) proposed a search method that considers asymmetric meta-paths, restricted meta-paths, and prohibited node constraints to meet users' complex search needs, providing users with more personalized search services. Wang Yafeng et al. (Journal of Zhejiang University (Engineering Science Edition), 2023) proposed a mutual information maximization community search for heterogeneous information networks, defining the user's search requirements as query constraints, and using a deep mutual information maximization model with query constraints to fuse the network structure, semantics, and node attribute information to obtain the node representation, and then searched for the community based on the query information using the mutual information maximization criterion.

[0005] Most of the existing community search technologies are proposed for homogeneous information networks and cannot be directly applied to heterogeneous information networks; most of the existing community search technologies on heterogeneous information networks only focus on the structural information analysis of the network, while ignoring the rich attribute information carried by the nodes. This will result in the searched communities being structurally connected, but in practical applications, the relevance and practicality of the communities are reduced due to ignoring the similarity of node attributes. Users' demands for community search are becoming increasingly diverse and personalized, including but not limited to specifying node exclusion, node attribute matching, and community size limitation. Current technologies have limited capabilities in handling such complex search conditions and it is difficult to provide highly customized search results. In addition, in large-scale attribute heterogeneous information networks, how to design efficient algorithms to quickly discover communities that satisfy both structural cohesion and attribute similarity is still a major technical challenge. Summary of the invention

[0006] The purpose of this embodiment is to provide a community search method in an attribute heterogeneous information network, so as to solve the problem that the community search ignores the node attribute information and realize an efficient community search that considers both the structural cohesion and the attribute similarity.

[0007] In order to solve the above technical problems, the technical solution adopted in this embodiment is a community search method in an attribute heterogeneous information network, comprising the following steps:

[0008] S1: The user inputs a search condition according to the attribute heterogeneous information network G, wherein the search condition includes a query node q, a symmetric meta-path P, and a positive integer α;

[0009] S2: Get the target node set S from the attribute heterogeneous information network G;

[0010] S3: Calculate the P neighbors PNB[cur] of each target node cur∈S;

[0011] S4: Build the network G based on the P neighbors of all target nodes;

[0012] S5: Calculate the triangle support value of each edge in the network G;

[0013] S6: Remove the edges that do not meet the conditions from the network G;

[0014] S7: Find the largest connected subgraph g containing the query node q from the network G;

[0015] S8: Find the community that meets the conditions from the maximum connected subgraph g and output it.

[0016] Furthermore, the specific steps of S2 are as follows:

[0017] S201: Take the query node q as the current starting node, create a set S and a set Start, and initialize S = {q}, Start = {q};

[0018] S202: When Start is not empty, go to step S203; when Start is empty, go to step S3;

[0019] S203: Obtain the edge type R of the i-th layer in the symmetric meta-path P i and node type N i+1 , and create an empty node set Anchor, and go to step S204, initially i = 0, the maximum value of i is L-1, if i is greater than L-1, go to step S207, where L is the length of the meta-path, and i is used to mark the i-th layer edge type of the meta-path;

[0020] S204: Obtain the neighbor node set NB[v] of each node v∈Start;

[0021] S205: If the type of node u∈NB[v] vertexType[u] is the same as N i+1 The same as the edge e(v,u) type edgeType[e(v,u)] and R i If they are the same, add node u to the set Anchor;

[0022] S206: assign the set Anchor to the set Start, and increase the level mark i by 1, then jump to step S203;

[0023] S207: When the node v∈Start is already included in the set S, v is deleted from Start; when the node v∈Start is not included in the set S, v is added to S, and then jump to step S202.

[0024] Furthermore, the specific steps of S3 are as follows:

[0025] S301: Get the target node cur∈S and initialize the set Start={cur};

[0026] S302: Obtain edge type R of the i-th layer in 1 / 2P i and node type N i+1 , and create an empty node set Anchor, and enter step S303, initially i = 0, the maximum value of i is L / 2-1, if i is greater than L / 2-1, jump to step S301 to obtain the next target node cur∈S, where 1 / 2P represents a meta-path of half length, and i is used to mark the i-th layer edge type of the meta-path;

[0027] S303: Obtain the neighbor node set NB[v] of each node v∈Start;

[0028] S304: If the type of node u∈NB[v] vertexType[u] is the same as N i+1 The same as the edge e(v,u) type edgeType[e(v,u)] and R i If they are the same, the node u is added to the set Anchor, and the temporary path instance from cur to u is stored, and then the process goes to step S305;

[0029] S305: if i is equal to L / 2-1, add the attribute set Attribute(hp) of the nodes u, cur, and the semi-long path instance hp to the index attrIndex; if i is not equal to L / 2-1, do not perform the adding operation, where hp is the semi-long path instance, L is the length of the meta-path, and i is used to mark the edge type of the i-th layer of the meta-path;

[0030] S306: assign the data in the set Anchor to the set Start, and increase the level mark i by 1, then jump to step S302;

[0031] S307: For each key of attrIndex, obtain the corresponding second-layer key set skset, where every two nodes in skset constitute P neighbors, thereby obtaining the P neighbors PNB[cur] of each node cur∈S, where key is an identifier in the hash table used to uniquely identify a value or a group of values.

[0032] Furthermore, the network G in S4 is G = (S, E), where S is a node set, and E = {Ppair 1 ,Ppair 2 ,…,Ppair m} is an edge set.

[0033] Furthermore, in S5, when nodes u, v, w satisfy the edges Ppair(u,v),Ppair(u,w),Ppair(v,w)∈E, then u, v, w form a triangle, so the triangle support value Sup[Ppair(u,v)] of Ppair(u,v) is the number of common nodes that form P neighbor relationships with u and v at the same time.

[0034] Furthermore, the specific steps of S6 are as follows:

[0035] S601: For each edge Ppair(u,v)∈E, if the triangle support value Sup[Ppair(u,v)] is less than α-2, add the edge Ppair(u,v) to the queue PQueue;

[0036] S602: If the queue PQueue is not empty, proceed to step S603; if the queue PQueue is empty, proceed to step S7;

[0037] S603: Take each edge Ppair(u,v) from the queue PQueue, and obtain the P neighbors PNB[u] and PNB[v] of u and v;

[0038] S604: If the node w∈PNB[u]∩PNB[v], proceed to steps S605 and S606 successively, otherwise continue to obtain the next node w;

[0039] S605: If the triangle support value Sup[Ppair(u,w)] is greater than or equal to α-2, then update Sup[Ppair(u,w)] to the current value minus 1; if Sup[Ppair(u,w)] is less than α-2, then add Ppair(u,w) to the queue PQueue;

[0040] S606: If the triangle support value Sup[Ppair(v,w)] is greater than or equal to α-2, then update Sup[Ppair(v,w)] to the current value minus 1; if Sup[Ppair(v,w)] is less than α-2, then add Ppair(v,w) to the queue PQueue.

[0041] Furthermore, the specific steps of S7 are as follows:

[0042] S701: Add the query node q to the queue VQueue and store q in the subgraph g;

[0043] S702: If the queue VQueue is not empty, proceed to step S703; if the queue VQueue is empty, proceed to step S8;

[0044] S703: Take each node v from the queue VQueue and obtain the P neighbor PNB[v];

[0045] S704: If the node u∈PNB[v] is not in the subgraph g, store u and the edge Ppair(v,u) into the subgraph g, add u to VQueue, and then jump to step S702, otherwise jump to step S703.

[0046] Furthermore, the specific steps of S8 are as follows:

[0047] S801: For each key of the index attrIndex, obtain the set skset consisting of the corresponding second-layer keys, where the key is an identifier in the hash table that is used to uniquely identify a value or a group of values;

[0048] S802: If the node cur∈skset is included in the node set S', then obtain the value corresponding to cur, which is the corresponding value obtained by the hash table according to the key, that is, the List list storing the attribute set, and merge each attribute set in the list into EAttribute(cur), where S' represents the node set of the subgraph g obtained in step S7, and EAttribute(cur) represents the extended attribute of the node cur;

[0049] S803: For each edge Ppair(u,v)∈E', calculate the Jaccard Distance value JDist(Ppair(u,v)) of nodes u and v, where E' represents the edge set of the subgraph g obtained in step S7;

[0050] S804: sort the edges in the edge set E' in descending order according to the Jaccard Distance value, that is, put the edges with the same Jaccard Distance value in the same bucket, and sort different buckets in descending order according to the Jaccard Distance value, so that Bucket = {b 1 ,b 2 ,…,b l} is a sorted bucket, where set b t (1≤t≤l) stores the edge set with the largest JaccardDistance value t;

[0051] S805: Let left=1, right=l, where left and right respectively represent the left subscript and right subscript of the bucket sequence currently to be processed, and l represents the number of buckets in Bucket;

[0052] S806: If left is less than right, go to step S807, otherwise go to step S8027;

[0053] S807: If left is less than or equal to right, proceed to step S808;

[0054] S808: Let mid = (left + right) / 2, where mid represents the middle subscript of the bucket sequence currently to be processed;

[0055] S809: Put the barrel b t Add the edges in the subgraph g', where mid≤t≤right, and update the triangle support value of the edge;

[0056] S8010: If the number of nodes in the subgraph g' is less than α or g' does not contain the node q, set right = mid-1 and jump to step S807 to continue adding edges to g', otherwise go to step S8011;

[0057] S8011: Assign subgraph g' to temporary subgraph g";

[0058] S8012: Remove the edges that do not meet the conditions from the subgraph g';

[0059] S8013: If the subgraph g' does not exist or g' does not contain the node q, set right = mid-1 and jump to step S807, otherwise go to step S8014;

[0060] S8014: Find the largest connected subgraph r containing q from the subgraph g';

[0061] S8015: If the sub-graph r does not exist, set right = mid-1 and jump to step S807, otherwise go to step S8016;

[0062] S8016: Set left=mid and go to step S8017;

[0063] S8017: If left is less than or equal to right, go to step S8018;

[0064] S8018: Let mid = (left + right) / 2, where mid represents the middle subscript of the bucket sequence currently to be processed;

[0065] S8019: Delete from subgraph g' the content in bucket b t The edges in , where left≤t≤mid, and update the triangle support value of the edge;

[0066] S8020: If the number of nodes in the subgraph g' is less than α or g' does not contain the node q, set right = mid and jump to step S806, otherwise go to step S8021;

[0067] S8021: Assign subgraph g' to temporary subgraph g";

[0068] S8022: Remove the edges that do not meet the conditions from the subgraph g';

[0069] S8023: If the subgraph g' does not exist or g' does not contain the node q, set right = mid and jump to step S806, otherwise go to step S8024;

[0070] S8024: Find the largest connected subgraph r containing q from the subgraph g';

[0071] S8025: If the sub-image r does not exist, set right = mid and jump to step S806, otherwise go to step S8026;

[0072] S8026: Set left=mid+1, and jump to step S8017;

[0073] S8027: Output the maximum connected subgraph r, where r is the target community that meets the conditions.

[0074] The beneficial effects of this embodiment are: this embodiment pioneered the integration of structural cohesion and attribute similarity indicators in the field of attribute heterogeneous information networks, and by designing an efficient community search method, significantly enhanced the accuracy and practicality of community identification, ensuring that the mined community structure is compact and the member attributes are highly correlated, closely fitting the characteristics of complex networks in the real world. This embodiment uses a binary heuristic strategy to decompose complex problems into more manageable subtasks, greatly improving the execution efficiency of the algorithm, and this strategy also effectively avoids unnecessary global searches and reduces the consumption of computing resources. This embodiment not only overcomes the limitations of traditional methods that ignore node attribute information, but also provides a systematic solution to the challenges of community search in large-scale heterogeneous information networks. It shows broad application potential and significant performance improvements in many fields such as social network analysis, recommendation system optimization, and knowledge graph mining. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the technical solutions in the embodiments of this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this embodiment. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0076] Figure 1 is the attribute heterogeneous information network in this embodiment;

[0077] Figure 2 is a flow chart of this embodiment;

[0078] Figure 3 is the semi-long path instance attribute index attrIndex in this embodiment;

[0079] Figure 4 is the network G=(S,E) in this embodiment;

[0080] Figure 5 It is the subgraph g' obtained in step S8.9 when left=1, right=6 in this embodiment;

[0081] Figure 6 It is the subgraph g" obtained in step S8.12 when left=1, right=6 in this embodiment;

[0082] Figure 7 It is the subgraph g' obtained in step S8.9 when left=1, right=2 in this embodiment;

[0083] Figure 8 It is the subgraph g" obtained in step S8.12 in this embodiment when left=1, right=2;

[0084] Fig. 9 It is the subgraph g' obtained in step S8.19 when left=1, right=2 in this embodiment;

[0085] Fig.10 It is the subgraph g" obtained in step S8.22 when left=1, right=2 in this embodiment;

[0086] Fig.11 It is the subgraph g' obtained in step S8.19 when left=2, right=2 in this embodiment;

[0087] Fig.12 It is the subgraph g" obtained in step S8.22 when left=2, right=2 in this embodiment;

[0088] Fig.13 is the target community r in this embodiment;

[0089] Fig.14 This is the effect comparison experiment result of this implementation mode;

[0090] Fig.15 This is the efficiency comparison experiment result of this embodiment. DETAILED DESCRIPTION

[0091] The following will be combined with the drawings in the embodiments of this embodiment to clearly and completely describe the technical solutions in the embodiments of this embodiment. Obviously, the described embodiments are only part of the embodiments of this embodiment, not all of the embodiments. Based on the embodiments in this embodiment, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this embodiment.

[0092] The community search method described in this embodiment is aimed at attribute heterogeneous information networks, which include multiple node types and multiple edge types, generally expressed as G = (V, E, A), where V = {v 1 ,v 2 ,…,v n} represents a node set, the type of node v∈V is represented by vertexType[v], E={e 1 ,e 2 ,…,e m} represents the edge set, the type of edge e(v,u)∈E is represented as edgeType[e(v,u)], A represents the attribute set, and the attribute of node v∈V is represented as attribute[v]. Figure 1 is the attribute heterogeneous information network in this embodiment, which describes the relationship between paper P, author A, conference C and topic T. The lowercase letters p, a, c, t in the figure correspond to paper, author, conference and topic respectively, and the numeric subscripts are used to distinguish different objects. The lowercase letter k in the figure represents the attribute, and the numeric subscripts are used to distinguish different attribute words. This embodiment uses a symmetric meta-path to connect two nodes of the same type. In a heterogeneous information network, a meta-path is a structure composed of a set of node types and a set of edge types, which is used to describe the semantic relationship between nodes and is generally expressed as Where L is the length of the meta-path, N 1 ,N 2 ,…,N L+1 is the node type, R 1 ,R 2 ,…,R L is the edge type. In order to facilitate those skilled in the art to clearly understand the calculation process of this embodiment, after introducing the specific operation steps, the calculation of a specific scenario will be performed in combination with the embodiment. The flowchart of this embodiment is as follows Figure 2 The complete steps are as follows:

[0093] S1: User inputs search criteria, including query node q, symmetric meta-path A positive integer α;

[0094] Example 1

[0095] The search condition entered by the user is query node q = a 8 , symmetric metapath P = (APCPA), positive integer α = 4, the goal is to find the path containing author a 8 In a community, two authors with P neighbor relationships in the community have at least α-2=2 common authors with the same relationship, and the similarity between the two authors with the relationship is maximized.

[0096] S2: Obtain the target node set S from the attribute heterogeneous information network G = (V, E, A);

[0097] In the implementation method, the target node set S represents a set of nodes that are of the same type as the query node q and are connected to q satisfying P. In order to calculate the set S, firstly, node q is used as the starting node, and the edge type and node type are compared layer by layer along the meta-path P. When the meta-path is traversed, nodes of the same type as q are obtained, and these nodes are stored in S. Then these nodes continue to be used as the starting nodes of the next round to continue the above operations until there are no new nodes that can be used as the starting nodes, at which time the complete set S is obtained; the specific process is as follows:

[0098] S2.1: Create node sets S and Start, and initialize S = {q}, Start = {q} (where S is the set storing the target node, and Start is the set storing the current starting node);

[0099] S2.2: If Start is not empty, go to step S2.3; otherwise, it means that all nodes of the same type as q and connected to q satisfying P have been found, and go to step S3;

[0100] S2.3: Get the edge type R of the i-th layer in P i and node type N i+1 , and create an empty node set Anchor, and go to step S2.4, initially i = 0, the maximum value of i is L-1, if i is greater than L-1, go to step S2.7, where i is used to mark the i-th layer edge type of the meta-path;

[0101] S2.4: Get the neighbor node set NB[v] of each node v∈Start;

[0102] S2.5: If the type of node u∈NB[v] (i.e., u is a neighbor node of v) vertexType[u] is the same as N i+1 The same as the edge e(v,u) type edgeType[e(v,u)] and R i If they are the same, add node u to the set Anchor;

[0103] S2.6: assign the set Anchor to the set Start, set i = i + 1, and jump to step S2.3, where i is used to mark the edge type of the i-th layer of the meta-path;

[0104] S2.7: If the node v∈Start is already included in the set S, remove v from Start, otherwise add v to S and jump to step S2.2.

[0105] Example 2

[0106] Execute S2.1, initialize S = {q} = {a 8},Start={q}={a8}; Execute S2.2, Start = {a 8} is not empty, go to S2.3;

[0107] Execute S2.3, i=0, obtain R 0 =AP,N 1 =P, and create an empty node set Anchor; execute S2.4, get the node v in Start = a 8 The neighbor node set NB[a 8 ]={p 5}; Execute S2.5, because NB[a 8 ] in which u=p 5 Type vertexType[u] = P and N 1 =P is the same and the side e(a 8 ,u) type edgeType[e(a 8 ,u)]=AP and R 0 =AP is the same, add u to Anchor, Anchor = {p 5}; Execute S2.6, Start = Anchor = {p 5}, i=i+1=0+1=1, jump to S2.3;

[0108] Continue to execute S2.3, i=1, obtain R 1 =PC,N 2 = C, and create an empty node set Anchor; execute S2.4, get the node v in Start = p 5 The neighbor node set NB[p 5 ]={a 8 ,t 2 ,c 2}; Execute S2.5, because NB[p 5 ] node u=c 2 Type vertexType[u] = C and N 2 =C is the same and the side e(p 5 ,u) type edgeType[e(p 5 ,u)]=PC and R 1 = PC is the same, add u to Anchor, Anchor = {c 2}; Execute S2.6, Start = Anchor = {c 2}, i=i+1=1+1=2, jump to S2.3;

[0109] Continue to execute S2.3, i=2, obtain R 2 =CP,N 3=P, and create an empty node set Anchor; execute S2.4, get the node v in Start = c 2 The neighbor node set NB[c 2 ]={p 2 ,p 3 ,p 4 ,p 5}; Execute S2.5, because NB[c 2 ] in which u=p 2 ,p 3 ,p 4 ,p 5 Type vertexType[u] = P and N 3 =P is the same and the side e(c 2 ,u) type edgeType[e(c 2 ,u)]=CP and R 2 =CP is the same, add u to Anchor, Anchor = {p 2 ,p 3 ,p 4 ,p 5}; Execute S2.6, Start = Anchor = {p 2 ,p 3 ,p 4 ,p 5}, i=i+1=2+1=3, jump to S2.3;

[0110] Continue to execute S2.3, i=3, obtain R 3 =PA,N 4 =A, and create an empty node set Anchor; execute S2.4, get the node v=p in Start 2 ,p 3 ,p 4 ,p 5 The neighbor node set NB[p 2 ]={a 4 ,a 5 ,c 2},NB[p 3 ]={a 5 ,a 6 ,c 2},NB[p 4 ]={a 5 ,a 7 ,c 2},NB[p 5 ]={a 8 ,t 2 ,c 2}; Execute S2.5, because NB[p 2] node u=a 4 ,a 5 Type vertexType[u] = A and N 4 =A is the same and the side e(p 2 ,u) type edgeType[e(p 2 ,u)]=PA and R 3 =PA is the same, add u to Anchor, Anchor = {a 4 ,a 5}; Next, NB[p 3 ],NB[p 4 ],NB[p 5 ] perform similar operations on the nodes in the image, which will not be repeated here, and finally obtain Anchor = {a 4 ,a 5 ,a 6 ,a 7 ,a 8}; Execute S2.6, Start = Anchor = {a 4 ,a 5 ,a 6 ,a 7 ,a 8}, i=i+1=3+1=4, jump to S2.3;

[0111] Continue to execute S2.3. Since i=4 is greater than L-1=4-1=3, enter S2.7. Execute S2.7. Since a 4 ,a 5 ,a 6 ,a 7 is not in S, so add it to S, and a 8 Already included in S, add a from Start 8 Delete, and finally Start = {a 4 ,a 5 ,a 6 ,a 7}, S = {a 4 ,a 5 ,a 6 ,a 7 ,a 8}, jump to S2.2;

[0112] Continue to execute S2.2, Start = {a 4 ,a 5 ,a 6 ,a 7} is not empty, go to S2.3; then continue to perform similar operations until Start is empty, which will not be repeated here, and finally get S = {a 1 ,a2 ,a 3 ,a 4 ,a 5 ,a 6 ,a 7 ,a 8}.

[0113] S3: Calculate the P neighbors of each target node cur∈S;

[0114] In this implementation, when calculating the P neighbors of each target node cur∈S, it is necessary to ensure that the P neighbor nodes are included in S. In order to quickly calculate the P neighbors of nodes in S, a half-length path instance attribute index attrIndex is first constructed, and then the P neighbors of cur∈S are calculated based on attrIndex. Where attrIndex is a two-layer Hash structure, the first layer key stores the hub node (the hub node represents the metapath along half the length with cur∈S as the starting node The resulting type is N L / 2+1 The second layer key stores the target node (the target node is the node in S), "key" refers to the identifier used to uniquely identify a value or a set of values ​​in the hash table; the second layer value is a List list, List stores the attribute set contained in the path from the target node to the hub node. If there are multiple paths, multiple attribute sets are stored, and "value" refers to the corresponding value obtained by the hash table according to the key. Constructing the index attrIndex also facilitates the calculation of the extended attributes of the node in step S8. The calculation process of step S3.5 includes the following steps:

[0115] S3.1: Get the target node cur∈S and initialize Start={cur};

[0116] S3.2: Get the edge type R of the i-th layer in 1 / 2P i and node type N i+1 , and create an empty node set Anchor, and go to step S3.3, initially i = 0, the maximum value of i is L / 2-1, if i is greater than L / 2-1, jump to step S3.1 to obtain the next target node cur∈S, where i is used to mark the i-th layer edge type of the meta-path;

[0117] S3.3: Get the neighbor node set NB[v] of each node v∈Start;

[0118] S3.4: If the type of node u∈NB[v] vertexType[u] is the same as N i+1 The same as the edge e(v,u) type edgeType[e(v,u)] and R iIf they are the same, add node u to the set Anchor and store the temporary path instance from cur to u, then go to step S3.5;

[0119] S3.5: If i is equal to L / 2-1, it means that the temporary path instance from cur to u is the semi-long path instance hp, and u, cur, Attribute(hp) are added to attrIndex (in this case, cur refers to the first node of hp, that is, the target node, u refers to the tail node of hp, that is, the hub node, and Attribute(hp) represents the attribute set of hp). Otherwise, no relevant operation is performed, where i is used to mark the edge type of the i-th layer of the meta-path;

[0120] Let the half-length path instance hp = (v 1 ,v 2 ,…,v L / 2+1 ), then the calculation formula of its attribute set Attribute(hp) is expressed as

[0121]

[0122] S3.6: Assign the set Anchor to the set Start, set i=i+1, and jump to step S3.2;

[0123] S3.7: For each key of attrIndex, obtain the corresponding second-layer key set skset, where every two nodes in skset constitute P neighbors, thereby obtaining the P neighbors PNB[cur] of each node cur∈S.

[0124] Example 3

[0125] Execute S3.1 and obtain cur=a 1 ∈S={a 1 ,a 2 ,a 3 ,a 4 ,a 5 ,a 6 ,a 7 ,a 8}, initialize Start = {a 1};

[0126] Execute S3.2, i=0, obtain R 0 =AP,N 1 =P, and create an empty node set Anchor; execute S3.3, get the node v in Start = a 1 The neighbor node set NB[a 1 ]={p 1}; Execute S3.4, because NB[a 1] in which u=p 1 Type vertexType[u] = P and N 1 =P is the same and the side e(a 1 ,u) type edgeType[e(a 1 ,u)]=AP and R 0 =AP is the same, add u to Anchor, Anchor = {p 1}, and store the temporary path instance (a 1 ,p 1 ); Execute S3.5, since i=0 is not equal to L / 2-1=4 / 2-1=1, no related operation is performed; Execute S3.6, Start=Anchor={p 1}, i=i+1=0+1=1, jump to S3.2;

[0127] Continue to execute S3.2, i=1, obtain R 1 =PC,N 2 = C, and create an empty node set Anchor; execute S3.3, get the node v in Start = p 1 The neighbor node set NB[p 1 ]={a 1 ,a 2 ,a 3 ,a 5 ,t 1 ,c 1}; Execute S3.4, because NB[p 1 ] node u=c 1 Type vertexType[u] = C and N 2 =C is the same and the side e(p 1 ,u) type edgeType[e(p 1 ,u)]=PC and R 1 = PC is the same, add u to Anchor, Anchor = {c 1}, and store the temporary path instance (a 1 ,p 1 ,c 1 ); Execute S3.5, since i=1 is equal to L / 2-1=1, obtain the target node a 1 , hub node c 1 , hp's attribute set Attribute(hp), and add them to attrIndex; execute S3.6, Start = Anchor = {c 1}, i=i+1=1+1=2, jump to S3.2;

[0128] Continue to execute S3.2. Since i=2 is greater than L / 2-1=1, enter S3.1;

[0129] Continue to execute S3.1 and obtain cur=a 2 ∈S={a 1 ,a 2 ,a 3 ,a 4 ,a 5 ,a 6 ,a 7 ,a 8}, initialize Start = {a 2}; Next, continue to perform similar operations until all nodes in the set S are traversed. I will not go into details here. Finally, attrIndex is obtained as follows Figure 3 shown.

[0130] Execute S3.7, when key=c is obtained 1 , then skset={a 1 ,a 2 ,a 3 ,a 5}, we can get PNB[a 1 ]={a 2 ,a 3 ,a 5},PNB[a 2 ]={a 1 ,a 3 ,a 5},PNB[a 3 ]={a 1 ,a 2 ,a 5},PNB[a 5 ]={a 1 ,a 2 ,a 3}, when getting key=c 2 , then skset={a 4 ,a 5 ,a 6 ,a 7 ,a 8}, we can get PNB[a 4 ]={a 5 ,a 6 ,a 7 ,a 8},PNB[a 5 ]={a 1 ,a 2 ,a 3 ,a 4 ,a 6 ,a 7,a 8}(Need to merge the aforementioned PNB[a 5 ]={a 1 ,a 2 ,a 3}),PNB[a 6 ]={a 4 ,a 5 ,a 7 ,a 8},PNB[a 7 ]={a 4 ,a 5 ,a 6 ,a 8},PNB[a 8 ]={a 4 ,a 5 ,a 6 ,a 7}, and finally the P neighbors PNB[cur] of each target node cur∈S are obtained as shown in Table 1:

[0131] Table 1

[0132]

[0133]

[0134] S4: Build a network G = (S, E) based on the P neighbors of all target nodes;

[0135] In this embodiment, the network G = (S, E) where S is a node set and E = {Ppair 1 ,Ppair 2 ,…,Ppair m} is an edge set.

[0136] Example 4

[0137] According to the target node cur∈S={a 1 ,a 2 ,a 3 ,a 4 ,a 5 ,a 6 ,a 7 ,a 8 The network G=(S,E) constructed by the P neighbors PNB[cur] of} is as follows Figure 4 shown.

[0138] S5: Calculate the triangle support value Sup[Ppair(u,v)] of each edge Ppair(u,v)∈E;

[0139] In the implementation method, the triangle support value of the edge Ppair(u,v) represents the number of triangles containing the edge. When nodes u,v,w satisfy Ppair(u,v),Ppair(u,w),Ppair(v,w)∈E, it means that u,v,w form a triangle. Therefore, the triangle support value of Ppair(u,v) is the number of common nodes that form a P neighbor relationship with u and v at the same time. The calculation formula is expressed as:

[0140] Sup[Ppair(u,v)]=|PNB[u]∩PNB[v]| (2)

[0141] Example 5

[0142] according to Figure 4 The network shown calculates the triangle support value Sup[Ppair(u,v)] of each edge Ppair(u,v)∈E, with the edge Ppair(a 1 ,a 5 ) as an example, since PNB[a 1 ]={a 2 ,a 3 ,a 5}, PNB[a 5 ]={a 1 ,a 2 ,a 3 ,a 4 ,a 6 ,a 7 ,a 8}, so PNB[a 1 ]∩PNB[a 5 ]={a 2 ,a 3},Sup[Ppair(a 1 ,a 5 )]=2, the calculation of the triangle support values ​​of other edges is similar, and finally the triangle support values ​​of all edges are shown in Table 2:

[0143] Table 2

[0144]

[0145] S6: Remove the edges that do not meet the conditions from the network G;

[0146] In this embodiment, the cohesion of the community structure is defined as the triangle support value of each edge must be greater than or equal to α-2, so it is necessary to remove the edges with triangle support values ​​less than α-2 in network G. In network G, when an edge with a triangle support value less than α-2 is deleted, it is necessary to update the triangle support value of the related edge, which may cause the triangle support value of the edge that originally meets the conditions to be less than α-2. At this time, the edge should also be deleted. For the convenience of calculation, a queue PQueue is used to store the edges to be deleted. Each time the edge to be deleted is taken out from the head of the queue, and then the triangle support value of the associated edge is updated. When the updated edge does not meet the conditions, the edge is added to the queue. When the queue is empty, it means that step S6 is completed. The specific calculation process is as follows:

[0147] S6.1: For each edge Ppair(u,v)∈E, if Sup[Ppair(u,v)] is less than α-2, add the edge Ppair(u,v) to the queue PQueue;

[0148] S6.2: If the queue PQueue is not empty, go to step S6.3, otherwise it means that all edges that do not meet the conditions are deleted, and the queue PQueue is empty at this time, and go to step S7;

[0149] S6.3: Take each edge Ppair(u,v) from the queue PQueue and obtain PNB[u] and PNB[v];

[0150] S6.4: If the node w∈PNB[u]∩PNB[v], proceed to steps S6.5 and S6.6 successively, otherwise continue to obtain the next node w;

[0151] S6.5: If Sup[Ppair(u,w)] is greater than or equal to α-2, then Sup[Ppair(u,w)]=Sup[Ppair(u,w)]-1; if Sup[Ppair(u,w)] is less than α-2, then Ppair(u,w) is added to the queue PQueue;

[0152] S6.6: If Sup[Ppair(v,w)] is greater than or equal to α-2, then Sup[Ppair(v,w)]=Sup[Ppair(v,w)]-1; if Sup[Ppair(v,w)] is less than α-2, then Ppair(v,w) is added to the queue PQueue;

[0153] Example 6

[0154] Since the triangle support values ​​of all edges in Table 2 are greater than or equal to α-2=4-2=2, the triangle support values ​​of all edges in network G do not change, and network G remains the same. Figure 4 shown.

[0155] S7: Find the largest connected subgraph g = (S', E') containing q from the network G;

[0156] In this embodiment, in order to find the largest connected subgraph containing q from the network G, a queue VQueue is used to store the nodes to be expanded. Each time the node to be expanded is taken from the head of the queue, when the neighbor node of the expanded node is not in the connected subgraph g, the neighbor node and its edge are stored in the subgraph g, and the neighbor node is added to the queue VQueue. When the queue VQueue is empty, it indicates that the largest connected subgraph g = (S', E') has been obtained, where S' is the node set and E' is the edge set. The calculation process includes the following steps:

[0157] S7.1: Add the query node q to the queue VQueue and store q in the subgraph g;

[0158] S7.2: If the queue VQueue is not empty, proceed to step S7.3; otherwise, it indicates that the maximum connected subgraph has been obtained, and proceed to step S8;

[0159] S7.3: Take each node v from the queue VQueue and obtain PNB[v];

[0160] S7.4: If the node u∈PNB[v] is not in the subgraph g, store u and the edge Ppair(v,u) into the subgraph g, add u to the queue VQueue, and then jump to step S7.2, otherwise jump to step S7.3.

[0161] Example 7

[0162] Execute S7.2. Since VQueue = {a 8} is not empty, go to S7.3; execute S7.3, from the queue VQueue = {a 8} and take out v=a 8 , and obtain PNB[a 8 ]={a 4 ,a 5 ,a 6 ,a 7}; Execute S7.4, since node u=a 4 ,a 5 ,a 6 ,a 7 is not in subgraph g, so a 4 ,a 5 ,a 6 ,a 7 and edge Ppair(a 8 ,a 4 ),Ppair(a8 ,a 5 ),Ppair(a 8 ,a 6 ),Ppair(a 8 ,a 7 ) into the subgraph g, and a 4 ,a 5 ,a 6 ,a 7 Add VQueue, VQueue = {a 4 ,a 5 ,a 6 ,a 7}, jump to step S7.2;

[0163] Continue to execute S7.2. Since VQueue = {a 4 ,a 5 ,a 6 ,a 7} is not empty, go to S7.3; then continue the above similar operations until VQueue is empty, which will not be repeated here. The final maximum connected subgraph g is still Figure 4 The network G is shown.

[0164] S8: Find the community that meets the conditions from the subgraph g = (S', E') and output it.

[0165] In this implementation, the community needs to consider both structural cohesion and attribute similarity, where structural cohesion is defined as the triangle support value of each edge must be greater than or equal to α-2, and attribute similarity is defined as the AttrScore of the community, and the smaller the AttrScore, the better. Let community g' = (S", E'), where S' is the node set and E' is the edge set, then the AttrScore calculation formula of g' is expressed as

[0166] AttrScore(g')=max Ppair(u,v)∈E” JDist(Ppair(u,v)) (3)

[0167] Where JDist(Ppair(u,v)) represents the Jaccard Distance (Jaccard Distance is an indicator used to measure the difference between two sets) of nodes u and v that constitute the edge Ppair(u,v). The calculation formula is expressed as

[0168]

[0169] Where EAttribute(u) represents the extended attribute of node u. The extended attribute of node u is defined as the set of attributes of all half-length path instances starting from u. Let HP = {hp 1 ,hp 2 ,…,hp m} is the set of all half-length path instances starting from u, then the calculation formula of the extended attribute of node u is expressed as

[0170] EAttribute(u)=∪ hp∈HP Attribute(hp) (5)

[0171] Formula (4) shows that the smaller the Jaccard Distance of nodes u and v that constitute the edge Ppair(u,v), the more similar u and v are. Formula (3) shows that the AttrScore of a community takes the maximum value of the Jaccard Distance of the two endpoints of all edges in the community. When the maximum value is smaller, the more similar the two endpoints of all edges in the community are, and the greater the similarity of the community.

[0172] The goal of step S8 is to find the largest community containing node q from the subgraph g = (S', E'), and the community simultaneously satisfies the structural cohesion and attribute similarity defined above. In order to efficiently find the target community with the smallest AttrScore possible, this implementation adopts a binary trial strategy. First, the edges are bucket-sorted in descending order according to the Jaccard Distance value (different buckets are sorted in descending order according to the Jaccard Distance value). Then, the edges in the half of the buckets with the smallest Jaccard Distance value are used as trials to check whether these edges meet the requirements of the target community. If not, the edges in the half of the buckets with the smallest Jaccard Distance value of the remaining buckets are continued to be added. If they are satisfied, the edges in the half of the buckets with the largest Jaccard Distance value of the trial edges are deleted. Then, it is determined whether the remaining edges meet the requirements of the target community. If they are satisfied, the edges in the half of the buckets with the largest Jaccard Distance value of the remaining edges are continued to be deleted. If not, the edges in the half of the buckets with the smallest Jaccard Distance value of the deleted edges are added. The trial is repeated until the trial can no longer be continued. The detailed calculation process is as follows:

[0173] S8.1: For each key of attrIndex, obtain the set skset consisting of the corresponding second-layer keys;

[0174] S8.2: If the node cur∈skset is included in S', obtain the value corresponding to cur, that is, the List list storing the attribute set, and merge each attribute set in the list into EAttribute(cur);

[0175] S8.3: For each edge Ppair(u,v)∈E', calculate the Jaccard Distance value JDist(Ppair(u,v)) between nodes u and v;

[0176] S8.4: Sort the edges in E' in descending order by Jaccard Distance value. That is, put the edges with the same Jaccard Distance value in the same bucket, and sort different buckets in descending order by Jaccard Distance value. Let Bucket = {b 1 ,b 2 ,…,b l} is a sorted bucket, where set b t (1≤t≤l) stores the edge set with the largest Jaccard Distance value t;

[0177] S8.5: Let left = 1, right = l, where left and right represent the left subscript and right subscript of the bucket sequence currently to be processed, respectively, and l represents the number of buckets in Bucket;

[0178] S8.6: If left is less than right, go to step S8.7, otherwise go to step S8.27;

[0179] S8.7: If left is less than or equal to right, go to step S8.8;

[0180] S8.8: Let mid = (left + right) / 2, where mid represents the middle index of the bucket sequence currently to be processed;

[0181] S8.9: Place bucket b t The edges in (mid≤t≤right) are added to the subgraph g', and the triangle support values ​​of the edges are updated;

[0182] S8.10: If the number of nodes in the subgraph g' is less than α or g' does not contain the node q, set right = mid-1 and jump to step S8.7 to continue adding edges to g', otherwise go to step S8.11;

[0183] S8.11: assign subgraph g' to temporary subgraph g";

[0184] S8.12: Remove the edges that do not meet the conditions from the subgraph g'' (the calculation process is the same as step S6, which will not be repeated here);

[0185] S8.13: If the subgraph g' does not exist or g' does not contain the node q, set right = mid-1 and jump to step S8.7, otherwise go to step S8.14;

[0186] S8.14: Find the largest connected subgraph r containing q from the subgraph g'' (the calculation process is the same as step S7 and will not be repeated here);

[0187] S8.15: If the subgraph r does not exist, set right = mid-1 and jump to step S8.7, otherwise go to step S8.16;

[0188] S8.16: Set left=mid and go to step S8.17;

[0189] S8.17: If left is less than or equal to right, go to step S8.18;

[0190] S8.18: Let mid = (left + right) / 2, where mid represents the middle index of the bucket sequence currently to be processed;

[0191] S8.19: Delete from subgraph g' the content in bucket b t The edges in (left≤t≤mid) and update the triangle support value of the edges;

[0192] S8.20: If the number of nodes in the subgraph g' is less than α or g' does not contain the node q, set right = mid and jump to step S8.6, otherwise go to step S8.21;

[0193] S8.21: assign subgraph g' to temporary subgraph g";

[0194] S8.22: Remove the edges that do not meet the conditions from the subgraph g'' (the calculation process is the same as step S6, which will not be repeated here);

[0195] S8.23: If the subgraph g' does not exist or g' does not contain the node q, set right = mid and jump to step S8.6, otherwise go to step S8.24;

[0196] S8.24: Find the largest connected subgraph r containing q from the subgraph g'' (the calculation process is the same as step S7 and will not be repeated here);

[0197] S8.25: If the subgraph r does not exist, set right = mid and jump to step S8.6, otherwise go to step S8.26;

[0198] S8.26: Set left=mid+1 and jump to step S8.17;

[0199] S8.27: Output the largest connected subgraph r, where r is the target community that meets the conditions.

[0200] Example 8

[0201] Execute S8.1, S8.2, by Figure 2 It can be seen that when key=c is obtained 1 , then skset={a 1 ,a 2 ,a 3 ,a 5}, due to a 1 ,a 2 ,a 3 ,a 5 are all in S', get a 1 The corresponding value {{k 1 ,k 9 ,k 10 ,k 11 ,k 20}}, a 2 The corresponding value {{k 2 ,k 9 ,k 10 ,k 11 ,k 20}}, a 3 The corresponding value {{k 3 ,k 9 ,k 10 ,k 11 ,k 20}}, a 5 The corresponding value {{k 5 ,k 9 ,k 10 ,k 11 ,k 20}}, you can get EAttribute(a 1 )={k 1 ,k 9 ,k 10 ,k 11 ,k 20}, EAttribute(a 2 )={k 2 ,k 9 ,k 10 ,k 11 ,k 20}, EAttribute(a 3 )={k 3,k 9 ,k 10 ,k 11 ,k 20}, EAttribute(a 5 )={k 5 ,k 9 ,k 10 ,k 11 ,k 20}; When getting key = c 2 , then skset={a 4 ,a 5 ,a 6 ,a 7 ,a 8}, due to a 4 ,a 5 ,a 6 ,a 7 ,a 8 are all in S', get a 4 The corresponding value {{k 4 ,k 11 ,k 12 ,k 13 ,k 21}}, a 5 The corresponding value {{k 5 ,k 11 ,k 12 ,k 13 ,k 21},{k 5 ,k 11 ,k 14 ,k 15 ,k 21},{k 5 ,k 16 ,k 17 ,k 21}}, a 6 The corresponding value {{k 6 ,k 11 ,k 14 ,k 15 ,k 21}}, a 7 The corresponding value {{k 7 ,k 16 ,k 17 ,k 21}}, a 8 The corresponding value {{k 8 ,k 11 ,k 18 ,k 19 ,k 21}}, you can get EAttribute(a 4 )={k 4 ,k 11 ,k 12 ,k 13 ,k 21}, EAttribute(a 5 )={k 5 ,k 9 ,k 10 ,k 11 ,k 12 ,k 13 ,k 14 ,k 15 ,k 16 ,k 17 ,k 20 ,k 21}(need to merge the above EAttribute(a 5 )={k 5 ,k 9 ,k 10 ,k 11 ,k 20}), EAttribute(a 6 )={k 6 ,k 11 ,k 14 ,k 15 ,k 21}, EAttribute(a 7 )={k 7 ,k 16 ,k 17 ,k 21}, EAttribute(a 8 )={k 8 ,k 11 ,k 18 ,k 19 ,k 21}, and finally the extended attributes of the nodes in S' are shown in Table 3:

[0202] Table 3

[0203]

[0204] Execute S8.3, for each edge Ppair(u,v)∈E', calculate the Jaccard Distance value JDist(Ppair(u,v)) of nodes u and v, and you can get the Jaccard Distance values ​​of all edges as shown in Table 4:

[0205] Table 4

[0206]

[0207] Execute S8.4 and sort the edges in E' in descending order by bucket sorting according to the Jaccard Distance values. The sorted results are shown in Table 5:

[0208] Table 5

[0209]

[0210] Execute S8.5, left = 1, right = 6;

[0211] Execute S8.6. Since left=1 is less than right=6, go to S8.7.

[0212] Execute S8.7. Since left = 1 is less than or equal to right = 6, go to S8.8. Execute S8.8. Mid = (left + right) / 2 = (1 + 6) / 2 = 3 (round down when the computer performs integer division). Execute S8.9. Bucket b t The edges in (3≤t≤6) are added to the subgraph g' (the subgraph g' after adding the edges is as follows Figure 5 As shown), and update the triangle support value of the edge as follows:

[0213] Ppair(a 1 ,a 2 )=2,Ppair(a 1 ,a 3 )=2,Ppair(a 1 ,a 5 )=2,Ppair(a 2 ,a 3 )=2,Ppair(a 2 ,a 5 )=2,Ppair(a 3 ,a 5 )=2,Ppair(a 4 ,a 5 )=1,Ppair(a 4 ,a 6 )=2,Ppair(a 4 ,a 8 )=1,Ppair(a 5 ,a 6 )=1,Ppair(a 5 ,a 7 )=0,Ppair(a 6 ,a 8 )=1;

[0214] Execute S8.10. Since the number of nodes in subgraph g' is greater than α=4 and contains the query node a 8 , so go to S8.11; execute S8.11, create a temporary subgraph g" = g'; execute S8.12, remove the edges that do not meet the conditions from the subgraph g" (the subgraph g" after removing the edges that do not meet the conditions is as follows Figure 6 As shown); Execute S8.13, since subgraph g" does not contain query node a 8 , so right=mid-1=3-1=2, jump to S8.7;

[0215] Execute S8.7. Since left = 1 is less than or equal to right = 2, go to S8.8. Execute S8.8. Mid = (left + right) / 2 = (1 + 2) / 2 = 1 (round down when the computer performs integer division). Execute S8.9. Bucket b t The edges in (1≤t≤2) are added to the subgraph g' (the subgraph g' after adding the edges is as follows Figure 7 As shown), and update the triangle support value of the edge as follows:

[0216] Ppair(a 1 ,a 2 )=2,Ppair(a 1 ,a 3 )=2,Ppair(a 1 ,a 5 )=2,Ppair(a 2 ,a 3 )=2,Ppair(a 2 ,a 5 )=2,Ppair(a 3 ,a 5 )=2,Ppair(a 4 ,a 5 )=3,Ppair(a 4 ,a 6 )=3,Ppair(a 4 ,a 7 )=3,Ppair(a 4 ,a 8 )=3,Ppair(a 5 ,a 6 )=3,Ppair(a 5 ,a 7 )=3,Ppair(a 5 ,a 8 )=3,Ppair(a 6 ,a 7 )=3,Ppair(a 6 ,a 8)=3,Ppair(a 7 ,a 8 )=3;

[0217] Execute S8.10. Since the number of nodes in subgraph g' is greater than α=4 and contains the query node a 8 , so go to S8.11; execute S8.11, create a temporary subgraph g" = g'; execute S8.12, since all edges in subgraph g" meet the conditions, subgraph g" does not change, such as Figure 8 As shown; execute S8.13, since there is a subgraph g" and it contains the query node a 8 , so go to S8.14; execute S8.14, find the largest connected subgraph r from the subgraph g', r is Figure 8 "subgraph g"; execute S8.15, because subgraph r exists, enter S8.16; execute S8.16, left=mid=1, enter S8.17;

[0218] Execute S8.17. Since left = 1 is less than or equal to right = 2, go to S8.18. Execute S8.18. Mid = (left + right) / 2 = (1 + 2) / 2 = 1 (round down when the computer performs integer division). Execute S8.19. Delete the subgraph g' that exists in bucket b. t The edges in (1≤t≤1) (the subgraph g' after deleting the edges is as follows Fig. 9 As shown), and update the triangle support value of the edge as follows:

[0219] Ppair(a 1 ,a 2 )=2,Ppair(a 1 ,a 3 )=2,Ppair(a 1 ,a 5 )=2,Ppair(a 2 ,a 3 )=2,Ppair(a 2 ,a 5 )=2,

[0220] Ppair(a 3 ,a 5 )=2,Ppair(a 4 ,a 5 )=2,Ppair(a 4 ,a 6 )=2,Ppair(a 4 ,a 8 )=2,Ppair(a 5 ,a 6 )=2,Ppair(a5 ,a 7 )=0,Ppair(a 5 ,a 8 )=2,Ppair(a 6 ,a 8 )=2;

[0221] Execute S8.20. Since the number of nodes in subgraph g' is greater than α=4 and contains query node a 8 , so enter S8.21; execute S8.21, create a temporary subgraph g" = g'; execute S8.22, remove the edges that do not meet the conditions from the subgraph g" (the subgraph g" after removing the edges that do not meet the conditions is as follows Fig.10 As shown); execute S8.23, since there is a subgraph g" and it contains the query node a 8 , so go to S8.24; execute S8.24, find the largest connected subgraph r from the subgraph g", r is Fig.10 Subgraph g"; execute S8.25, because subgraph r exists, go to S8.26; execute S8.26, left=mid+1=1+1=2, jump to S8.17;

[0222] Execute S8.17. Since left = 2 is less than or equal to right = 2, go to S8.18. mid = (left + right) / 2 = (2 + 2) / 2 = 2 (round down when the computer performs integer division); execute S8.19 and delete the subgraph g' that exists in bucket b. t The edges in (2≤t≤2) (the subgraph g' after deleting the edges is as follows Fig.11 As shown), and update the triangle support value of the edge as follows:

[0223] Ppair(a 1 ,a 2 )=2,Ppair(a 1 ,a 3 )=2,Ppair(a 1 ,a 5 )=2,Ppair(a 2 ,a 3 )=2,Ppair(a 2 ,a 5 )=2,

[0224] Ppair(a 3 ,a 5 )=2,Ppair(a 4 ,a 5 )=1,Ppair(a 4 ,a 6 )=2,Ppair(a 4 ,a8 )=1,Ppair(a 5 ,a 6 )=1,Ppair(a 5 ,a 7 )=0,Ppair(a 6 ,a 8 )=1;

[0225] Execute S8.20. Since the number of nodes in subgraph g' is greater than α=4 and contains query node a 8 , so enter S8.21; execute S8.21, create a temporary subgraph g" = g'; execute S8.22, remove the edges that do not meet the conditions from the subgraph g" (the subgraph g" after removing the edges that do not meet the conditions is as follows Fig.12 As shown); Execute S8.23, since subgraph g" does not contain query node a 8 , so right=mid=2, jump to S8.6;

[0226] Execute S8.6. Since left is equal to right, go to S8.27.

[0227] Execute S8.27 and output the final target community r as follows Fig.13 shown.

[0228] This embodiment provides a community search method that simultaneously considers the structural cohesion and attribute similarity of nodes on an attribute heterogeneous information network, so that the target community obtained by the search is more in line with actual needs; in order to quickly calculate the P neighbors of a node in S, this embodiment provides a structure called a semi-long path instance attribute index attrIndex, and also facilitates the subsequent calculation of the extended attributes of the node; this embodiment also provides a binary trial strategy, which divides the original problem into two and tests whether the sub-problems meet the conditions, greatly improving the efficiency of community search.

[0229] In order to demonstrate the beneficial effects of this implementation, experiments were conducted on an attribute heterogeneous information network with 21637 nodes, 86134 edges, 4 node types, 6 edge types, and 25710 attributes. The experimental results are as follows:

[0230] Effect comparison: The experiment randomly generates 50 groups of community search conditions. For each group of search conditions, the Jaccard similarity of the community results obtained by the method without considering the attributes and the Jaccard similarity of the community results obtained by the method of the present invention are calculated respectively. Then the average value of the 50 groups of Jaccard similarities is calculated. The results are as follows: Fig.14 The experimental results show that the communities searched by the method of the present invention have better similarity.

[0231] Efficiency comparison: The experiment also uses the 50 groups of community search conditions generated above, and compares the average execution time of the method using the binary heuristic strategy and the method not using the binary heuristic strategy by changing the positive integer α. The results are as follows: Fig.15 As shown. The experimental results show that the running efficiency of the method using the binary heuristic strategy is always higher than that of the method not using the binary heuristic strategy, and the time is at least 10 times faster, which proves that the binary heuristic strategy is effective. In addition, the experimental results also show that the change of the positive integer α has little effect on the method using the binary heuristic strategy, but has a greater impact on the method not using the binary heuristic strategy.

[0232] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0233] The above description is only a preferred embodiment of the present embodiment and is not intended to limit the protection scope of the present embodiment. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present embodiment are included in the protection scope of the present embodiment.

Claims

1. A community search method in attribute heterogeneous information networks, It is characterized in that The following steps are involved: S1: The user inputs a search condition according to the attribute heterogeneous information network G, wherein the search condition includes a query node q, a symmetric meta-path P, and a positive integer α; S2: Get the target node set S from the attribute heterogeneous information network G; S3: Calculate the P neighbors PNB[cur] of each target node cur∈S; S4: Build the network G based on the P neighbors of all target nodes; S5: Calculate the triangle support value of each edge in the network G; S6: Remove the edges that do not meet the conditions from the network G; S7: Find the largest connected subgraph g containing the query node q from the network G; S8: Find the community that meets the conditions from the maximum connected subgraph g and output it.

2. A community search method in an attribute heterogeneous information network according to claim 1, It is characterized in that The specific steps of S2 are as follows: S201: Take the query node q as the current starting node, create a set S and a set Start, and initialize S = {q}, Start = {q}; S202: When Start is not empty, go to step S203; when Start is empty, go to step S3; S203: Obtain the edge type R of the i-th layer in the symmetric meta-path P i and node type N i+1 , and create an empty node set Anchor, and go to step S204, initially i = 0, the maximum value of i is L-1, if i is greater than L-1, go to step S207, where L is the length of the meta-path, and i is used to mark the i-th layer edge type of the meta-path; S204: Obtain the neighbor node set NB[v] of each node v∈Start; S205: If the type of node u∈NB[v] vertexType[u] is the same as N i+1 The same as the edge e(v,u) type edgeType[e(v,u)] and R i If they are the same, add node u to the set Anchor; S206: assign the set Anchor to the set Start, and increase the level mark i by 1, then jump to step S203; S207: When the node v∈Start is already included in the set S, v is deleted from Start; when the node v∈Start is not included in the set S, v is added to S, and then jump to step S202.

3. A community search method in a heterogeneous information network according to claim 1, It is characterized in that The specific steps of S3 are as follows: S301: Get the target node cur∈S and initialize the set Start={cur}; S302: Obtain edge type R of the i-th layer in 1 / 2P i and node type N i+1 , and create an empty node set Anchor, and enter step S303, initially i = 0, the maximum value of i is L / 2-1, if i is greater than L / 2-1, jump to step S301 to obtain the next target node cur∈S, where 1 / 2P represents a meta-path of half length, and i is used to mark the i-th layer edge type of the meta-path; S303: Obtain the neighbor node set NB[v] of each node v∈Start; S304: If the type of node u∈NB[v] vertexType[u] is the same as N i+1 The same as the edge e(v,u) type edgeType[e(v,u)] and R i If they are the same, the node u is added to the set Anchor, and the temporary path instance from cur to u is stored, and then the process goes to step S305; S305: if i is equal to L / 2-1, add the attribute set Attribute(hp) of the nodes u, cur, and the semi-long path instance hp to the index attrIndex; if i is not equal to L / 2-1, do not perform the adding operation, where hp is the semi-long path instance, L is the length of the meta-path, and i is used to mark the edge type of the i-th layer of the meta-path; S306: assign the data in the set Anchor to the set Start, and increase the level mark i by 1, then jump to step S302; S307: For each key of attrIndex, obtain the corresponding second-layer key set skset, where every two nodes in skset constitute P neighbors, thereby obtaining the P neighbors PNB[cur] of each node cur∈S, where key is an identifier in the hash table used to uniquely identify a value or a group of values.

4. A community search method in a heterogeneous information network according to claim 1, It is characterized in that The network G in S4 is (S, E), where S is a node set and E is {Ppair 1 ,Ppair 2 ,…,Ppair m } is an edge set.

5. The community search method in a heterogeneous information network according to claim 1, It is characterized in that In S5, when nodes u, v, w satisfy the edges Ppair(u, v), Ppair(u, w), Ppair(v, w)∈E, u, v, w form a triangle, so the triangle support value Sup[Ppair(u, v)] of Ppair(u, v) is the number of common nodes that form P neighbor relationships with u and v at the same time.

6. A community search method in a heterogeneous information network according to claim 1, It is characterized in that The specific steps of S6 are as follows: S601: For each edge Ppair(u,v)∈E, if the triangle support value Sup[Ppair(u,v)] is less than α-2, add the edge Ppair(u,v) to the queue PQueue; S602: If the queue PQueue is not empty, proceed to step S603; if the queue PQueue is empty, proceed to step S7; S603: Take each edge Ppair(u,v) from the queue PQueue, and obtain the P neighbors PNB[u] and PNB[v] of u and v; S604: If the node w∈PNB[u]∩PNB[v], proceed to steps S605 and S606 successively, otherwise continue to obtain the next node w; S605: If the triangle support value Sup[Ppair(u,w)] is greater than or equal to α-2, then update Sup[Ppair(u,w)] to the current value minus 1; if Sup[Ppair(u,w)] is less than α-2, then add Ppair(u,w) to the queue PQueue; S606: If the triangle support value Sup[Ppair(v,w)] is greater than or equal to α-2, then update Sup[Ppair(v,w)] to the current value minus 1; if Sup[Ppair(v,w)] is less than α-2, then add Ppair(v,w) to the queue PQueue.

7. A community search method in a heterogeneous information network according to claim 1, It is characterized in that The specific steps of S7 are as follows: S701: Add the query node q to the queue VQueue and store q in the subgraph g; S702: If the queue VQueue is not empty, proceed to step S703; if the queue VQueue is empty, proceed to step S8; S703: Take each node v from the queue VQueue and obtain the P neighbor PNB[v]; S704: If the node u∈PNB[v] is not in the subgraph g, store u and the edge Ppair(v,u) into the subgraph g, add u to the VQueue, and then jump to step S702, otherwise jump to step S703.

8. A community search method in a heterogeneous information network according to claim 1, It is characterized in that The specific steps of S8 are as follows: S801: For each key of the index attrIndex, obtain the set skset consisting of the corresponding second-layer keys, where the key is an identifier in the hash table that is used to uniquely identify a value or a group of values; S802: If the node cur∈skset is included in the node set S', then obtain the value corresponding to cur, which is the corresponding value obtained by the hash table according to the key, that is, the List list storing the attribute set, and merge each attribute set in the list into EAttribute(cur), where S' represents the node set of the subgraph g obtained in step S7, and EAttribute(cur) represents the extended attribute of the node cur; S803: For each edge Ppair(u,v)∈E', calculate the Jaccard Distance value JDist(Ppair(u,v)) of nodes u and v, where E' represents the edge set of the subgraph g obtained in step S7; S804: sort the edges in the edge set E' in descending order according to the Jaccard Distance value, that is, put the edges with the same Jaccard Distance value in the same bucket, and sort different buckets in descending order according to the Jaccard Distance value, so that Bucket = {b 1 ,b 2 ,…,b l } is a sorted bucket, where set b t (1≤t≤l) stores the edge set with the largest Jaccard Distance value t; S805: Let left=1, right=l, where left and right respectively represent the left subscript and right subscript of the bucket sequence currently to be processed, and l represents the number of buckets in Bucket; S806: If left is less than right, go to step S807, otherwise go to step S8027; S807: If left is less than or equal to right, proceed to step S808; S808: Let mid = (left + right) / 2, where mid represents the middle subscript of the bucket sequence currently to be processed; S809: Put the barrel b t Add the edges in the subgraph g', where mid≤t≤right, and update the triangle support value of the edge; S8010: If the number of nodes in the subgraph g' is less than α or g' does not contain the node q, set right = mid-1 and jump to step S807 to continue adding edges to g', otherwise go to step S8011; S8011: Assign subgraph g' to temporary subgraph g"; S8012: Remove the edges that do not meet the conditions from the subgraph g'; S8013: If the subgraph g' does not exist or g' does not contain the node q, set right = mid-1 and jump to step S807, otherwise go to step S8014; S8014: Find the largest connected subgraph r containing q from the subgraph g'; S8015: If the sub-graph r does not exist, set right = mid-1 and jump to step S807, otherwise go to step S8016; S8016: Set left=mid and go to step S8017; S8017: If left is less than or equal to right, go to step S8018; S8018: Let mid = (left + right) / 2, where mid represents the middle subscript of the bucket sequence currently to be processed; S8019: Delete from subgraph g' the content in bucket b t The edges in , where left≤t≤mid, and update the triangle support value of the edge; S8020: If the number of nodes in the subgraph g' is less than α or g' does not contain the node q, set right = mid and jump to step S806, otherwise go to step S8021; S8021: Assign subgraph g' to temporary subgraph g"; S8022: Remove the edges that do not meet the conditions from the subgraph g'; S8023: If the subgraph g' does not exist or g' does not contain the node q, set right = mid and jump to step S806, otherwise go to step S8024; S8024: Find the largest connected subgraph r containing q from the subgraph g'; S8025: If the sub-image r does not exist, set right = mid and jump to step S806, otherwise go to step S8026; S8026: Set left=mid+1, and jump to step S8017; S8027: Output the maximum connected subgraph r, where r is the target community that meets the conditions.

Citation Information

Cited By

  • Community search method for team identification in academic network

    CN120804436A