Fast community query system and method with precision guarantee under large-scale network
By combining incremental sampling and approximate estimation methods with a breadth-first search algorithm, the problems of slow speed and low accuracy in community search on large-scale graph datasets are solved, and fast and accurate community query is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2026-03-20
AI Technical Summary
Traditional community search algorithms face the problems of slow search speed and low accuracy on large-scale graph datasets, making it difficult to quickly and accurately discover dense communities on such datasets.
By employing incremental sampling and approximate estimation methods, we construct a small-scale initial subgraph that satisfies the k-core constraint through attribute-aware sampling, candidate community optimization, and error-based parameter optimization. Combined with the breadth-first search algorithm, we improve search speed while maintaining accuracy.
It efficiently returns approximate query results in polynomial time, significantly improving query efficiency, supporting the accuracy and speed of large-scale online community queries, and is suitable for a variety of application scenarios.
Smart Images

Figure CN117453970B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of information retrieval, and relates to community query, in particular to a fast community query system and method with precision guarantee under large-scale network. BACKGROUND
[0002] With the continuous development of the Internet, graphs (a unique and universal data structure) are widely used in modeling numerous applications, such as social networks, biological networks, and the World Wide Web, to simulate complex entity relationships. Graphs represent entities by nodes and relationships between entities by edges, providing a powerful framework for capturing complex interconnections and dependencies in these domains. Graphs are so popular as modeling tools because they can effectively encapsulate the rich relationship information present in these interconnected systems. Through the use of nodes and edges, graphs provide a visual and intuitive representation of underlying relationships, allowing researchers, scientists, and developers to gain valuable insights into the structural characteristics, dynamics, and functions of entities and their interactions.
[0003] So how to mine valuable information and structure in graphs becomes the core problem of graph data analysis, because the characteristics of graph data lie in its complexity and multi-level nature. In large-scale graphs, containing various entities and complex interrelationships, it is crucial to extract meaningful information from them for scientific research, business, and social applications. To address this challenge, fast community query methods have emerged. Community search aims to explore and discover the inherent patterns and relationships in complex network structures, helping to reveal the constituent elements and interaction patterns of networks. Through community search, researchers can identify tightly connected communities in networks, as well as key nodes and subgraph structures connecting these communities.
[0004] In fact, community search has played an important role in various fields, including but not limited to social network analysis, biological network research, information retrieval and recommendation systems, crime analysis and counter-terrorism, market research and business analysis, and policy-making and social science research. For example, in social network analysis, community search helps to understand interaction patterns, information dissemination paths, and social group structures in social networks, providing support for social media marketing and public opinion analysis.
[0005] However, with the rapid development of the Internet, the data volume grows exponentially, which leads to the increasingly large size of graph data sets. Conventional algorithms face great challenges in coping with such huge graph data sets. Currently, the conventional community search algorithm is based on the traditional community model to find the maximum subgraph, and then gradually eliminates the low similarity nodes in the maximum subgraph. However, as the size of the graph data set expands, the number of nodes to be eliminated also increases accordingly, resulting in a sharp rise in additional time overhead. Therefore, in recent years, one of the core problems faced by the community search algorithm is how to improve the search speed while maintaining high search accuracy when coping with large-scale graph data, in order to meet the urgent demand for fast and accurate graph analysis. SUMMARY
[0006] The present application aims at the above-mentioned deficiencies, and provides a fast community query system and method with accuracy guarantee under large-scale network, which is improved on the basis of the traditional community model, and uses the idea of sampling estimation to quickly find the tight community while ensuring the community search accuracy in large-scale data set search.
[0007] In the first aspect, the present application provides a fast community query system with accuracy guarantee under large-scale network, which comprises a human-computer interaction module, a data query module, a processing module and a data encapsulation module. The human-computer interaction module is used for displaying the community query result. The data query module accepts the query request, manages the query result and sets the query parameter. The processing module is used for executing the community query method, performing attribute-aware sampling, approximate estimation, candidate community optimization and error-based parameter optimization operation on the isomorphic network, and generating the query result. The data encapsulation module encapsulates the entity attribute data and the community network graph.
[0008] As a preferred, the processing module first adopts the breadth-first search algorithm to obtain all the nodes connected with the target node, performs attribute-aware sampling to obtain the candidate community entity set R; then, constructs a sub-community network G according to the entity relationship of the isomorphic network and the nodes in the candidate community entity set R; evaluates the structural cohesion of the sub-community network G; then, performs approximate estimation on the sub-community network G to judge whether the sub-community network G satisfies the accuracy constraint. If the sub-community network G satisfies the accuracy constraint, the sub-community network G is directly returned as the candidate community to the query result. If the sub-community network G does not satisfy the accuracy constraint, the candidate community optimization is performed to delete part of the nodes in the sub-community network G; when the nodes in the sub-community network G are deleted to not satisfy the k-core structure constraint, and the sub-community network G still does not satisfy the accuracy constraint, the sampling scale t is adjusted based on the error, and the foregoing process is repeated based on the initial sub-community network G until a candidate community satisfying the accuracy constraint is found, and the candidate community is returned as the query result.
[0009] As preferred, the specific process of attribute-aware sampling is: determining an initial sampling scale t, calculating the similarity of all nodes with the target node, sorting according to the similarity from large to small, and obtaining a candidate community entity set R.
[0010] As preferred, the process of candidate community optimization is: deleting the node with the lowest similarity in the sub-community network G one by one and maintaining the k-core structure, while performing approximate estimation on the sub-community network G obtained after deleting the node, until the sub-community network G meets the precision constraint, and then stopping to continue deleting the node.
[0011] In the second aspect, the application provides a fast community query method with precision guarantee under a large-scale network, which comprises the following steps:
[0012] Step 1, constructing a homogeneous network containing a target node, and setting a k-core structure constraint k, a precision constraint e, a confidence level a and the target node according to the query requirements.
[0013] Step 2, screening out a plurality of nodes associated with the target node in the homogeneous network as the query result.
[0014] Step 2-1. Extract all nodes connected to the target node.
[0015] Step 2-2. Calculate the initial sampling scale t of the homogeneous network, which is expressed as:
[0016] t = 2 / e 2 ·ln((k+1)·(n-k-1) / a)+1
[0017] Wherein, e is the precision constraint, a is the confidence level, k is the k-core structure constraint, and n is the number of nodes in the entire homogeneous network.
[0018] Step 2-3. The weighted average value of the similarity of all attribute types between a node and the target node is taken as the similarity Similarity(v) between the node and the target node; v represents any node in the homogeneous network; after calculating the similarity Similarity(v) between all nodes and the target node, descending order sorting is performed.
[0019] Step 2-4. According to the node scale t and the similarity sorting determined in steps 2-2 and 2-3, the first t nodes not included in the candidate community entity set R are selected to join the candidate community entity set R.
[0020] Step 2-5. Connect the nodes with edges in the candidate community entity set R two by two to form a sub-community network G.
[0021] Step 2-6. Determine whether the sub-community network G satisfies the k-core structure constraint; if not, return to step 2-4 and update the candidate community entity set R.
[0022] Step 2-7. Perform an approximate estimation on the sub-community network G: first randomly select multiple nodes from the sub-community network G as a data subset, repeat to generate multiple data subsets; subsample each data subset to generate multiple samples, calculate the average similarity and confidence interval of each node in the sample with the target node, and according to the average similarity and confidence interval of the sample, calculate the similarity error of the sub-community network G, and record the error amplitude ε and confidence interval center value ζ of the sub-community network G. Determine whether the current sub-community network satisfies the precision constraint, if yes, return the sub-community network as the query result, if not, go to step 2-8.
[0023] Step 2-8. Sort the nodes in the sub-community network G in ascending order according to the similarity with the target node, delete the node with the lowest similarity and maintain the k-core structure, and execute step 2-7 again until the sub-community network G satisfies the precision constraint and returns the sub-community network as the query result; if the sub-community network G after deleting the node cannot satisfy the k-core structure constraint, go to step 2-9.
[0024] Step 2-9. Determine whether the size of the candidate community entity set R is equal to the size of the isomorphic network; if yes, return the sub-community network represented by the minimum similarity error as the candidate community; the sub-community network represented by the minimum similarity error represents the sub-community network with the smallest similarity error among the sub-community networks obtained by executing step 2-7 multiple times. If not, go to step 2-10.
[0025] Step 2-10. Update the sampling size t and re-execute steps 2-3 to 2-9.
[0026] As preferred, in the isomorphic network, each node corresponds to an entity. The nodes in the isomorphic network have text type attributes and numerical type attributes. The similarity of the isomorphic network can be represented as the average similarity of all nodes in the network with the target node.
[0027] As preferred, the attribute types of the nodes include text type attributes and numerical type attributes; the similarity of the numerical type attributes is calculated using Manhattan distance, and the similarity of the text type attributes is calculated using Jaccard distance.
[0028] The expression of the similarity Similarity(v) is:
[0029] Similarity(v) = β * f T (v, q) + (1 - β) * fC (v,q)
[0030] wherein f T (v,q) is the similarity of the text attribute of node v and the target node; β is the weight of the text attribute, and (1-β) is the weight of the non-text attribute; f C (v,q) is the similarity of the non-text attribute of node v and the target node.
[0031] Preferably, in step 2-10, the expression of the updated sampling scale t is:
[0032] t=t0·[(ε·(1+e) / (ζ·e) 2 -1]
[0033] wherein t0 is the sampling scale before updating; e and ε respectively represent the precision constraint and the error amplitude of the sub-community network represented by the minimum similarity error; and ζ is the center value of the confidence interval.
[0034] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory stores the computer program; and the processor executes the fast community query method.
[0035] In a fourth aspect, the present application provides a readable storage medium, which stores a computer program; and the computer program is executable on a processor to implement the fast community query method.
[0036] The present application has the following advantages:
[0037] 1. The present application is based on the incremental sampling idea, and performs community query, thereby solving the problem of low efficiency of the traditional community query method when facing large-scale data sets.
[0038] 2. The present application overcomes the precision problem of the traditional method in local small-scale search through an approximate estimation method, thereby better supporting the community search system to cope with the continuous evolution of the community network graph.
[0039] 3. The present application also fully considers the attribute relationship between the query entities, so that the found community not only has a high structural cohesion, but also has a close characteristic of high node similarity. The similarity and node sampling method is adopted to construct a small-scale initial subgraph satisfying the k-core constraint, thereby effectively avoiding the efficiency problem caused by large-scale deletion of low correlation nodes, returning an approximate query result in polynomial time, significantly improving the query efficiency, thereby better supporting large-scale network community query, and having wider applicability. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1The architecture diagram of the community search system provided by the present application.
[0041] Figure 2 The algorithm layer workflow diagram of the community search system provided by the present application.
[0042] Figure 3 The community network diagram stored in the data layer of the present application.
[0043] Figure 4 The isomorphic network diagram obtained in the initial running steps S2-2 to S2-6 of the present application.
[0044] Figure 5 The isomorphic network diagram obtained in the initial running steps S2-7 to S2-9 of the present application and the evolution process thereof.
[0045] Figure 6 The isomorphic network diagram obtained in the initial running steps S2-7 to S2-9 of the present application and the evolution process thereof.
[0046] Figure 7 The relative error comparison bar chart of the candidate community similarity and the real community similarity obtained by different query systems for part of the isomorphic network.
[0047] Figure 8 The response time comparison bar chart of different query systems for part of the isomorphic network. DETAILED DESCRIPTION
[0048] The present application will be further described below in conjunction with the accompanying drawings.
[0049] As shown in Figure 1 , a fast community query system with precision guarantee under a large-scale network includes a man-machine interaction module, a data query module, a processing module and a data encapsulation module. In the fast community query system, the man-machine interaction module, the data query module, the processing module and the data encapsulation module are arranged in the system framework from top to bottom as a front-end UI, an application layer, an algorithm layer and a data layer respectively.
[0050] The front-end UI uses graphical components to create a simple and elegant user interface for users, provides excellent interactive experience, and supports dynamic evolution of communities to help users deeply explore the relationship between communities and communities or between nodes in a community.
[0051] The application layer is used for interaction using Ajax, thereby accepting a query request of a user, delivering to a corresponding query service, managing and optimizing a query result, and the layer is used for processing a page loading performance design, a query parameter setting and a query result adjustment task. In addition, the application layer is also used for integrating a functional interface of the community search system, mainly an attribute community search algorithm based on sampling estimation, input including a precision constraint e, a confidence degree a, a structure constraint k and a target node q, the interface returns a same type node set having a close community relationship with the target node, and a template engine is used for rendering to generate a final result.
[0052] The algorithm layer is used for specifically implementing the attribute community search algorithm based on sampling estimation of the application layer, mainly divided into four steps of attribute perception sampling, approximate estimation, candidate community optimization and error-based sampling parameter adjustment, thereby obtaining a community satisfying a k-core structure and an attribute constraint.
[0053] The data layer is used for encapsulating entity attribute data and a community network graph, so as to support the graph search of the algorithm layer.
[0054] The process of the fast community query system for the community query system includes the following steps.
[0055] S1. The data layer of the community search system collects original entity attribute data of a target field, and constructs an isomorphic network of the target field. In the isomorphic network, each node represents an entity in the target field, and an edge and an entity only involve a specific type. The nodes in the isomorphic network have text type attributes and numerical value type attributes, which are used for describing the similarity of entities in the text type and the numerical value type. The higher the numerical value of the similarity is, the higher the similarity of two entities in the two attributes is. In addition, the similarity in the isomorphic network can be expressed as an average value of the similarity of all nodes in the network to a target node.
[0056] S2. The algorithm layer of the community search system loads the isomorphic network constructed in step S1 through a unified access interface, and sequentially performs attribute perception sampling, approximate estimation, candidate community optimization and error-based parameter optimization on the isomorphic network. In this embodiment, a k-core structure constraint k=3, a precision constraint e=50%, a confidence degree a=95% and a target node q are set. The target node q is an entity node, and in this embodiment, the target node q is specifically set as a node a6 in the isomorphic network. Therefore, the target node q is referred to as the node a6 in this embodiment. Figure 3
[0057] The flow of this step is shown in Figure 2 As shown, first, a breadth-first search algorithm is used to obtain all nodes connected to the target node, determine the initial sampling size t, and calculate the similarity of all nodes to the target node, and the candidate community entity set R is obtained by sorting the similarity from large to small; then, a sub-community network G is constructed according to the entity relationship of the isomorphic network and the nodes in the candidate community entity set R; the structural cohesion of the sub-community network G is evaluated; then, the sub-community network G is approximately estimated to evaluate whether the sub-community network satisfies the precision constraint. If the obtained sub-community network G satisfies the precision constraint, the sub-community network G is directly returned as a candidate community as the query result. If it is found that the sub-community network G does not satisfy the precision constraint, the node with the lowest similarity in the sub-community network G is deleted one by one and the k-core structure is maintained, and the sub-community network G obtained after the node is deleted is approximately estimated, until the sub-community network G satisfies the precision constraint, and the node deletion is stopped; when the node deletion of the sub-community network G does not satisfy the k-core structure constraint, and the sub-community network G still does not satisfy the precision constraint, the sampling size t is adjusted based on the error, and the foregoing process is repeated based on the initial sub-community network G, until a candidate community satisfying the precision constraint is found, and the candidate community is returned as the query result.
[0058] Further details of this step are as follows:
[0059] S2-1. A breadth-first search algorithm is used to obtain all nodes connected to the target node a6.
[0060] S2-2. The initial sampling size t of the isomorphic network is calculated, and the expression is as follows:
[0061] t = 2 / e 2 ·ln((k+1)·(n-k-1) / α)+1
[0062] Wherein, e is the precision constraint, a is the confidence, k is the k-core structure constraint, and n is the number of nodes of the entire isomorphic network. In this embodiment, e = 0.5, a = 0.95, k = 3, n = 9, and t = 5.
[0063] S2-3. Each attribute type of any node on the isomorphic network has a similarity; the similarity of different attributes between different nodes on the isomorphic network is calculated, the similarity of numerical attributes is calculated by Manhattan distance, and the similarity of text attributes is calculated by Jaccard distance; the weighted average value of the similarity of all attribute types of a node to the target node is taken as the similarity of the node to the target node Similarity(v); v represents any node in the isomorphic network; after the similarity Similarity(v) of all nodes to the target node is calculated, it is sorted in descending order;
[0064] The expression of Similarity(v) is:
[0065] Similarity(v) = β*f T (v,q) + (1-β)*f C (v,q)
[0066] wherein f T (v,q) is the similarity of node v and the target node in the text attribute (when there are multiple text attributes, the similarity of the text attribute is determined by taking the average value); β is the weight of the text attribute, and (1-β) is the weight of the non-text attribute; f C (v,q) is the similarity of node v and the target node in the non-text attribute.
[0067] S2-4. According to the node size t and the similarity ranking determined in steps S2-2 and S2-3, the first t nodes not included in the candidate community entity set R are selected to join the candidate community entity set R which is initially an empty set; in this embodiment, a6, a7, a4, a8, and a9 are added to the candidate community entity set R.
[0068] S2-5. According to the entity relationship, the nodes in the candidate community entity set R that have edges are connected between each other to form a sub-community network G. The sub-community network G constructed in this embodiment contains Figure 3 the a6, a7, a4, a8, and a9 nodes.
[0069] S2-6. It is judged whether the sub-community network G satisfies the k-core structure constraint; if not, it is returned to S2-4, and the candidate community entity set R is updated. In this embodiment, the isomorphic network after the initial execution of step S2-6 is as shown in Figure 4 .
[0070] S2-7. The current sub-community network G is approximately estimated: first, s = 3 points are randomly selected from the sub-community network G as a data subset, and b = 5 data subsets are repeatedly generated; the 5 data subsets obtained are respectively subsampled to generate multiple samples, the average similarity and the confidence interval of each node in the sample and the target node are calculated, and according to the average similarity and the confidence interval of the sample, the similarity error of the current sub-community network is calculated, and the error amplitude ε and the confidence interval center value ζ of the current sub-community network are recorded; it is judged whether the current sub-community network satisfies the precision constraint, if it satisfies, it is returned as a candidate network, if it does not satisfy, it enters step S2-8; in this embodiment, the sub-community network at this time does not satisfy the precision constraint condition, so it enters S2-8.
[0071] S2-8. The nodes in the sub-community network G are sorted in ascending order according to the similarity with the target node, the node with the lowest similarity is deleted and the k-core structure is maintained, and step S2-7 is executed again until a sub-community network G satisfying the precision constraint is found; if the sub-community network G after deleting the node cannot satisfy the k-core structure constraint, step S2-9 is entered; in this embodiment, there is no sub-community network satisfying the precision constraint until the sub-community network G cannot satisfy the k-core structure constraint, so step S2-9 is entered. The process of the first execution of step S2-8 is shown in FIG. 8. Figure 5
[0072] S2-9. It is judged whether the size of the candidate community entity set R is equal to the size of the isomorphic network; if yes, the sub-community network represented by the minimum similarity error is returned as the candidate community; the sub-community network represented by the minimum similarity error is the sub-community network G with the minimum similarity error in the sub-community networks G obtained by executing step S2-7 for the last time. If no, step S2-10 is entered; in this embodiment, the size of the candidate community entity set R is not equal to the size of the whole graph, so step S2-10 is entered.
[0073] S2-10. The sampling size t is calculated and updated according to the error amplitude of the sub-community network represented by the minimum similarity error and the confidence interval center value, and steps S2-3 to S2-9 are executed again.
[0074] The expression of the updated sampling size t is:
[0075] t=t0*[(ε*(1+e) / (ζ*e) 2 -1]
[0076] where t0 is the sampling size before updating; e is the precision constraint, ε is the error amplitude, and ζ is the confidence interval center value.
[0077] The evolution process of this step in this embodiment is shown in FIG. 8, and the isomorphic graph corresponding to the final community query result is shown in the lower left corner of FIG. 8. Figure 6 Figure 6
[0078] S3. The application layer provides an interface for community query to the user, and calls the method of step S2 to complete the following functions: inputting the precision constraint e=0.5, the confidence α=0.95, the structure constraint k=3 and the target node a6, and realizing the attribute community search based on sampling estimation through the method of step S2 (i.e. the algorithm layer) to meet the search demand for different structure communities. In addition, the application layer also provides the template engine rendering and interactive function of the user interface, and presents the query result returned by the application layer interface to the user in a graphical way according to the request of the user.
[0079] S4. Community query result display. In the design of the front-end UI, the Vue framework is adopted, combined with Element-UI, Html5 and JavaScript components, to realize the visual presentation of the community network relationship. The user can input the necessary community query parameters, which are used for the application layer interface. This embodiment uses Ajax technology (i.e. Asynchronous JavaScript and XML) to send Get and Post requests to the application layer, and then displays the estimated attribute community query results on the front-end page. The user can dynamically adjust the community precision constraint e, the confidence level a, and the structure constraint k, and observe the evolution state of the community network graph on the front-end display interface.
[0080] The related data of the query system and method provided in this embodiment is described as follows:
[0081] Table 1 below is the information of the related data sets that can be disclosed. Some data sets cannot be provided due to security reasons.
[0082] Dataset name Number of nodes Number of edges Max degree Facebook 4039 88234 1045 Github 37700 289003 9458 twitch 168114 6797557 35279 DBLP 682819 1951209 345 IMDB 2875685 9705602 591 LiveJournal 3997962 34681189 14815 Dbpedia 4521912 15045801 6760 Freebase 5706539 48724743 467 Yago 7308072 36624106 285 Twitter-2010 21297772 265025810 698112
[0083] Table 1: Related information of isomorphic networks that can be disclosed
[0084] As shown in Table 1, the query system and other three more advanced query systems are implemented in the isomorphic network, and the results obtained are shown in Figure 7 , Figure 8 , Table 2 and Table 3. In the above figures and tables, Ours represents the query system, ATC, VAC and ACQ represent the other three more advanced query systems. The additional inputs required by the query system are e = 0.02 and a = 0.95 (the above two parameters are the default parameters of the query system, and the user can adjust them on the relevant interface), and the structure constraint k and the query node q are common inputs of the above four query systems.
[0085]
[0086]
[0087] Table 2: Comparison table of relative error of candidate community similarity and true community similarity obtained by different query systems on the isomorphic network shown in Table 1 except Figure 7
[0088] DBpedia Yago Freebase Livejournal Twitter Ours 8.6100 41.6100 18.2400 387.5642 672.5734 ACQ - - - 12865.0000 42865.5833 ATC 16.3700 97.7800 53.5400 7923.4286 64412.6428 VAC 311.1400 142.7900 124.4900 1491.8564 11397.2144
[0089] Table 3: Comparison table of response time required by different query systems on the isomorphic network shown in Table 1 except Figure 8
[0090] Figure 7 As observed in Table 2, in the homogeneous network with small node scale, the response time of the query system provided by the embodiment is similar to that of the other three query systems, and as the node scale of the homogeneous network increases, the response time of the other three query systems has been far beyond the acceptable response time (within 1 second) of the user, while the query system still can maintain a relatively fast response time.
[0091] In addition, from Figure 8 As observed in Table 3, the coarse-grained evaluation of the community quality of the other three query systems leads to a high similarity error of the returned candidate community relative to the real community, while the candidate community returned by the fine-grained evaluation of the approximation of the community with the precision constraint and the confidence and the candidate community optimization provided by the embodiment has a high quality.
[0092] It should be noted that the above only details the preferred embodiments and principles of the present application, and for those skilled in the art, the specific implementation manner can be changed according to the idea provided by the present application, and these changes should be considered as the protection scope of the present application.
Claims
1. A fast community query system with guaranteed accuracy in large-scale networks; characterized in that: It includes a human-computer interaction module, a data query module, a processing module, and a data encapsulation module; in the fast community query system, the human-computer interaction module, the data query module, the processing module, and the data encapsulation module are respectively arranged from top to bottom in the system framework as the front-end UI layer, the application layer, the algorithm layer, and the data layer; The front-end UI uses graphical components to create a user interface; the application layer uses Ajax for interaction, accepts user query requests, passes them to the corresponding query service, manages and optimizes query results, and handles page loading performance design, query parameter settings, and query result adjustment tasks; the application layer provides users with an interface for community queries. The application layer also provides a template engine for rendering user interfaces and interactive functions, and presents the query results returned by the application layer interface in a graphical manner according to the user's request. The front-end UI uses the Vue framework, combined with Element-UI, HTML5 and JavaScript components, to realize the visual presentation of community network relationships, and displays the sampled and estimated attribute community query results on the front-end page; The human-computer interaction module is used to display community query results; The data query module accepts query requests, manages query results, and sets query parameters; The processing module is used to execute the community query method, perform attribute-aware sampling, approximate estimation, candidate community optimization, and error-based parameter optimization operations on the homogeneous network, and generate query results; The data encapsulation module encapsulates entity attribute data and community network graphs; The community query method includes the following steps: Step 1: Construct a homogeneous network containing the target nodes and set it according to the query requirements. k-core Structural constraints k Precision constraints e Confidence level α and the target node; Step 2: Filter out multiple nodes that are related to the target node in the homogeneous network and use them as query results; Step 2-1. Extract all nodes connected to the target node; Step 2-2. Calculate the initial sampling size of the isomorphic network. t Its expression is: t= 2 / e 2 · ln (( k+ 1)·( nk- 1) / α ) + 1 in, e For accuracy constraints, α For confidence level, k for k-core Structural constraints n This represents the number of nodes in the entire homogeneous network. Steps 2-3. Calculate the weighted average of the similarities between a node and the target node across all attribute types as the similarity score between the two nodes. Similarity ( v ); v Let represent any node in the isomorphic network; calculate the similarity between all nodes and the target node. Similarity ( v Then sort in descending order; Step 2-4. Based on the node size determined in Steps 2-2 and 2-3 t And similarity ranking, selecting entities not yet included in the candidate community entity set. R The front of the middle t Each node is added to the candidate community entity set. R middle; Steps 2-5. Set up candidate community entities R Nodes with connected edges are linked together to form a sub-community network. G ; Steps 2-6. Determine the sub-community network G Does it meet the requirements? k-core Structural constraints; if not satisfied, return to steps 2-4 and update the candidate community entity set. R ; Steps 2-7. Pairing sub-community networks G To make an approximate estimate: first from the sub-community network G Multiple nodes are randomly selected as a subset of data, and this process is repeated to generate multiple subsets. Subsampling is then performed on each subset to generate multiple samples. The average similarity and confidence interval between each node in the sample and the target node are calculated. Based on the average similarity and confidence interval of the samples, the sub-community network is calculated. G The similarity error was recorded, and the sub-community network was recorded. G error range ɛ With the center value of the confidence interval ζ Determine whether the current sub-community network meets the precision constraint. If it does, return the sub-community network as the query result. If it does not, proceed to steps 2-8. Steps 2-8. Sub-community network G The nodes in the algorithm are sorted in ascending order according to their similarity to the target node. The node with the lowest similarity is then removed and... k-core For structural maintenance, repeat steps 2-7 until the sub-community network is reached. G If the precision constraint is satisfied, return the sub-community network as the query result; if the sub-community network after removing nodes... G Unable to meet k-core If structural constraints are in place, proceed to steps 2-9. Steps 2-9. Determine the set of candidate community entities R Is the size of the sub-community network equal to the size of the isomorphic network? If they are equal, the sub-community network represented by the minimum similarity error is returned as a candidate community. The sub-community network represented by the minimum similarity error represents the sub-community network with the smallest similarity error among the sub-community networks executed in each step 2-7. If they are not equal, proceed to step 2-10. Steps 2-10. Update sampling scale t Then repeat steps 2-3 to 2-9.
2. A fast community query system with accuracy guarantee under a large-scale network as described in claim 1; characterized in that: In a homogeneous network, each node corresponds to an entity; nodes in a homogeneous network have textual and numerical attributes; the similarity of a homogeneous network can be expressed as the average similarity between all nodes in the network and the target node.
3. A fast community query system with accuracy guarantee under a large-scale network as described in claim 1; characterized in that: The node attribute types include text attributes and numerical attributes; the similarity of numerical attributes is calculated using Manhattan distance, and the similarity of text attributes is calculated using... Jaccard Distance calculation; Similarity Similarity ( v The expression for ) is: Similarity ( v ) =β*f T ( v,q ) + ( 1-β ) *f C ( v,q ) in, f T ( v,q ) is a node v Similarity to the text attributes of the target node; β For text attribute weights, (1- β ) represents the weight of non-textual attributes; f C ( v,q ) is a node v Similarity to the non-textual attributes of the target node.
4. A fast community query system with accuracy guarantee under a large-scale network as described in claim 1; characterized in that: In steps 2-10, the updated sampling scale t The expression is: t=t 0·[( ɛ · ( 1 +e ) / ( ζ · e ) 2 - 1]; in, t 0 represents the sampling size before the update; e , ɛ These represent the precision constraints and error magnitudes of the sub-community network represented by the minimum similarity error, respectively. ζ The value is the center value of the confidence interval.
Citation Information
Patent Citations
Attribute network embedding and community discovery method based on random walk
CN116756600A
Methods for community search, electronic device and storage medium
US20230140148A1