Community search method and system based on k-trus nested index and storage medium
Through the community search method based on k-truss nested index, the problems of low community search efficiency and difficult dynamic update in the existing technology are solved, and efficient and personalized community search and dynamic network data processing are achieved.
Patent Information
- Application Number
- CN202410908392.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-04-26
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-01
AI Technical Summary
Existing community search methods are inefficient when dealing with large networks, cannot meet high scalability and personalization needs, and are difficult to dynamically update community structures.
A community search method based on k-truss nested index is adopted to generate an index tree through data collection, index construction, community search and index maintenance steps, and use mapping collection technology to quickly search the community to support the changes in dynamic network data.
It improves the performance and efficiency of community search, meets users' personalized needs, and maintains the stability and effectiveness of community structure in dynamic networks.
Smart Images

Figure CN118885673A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of social network, and in particular relates to a community search method, system and storage medium based on k-truss nested index. Background Art
[0002] The goal of community search is to find a community that contains all search nodes based on one or more search nodes. Community structures naturally exist in many real-world networks, such as social, biological, collaborative, and communication networks [Xin H, Lakshmanan L, Xu J. Community Search over Big Graphs: Models, Algorithms, and Opportunities [C]. ICDE, 2017: 1451-1454.]. Community search problems have a wide range of application scenarios in the real world. For example, in an e-commerce platform network, if the user community to which the user belongs can be found based on the user's preferences, browsing history, and follow list attributes through community search methods, recommendations can be made for the user. This is because there is reason to believe that the user may also like the products that most users in the community like.
[0003] Due to the importance of communities, how to effectively find target communities that meet the requirements from a large network in the real world is an important research direction. Therefore, in order to meet real needs, community search methods should have the following properties [Fang Y, Huang X, Qin L, et al. A survey of community search over big graphs [J]. VLDB, 2020, 29 (1): 353-392.].
[0004] High efficiency: Community search tasks are often real-time, and real-world datasets have a data volume of millions or more, so high efficiency is a factor that must be considered in community search tasks.
[0005] High scalability: Community search tasks must be able to process real data sets, so the search method needs to be able to adapt to changes in data volumes from tens of millions to more.
[0006] High personalization: In the real world, people often specify one or more query nodes, and may also require the closeness of the communities found in the query. Community search methods should be able to support customized input parameters to obtain communities that meet user needs.
[0007] High quality: The search results should be guaranteed to meet the community's definition and have good evaluation indicators.
[0008] Support for dynamic graphs: Data in the real world often changes over time, so the relationships between nodes in the network may change and cause the community to change. Community search methods must be able to cope with such changes and give correct results.
[0009] Community search methods can be performed on simple networks and complex networks. The search methods on simple networks use community models to constrain the structure of the community to obtain the community, while the search methods on complex networks further utilize the additional semantic information carried by the complex network and introduce new indicators in addition to structural constraints to obtain the community. In addition, in order to complete the search and return the target community in linear time, some methods pre-extract network features and information to build an index, and then accelerate the search process through the index.
[0010] The basic community search method obtains the target community by constraining the structure of the community. Sozio et al. [Mauro S, Aristides G. The community-search problem and how to plan a successful cocktail party [C]. SIGKDD, 2010: 939-948.] gave a definition of community search and proposed a greedy algorithm that calculates the densest subgraph and iteratively removes nodes whose degrees do not meet the conditions, and finally obtains a k-core community. Cui et al. [Cui W, Xiao Y, Wang H, et al. Online search of overlapping communities [C]. SIGMOD, 2013: 277.] pointed out that the constraints and definitions of the k-clique community model are not flexible enough. Therefore, they changed the definition of k-clique that each node in the community must be connected to the remaining k-1 nodes to must be connected to α nodes. At the same time, they relaxed the restrictions of k-clique and defined it as a γ-quasi-k-clique model, thereby optimizing the k-clique model in the process of processing real-world data. Wang et al. [Wang C, Zhu J. Forbidden nodes aware community search [C]. AAAI, 2019, 33 (01): 758-765 P.] considered the situation of certain specific nodes that do not exist in the community in the real world, and called such nodes "forbidden nodes". They proposed three search methods based on the k-core model, the k-truss model, and the weighted model, and took forbidden nodes into consideration. Huang et al. [Huang X, Lakshmanan L, Yu JX, et al. Approximate closest community search in networks [J]. VLDB, 2015, 9 (4): 276-287.] also took the search distance into consideration during the search. The study used the k-truss model to constrain the community structure, and then accelerated the search process by deleting a large number of nodes far away from the query node.Esfahani et al. [Esfahani F, Daneshmand M, Srinivasan V, et al. Truss Decomposition on Large Probabilistic Networks using H-Index [C]. SSDBM, 2021: 145-156.] proposed an efficient algorithm based on probabilistic graph decomposition truss, in which each edge has a probability of existence independent of other edges. They used the concept of (k, η)-truss introduced in [Xin H, Wei L, Lakshmanan L. Truss Decomposition of Probabilistic Graphs: Semantics and Algorithms [C]. the 2016 International Conference. ACM, 2016: 77-90.], whose goal is to calculate a maximum subgraph from the original graph, and require that the edges of the original graph are contained in at least k triangles of this subgraph, and such inclusion probability is not less than a user-specified threshold η, that is, the threshold η defines the expected certainty level of the output truss. Sun et al. [Sun Z, Huang X, Xu J, et al. Efficient Probabilistic Truss Indexing on Uncertain Graphs [C]. WWW, 2021: 354-366.] proposed an index community search model based on (k, γ)-truss for uncertain graphs. They studied the (k, γ)-truss index construction and query problems on uncertain graphs. (k, γ)-truss is the largest subgraph of a given graph G. The model requires that the probability that each edge in the graph is contained in at least k-2 triangles is not less than γ. This method can obtain the queried (k, γ)-truss subgraph in an optimal linear time for any given k and γ truss community retrieval problem.
[0011] Community search methods on complex networks take into account the additional semantic information carried by the network. For example, in social networks, the nodes represented by each social participant carry attribute information, and social participants in a real community will have more similar attributes. Huang et al. [Huang X, Lakshmanan LV S. Attribute-driven community search [J]. VLDB, 2017, 10 (9): 949-960.] introduced the concept of node attribute similarity when obtaining communities. They obtained the target community based on the (k, d)-truss model, a community model that simultaneously restricts the diameter and edge support of the community, and attribute similarity. In addition, the edges in the network can reflect the interactive relationship between the two endpoints of the edge. The larger the weight on the edge, the stronger the relationship. Zheng et al. [Zheng Z, Ye F, Li RH, et al. Finding Weighted K-Truss Communities in Large Networks [J]. Information ences, 2017, 417: 344-360.] proposed a weighted k-truss model based on the k-truss model, taking the weight of the edge into consideration. The model takes the weight of the edge with the smallest weight in the community as the weight of the community. The goal of the study is to find the first r communities with the largest weights in the network. Chen et al. [Chen Y, Fang Y, Cheng R, et al. Exploring Communities in Large Profiled Graphs [J]. TKDE, 2019, 31 (8): 1624-1629.] performed community search on the profile graph. The profile graph is actually a special attribute graph. Each node in the graph has a label, and these labels in the profile graph can be organized in a hierarchical arrangement called a P-tree. Therefore, each node in the graph is associated with a P-tree. This study solves the profiled community search problem by finding a set of nodes with maximum overlapping P trees, namely profiled communities. Ebadian and Huang [Ebadian S, Huang X. Fast algorithm for k-truss discovery on public-private graphs [C]. IJCAI, 2019, pp. 2258–2264.] solved the community search problem on public-private graphs.The public-private graph consists of a public graph and multiple private graphs, where each user has a private graph that is only visible to private users, and all users share a public graph publicly. This study proposed an index-based computing paradigm based on the k-truss community model of the public graph, which can efficiently update the truss index on the public graph according to the edges in the private graph with minimal computation. In addition, in real-world networks, there may be more than one type of nodes and edges. A heterogeneous information network (HIN) is a network with different types of nodes and different types of edges. Xie et al. [Xie X, Song M, Chiming Liu, et al. Effective informative community search on attributed graph [J]. Neurocomputing, 2021, 444: 111-125.] proposed an attribute community search method that can handle heterogeneous information networks. This method converts heterogeneous networks into homogeneous networks through the meta-path method, and then constrains and obtains the target community based on the k-truss community model and the attribute similarity of the nodes.
[0012] In order to speed up community search, relevant community information can be extracted in advance through calculations in the network, then stored and organized into an index, and then applied in the search process. Lu et al. [Lu Z, Feng Y, Cao Q. Two-Level Index for Truss Community Query in Large-Scale Graphs [C]. GLOBECOM, 2019: 1-6.] mapped the relationship between nodes and communities by establishing a secondary index graph. The nodes of the first-level index graph represent the edges of the original graph, and the edges represent that the two endpoints of the edge can form a triangle in the original graph. The edges and nodes of the index have weights. The weight of the node is the support of the corresponding edge in the original graph, and the weight of the edge represents the support of the corresponding original graph. Figure 3The minimum support value among all the edges of the triangle; the nodes of the second-level index graph represent a community, and the edges represent the inclusion relationship between two adjacent communities. This method completes the mapping of support and edges into a graph by establishing a two-level index. In this way, this method can locate the relevant k-truss community through the given support and simple union and intersection operations during the search to directly answer community-level queries. Once the identifiers of the relevant communities are found, they can be passed to the underlying index to easily answer queries on the edges. Sun et al. [Sun L, Huang X, Li R, et al. Index-based Intimate-Core Community Search in Large Weighted Graphs [J]. TKDE, 2020, PP (99): 1-1.] used the index to obtain the k-core community. The index of this study is a mapping of each node in a graph to the maximum core value calculated for the node. During the search process, we first obtain a minimum spanning tree of all nodes in the connected query node set, and then gradually expand outward from the minimum spanning tree in a k-width, 1-depth manner based on the information provided by the index, continuously absorbing nodes to form a candidate subgraph, and then trimming the loosely connected nodes in the subgraph to obtain the target community. Fang et al. [Chen Y, Zhang J, Fang Y, et al. Efficient Community Search over Large Directed Graph: An Augmented Index-based Approach [C]. IJCAI, 2020: 3544-3550.] [Yixiang Fang, Zhongran Wang, Reynold Cheng, Hongzhi Wang, and Jiafeng Hu. Effective and efficient community search over large directed graphs. IEEE Trans. Knowl. Data Eng., 2019, 31 (11): 2093–2107] studied efficient community search methods for directed graphs, and designed a (k, l)-core community model to restrict the out-degree and in-degree of nodes in the community and used the nested structure of the model to establish a forest-like index, and proposed the NestIDX index.They organized communities into index trees according to their different in-degrees. The communities in each tree have the same in-degree, while the out-degrees of communities at each level in the tree increase continuously from top to bottom, and these communities have a nested relationship. In this way, the various index trees together form an index forest. The algorithm establishes a mapping relationship between nodes and communities, and can quickly obtain the target community in the index based on the mapping during the search process. Summary of the invention
[0013] The object of the present invention is to provide a community search method, system and storage medium based on k-truss nested index.
[0014] The purpose of the present invention is achieved through the following technical solutions:
[0015] A community search method based on k-truss nested index, the specific steps are as follows:
[0016] Step 1: Data collection;
[0017] Obtain raw network data from network data sources, process and cleanse the data to ensure data integrity and accuracy; the processed data includes connection relationships between nodes and node attribute information;
[0018] Step 2: Index construction;
[0019] By organizing and indexing large-scale data in a structured manner, an index tree is generated to improve the query efficiency and retrieval speed of data; various algorithms and data structures are used to organize data according to specific attributes and relationships to form a fast retrieval structure;
[0020] Step 3: Community search;
[0021] Using index tree and mapping set technology, the community structure in the network can be quickly and accurately searched; according to the user's query conditions, the community containing the specified node set can be found, supporting multi-node or single-node search requirements;
[0022] Step 3: Index maintenance;
[0023] For the dynamic changes of network data, namely the operations of adding nodes and edges and removing nodes and edges, corresponding algorithms are designed to maintain the community structure based on nested indexes.
[0024] Furthermore, the step 1 is specifically as follows:
[0025] Step 1.1: Collect raw network data from online social platforms or other data sources, including posts, comments, and forwarding information;
[0026] Step 1.2: Process and clean the collected raw data to extract the required information;
[0027] Step 1.3: Encode the post content into an embedding vector;
[0028] Step 1.4: Construct an undirected graph based on the association between posts, form a logical relationship between post nodes, and divide events such as the spread of false information into a propagation subgraph and a diffusion subgraph;
[0029] Step 1.5: Use the community division method to obtain a community set with basic community characteristics.
[0030] Furthermore, the generation of the index tree in step 2 divides the network into multiple levels of community structures according to the characteristics of the network data and the definition of the k-truss community; at the same time, a mapping relationship between nodes and communities is established to link each node with the basic community to which it belongs and the k-truss community nested above it.
[0031] Furthermore, the step 3 is specifically as follows:
[0032] Step 3.1: Find the corresponding basic community in the mapping set according to the query node set;
[0033] Step 3.2: Based on these basic communities, search upward along the index tree to find the nearest common ancestor community that meets the parameter k requirement.
[0034] Furthermore, the LCA community includes the target communities of all query nodes.
[0035] Furthermore, in the node adding operation in step 4, first the community associated with the newly added node is found, and then according to the hierarchical relationship of these communities, the communities may be merged or split, and the edge support between the node and its neighboring nodes is updated; the edge adding operation finds the community corresponding to the new edge endpoint, merges it or directly updates the edge support within the community; the node or edge removal operation removes the node or edge in the corresponding community, and recalculates the k-truss characteristics of the community.
[0036] A community search system based on k-truss nested index, comprising a data collection device, an index construction device, a community search device and an index maintenance device;
[0037] The data collection device collects raw data from the network platform and processes it into the logical relationship of post nodes, providing preparation for the subsequent construction of a community search system based on k-truss nested index;
[0038] The index construction device executes an index construction algorithm based on a k-truss nested structure according to the input original network, generates an index tree structure capable of supporting fast community search, and maintains a set of mapping relationships from nodes to communities for subsequent personalized community search;
[0039] The community search device is based on a nested index and designs a community search algorithm using an index tree and a mapping set. By traversing the query nodes and searching for a k-truss community that meets the parameter k requirement upward along the index tree, a target community containing all query nodes is finally obtained.
[0040] The index maintenance device processes the operations of adding and removing nodes and edges in dynamic network data through an algorithm to maintain the stability and effectiveness of the community structure based on the nested index.
[0041] A computer-readable storage medium stores a computer program / instruction thereon, characterized in that when the computer program / instruction is executed by a processor, the steps of a community search method based on a k-truss nested index are implemented.
[0042] A computer program product includes a computer program / instruction, characterized in that: when the computer program / instruction is executed by a processor, the steps of a community search method based on a k-truss nested index are implemented.
[0043] The beneficial effects of the present invention are:
[0044] Through the present invention, the community search based on the k-truss nested index can improve the performance of the community search, and can meet the personalized search needs of users while ensuring that the searched community has structural cohesion characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A typical application environment for implementing the present invention;
[0046] Figure 2 is a structural block diagram of the system described in the present invention;
[0047] Figure 3 A schematic diagram of a community search based on a k-truss nested index according to the present invention;
[0048] Figure 4 An example graph of community search for the present invention;
[0049] Figure 5 The following are the running results of the four algorithms on the com-DBLP dataset;
[0050] Figure 6The following are the results of the four algorithms running on the ego-Facebook dataset;
[0051] Figure 7 The following are the running results of the four algorithms on the com-Amazon dataset;
[0052] Figure 8 This is a graph showing the running results of community search algorithms based on different k-truss indexes on the com-DBLP dataset;
[0053] Fig. 9 This is a graph showing the running results of community search algorithms based on different k-truss indexes on the ego-Facebook dataset;
[0054] Fig.10 This is a graph showing the running results of community search algorithms based on different k-truss indexes on the com-Amazon dataset;
[0055] Fig.11 Construct execution time graphs for indexing at different data sizes on three datasets;
[0056] Fig.12 This is the precision graph of the result community obtained by the CSKNI algorithm under different data scales of three data sets;
[0057] Fig.13 The recall graph of the result community obtained by the CSKNI algorithm under different data scales of three data sets;
[0058] Fig.14 The F1 graph of the result community obtained by the CSKNI algorithm under different data scales of the three data sets;
[0059] Fig.15 The IoU graph of the result community obtained by the CSKNI algorithm under different data scales of the three datasets;
[0060] Fig.16 The structural similarity graphs of the result communities obtained by the four algorithms on the Bitcoin OTC and wiki-RfA datasets. DETAILED DESCRIPTION
[0061] The present invention is further described below in conjunction with the accompanying drawings.
[0062] Figure 1 To implement the typical application environment of the present invention, specifically:
[0063] In the real world, negative weight edges actually exist and have special value. Figure 1The figure shows a part of a real-world network called Bitcoin OTC trust weighted signed network. In the figure, nodes represent users, and edges represent evaluations between two users. Green edges are positive weight edges, which means that both users have positive evaluations; red edges are negative weight edges, which means that both users have negative evaluations. Users can rate other users to measure their credibility, with scores ranging from -10 to +10. It can be seen that users who have positive evaluations of each other are more likely to form a subgraph with a community structure. Therefore, in other studies, the information provided by negative weight edges in the signed network is further utilized.
[0064] Figure 2 The structure block diagram of the system of the present invention is shown, comprising:
[0065] Data collection device: collects raw data from the network platform and processes it into the logical relationship of post nodes, providing preparation for the subsequent construction of a community search system based on k-truss nested index.
[0066] The data collection device collects raw network data from online social platforms or other data sources, including posts, comments, forwarding and other information, processes and cleans the collected raw data, extracts the required information, and encodes the post content into an embedded vector. On this basis, an undirected graph is constructed according to the association between posts, forming a logical relationship between post nodes, and dividing events such as the spread of false information into propagation subgraphs and diffusion subgraphs for subsequent index construction and community search. Using community partitioning methods, such as the partitioning method based on modularity indicators mentioned in the article, useless nodes and edges between communities are quickly eliminated to obtain a community set with basic community characteristics, providing a basis for subsequent index construction.
[0067] Index construction device: According to the input original network, execute the index construction algorithm based on the k-truss nested structure to generate an index tree structure that can support fast community search, and maintain a set of mapping relationships from nodes to communities for subsequent personalized community search.
[0068] The index construction device improves the query efficiency and retrieval speed of data by organizing and indexing large-scale data in a structured manner. The device uses various algorithms and data structures, such as B-trees, hash tables, etc., to organize data according to specific attributes and relationships to form a fast retrieval structure. The role of the index construction device is not only to accelerate the query response time of data, but also to reduce the cost and complexity of data access. By building an index, users can locate and access the required data more quickly, improving the overall performance and efficiency of the system. Finally, the index construction device provides users with an efficient and convenient data access interface, supporting the system to quickly retrieve, filter and sort large-scale data, thereby meeting users' needs for data real-time, accuracy and reliability.
[0069] Community search device: Based on the nested index, a community search algorithm using index tree and mapping set is designed to traverse the query nodes and search for k-truss communities that meet the parameter k requirement upward along the index tree, and finally obtain the target community containing all query nodes.
[0070] Community search devices use technologies such as index trees and mapping sets to achieve fast and accurate searches of community structures in the network. These devices can find communities containing a specified set of nodes based on the user's query conditions, supporting multi-node or single-node search requirements. Through algorithm optimization and the application of nested indexes, community search devices can achieve fast search responses within linear time complexity.
[0071] Index maintenance device: In dynamic network data, the operations of adding and removing nodes and edges are processed through algorithms to maintain the stability and effectiveness of the community structure based on nested indexes.
[0072] The index maintenance device designs corresponding algorithms to maintain the community structure based on nested indexes in response to the dynamic changes of network data, namely the operations of adding nodes and edges and removing nodes and edges. Specifically, for the operation of adding nodes, the index maintenance device merges or updates the affected communities by recalculating the communities associated with the newly added nodes, while maintaining the new community structure and node mapping relationship. For the operation of adding edges, the device finds the basic community to which the endpoints of the newly added edges belong, merges or updates the communities, and maintains the node structure and mapping relationship of the new community. For the operation of removing nodes, the index maintenance device finds the community where the removed node is located, recalculates the structure of the community and its subcommunities, and maintains the integrity of the community and the node mapping relationship. For the operation of removing edges, the device finds the community to which the removed edge endpoints belong, checks whether the edges need to be removed and updates the community structure to ensure that the community still meets the k-truss requirements.
[0073] Figure 3The schematic diagram of the index construction of the community search system and method based on the k-truss nested index specifically shows an index tree and a corresponding node mapping set obtained by the index construction algorithm. As shown in the figure, the original network consists of 19 nodes, which will also serve as the root node of the index tree. This study can use community partitioning methods such as modularity and label propagation to partition the original graph. For example, based on the modularity index, the network composed of 19 nodes is divided into three basic communities: {1,2,3,4,5,6,7,8}, {9,10,11,12,13}, {14,15,16,17,18,19}. The nodes representing these three communities in the tree are painted green, blue and purple respectively, and their locations are the basic community layers. These communities are then passed to the next step of the truss decomposition algorithm to obtain communities that meet the k-truss constraints. Then, k is continuously increased, and the truss decomposition algorithm is recursively executed to generate k-truss communities until no communities that meet the constraints can be generated. These communities are located in the 3- to 6-truss community layers in the figure. Since there is no 7-truss community that can be generated, the lowest level of community is the 6-truss community. During the generation of the entire index tree, each node representing a community in the tree will be connected according to the hierarchical relationship, that is, the solid line in the figure represents a bidirectional connection. At the same time, the algorithm will continuously update the node mapping set during execution to ensure that each node is always mapped to the lowest level community in the index tree where the node is located. This mapping set is in the lower part of the figure, and the mapping from the node to the community is represented by a one-way dotted line.
[0074] The steps of the index construction algorithm are as follows: 1. Construction and initialization of node community mapping set: First, the algorithm starts by constructing and initializing a node community mapping set. This mapping set maps each node to the root node represented in the index tree. This means that each node is initially considered to belong to the root community of the entire network. 2. Basic community partitioning: Next, the algorithm uses the community partitioning method to process the original network and obtain a basic community set. This set consists of basic communities, which have basic cohesive characteristics. In ordinary networks, basic communities are tightly connected internally and sparsely connected externally; in symbolic networks, in addition to these characteristics, basic communities also have the characteristics of positive edge internal connection and negative edge external connection. 3. Connection of layer 0 and layer 1 communities: The next step of the algorithm is to connect the communities of layer 0 (root node) and layer 1 (basic community set) in the index tree. This step ensures the association of the root node with the basic community, preparing for the subsequent nested community generation. 4. Nested subcommunity generation: Next, the algorithm uses the index tree construction algorithm to start from each community in the basic community set. This algorithm will recursively use the k-truss decomposition algorithm to generate nested subcommunities until no new communities that meet the constraints can be generated. Each time a new subcommunity is generated, the algorithm will update the node-community mapping relationship to ensure that the nodes in the new community point to the lower-level community. 5. Connect the original community and subcommunity: After generating a new subcommunity, the algorithm will connect the original community and the newly generated subcommunity to build a complete nested structure. This process ensures the correct connection and relationship between communities at all levels in the index tree. 6. Return a mapping set: Finally, when all steps are completed, the algorithm will return an updated node-community mapping set. This mapping set reflects the structure of the entire index tree, in which each node is correctly mapped to the corresponding community, so that the entire index tree construction process is completed.
[0075] Figure 4 A community search flow chart of a community search system and method based on k-truss nested index is given, specifically:
[0076] The search conditions are: the query node set consisting of node 1 and node 7, and k is 3. First, the search algorithm needs to find the k-truss community with the lowest number of layers in the index tree where the two query nodes are located according to the mapping set. In the figure, they are {1,2,3,6} and {4,5,7,8}. Since both communities are 4-truss communities, and 4-truss communities can also meet the definition of 3-truss communities, these two communities can be used as candidate communities. However, because neither of these two communities can meet the condition of containing all search nodes at the same time, it is necessary to continue searching. According to the nested structure of the k-truss community, the parent community in the index tree must contain all the nodes of all child communities, so the problem is transformed into finding the nearest common ancestor community of the two candidate communities, and the ancestor community should be able to meet the 3-truss requirements. Therefore, starting from the two candidate communities, we find the community {1,2,3,4,5,6,7,8} through the connection from the community to the parent community. This community is a 3-truss community and is the lowest common ancestor of the two communities. It contains all the search nodes and is therefore the target community.
[0077] The following describes in detail the experimental example scenarios of the present invention, and analyzes the implementation results in combination with the advantages of the present invention.
[0078] The hardware operating environment used in the experiment is: CPU, Intel Core i7-8700K, 3.7GHz 6 cores 12 threads; GPU, NVIDIA GeForce RTX 3060 Ti, 8GB video memory; memory, 16GB; hard disk, 222GB SATA solid state drive.
[0079] Five datasets will be used for experiments: com-Amazon, com-DBLP, ego-Facebook, Bitcoin OTC, and wiki-RfA. Among them, com-Amazon, com-DBLP, and ego-Facebook are networks with real community structures. Bitcoin OTC and wiki-RfA are symbolic networks. The specific information of the datasets is shown in Table 1.
[0080] Table 1
[0081]
[0082] The com-Amazon dataset is collected from the Amazon e-commerce website. The nodes in the dataset are the products sold on the website. Based on the concept of "users who purchased the product on the website also purchased the product", when two products on the website are often purchased together, an edge is established in the dataset for the nodes representing the two products. The community in the dataset represents the products that are often purchased together.
[0083] The com-DBLP dataset was collected from the DBLP website, which is based on an English literature database system related to computer science with the authors of the literature as the core, and provides a comprehensive list of computer science research papers. The dataset is a paper collaboration network, where the nodes in the network represent the authors of the papers. If there is an edge between two nodes, it means that the two authors represented by the nodes have published papers together. A real community in the dataset consists of authors who have published papers on the same publishing platform.
[0084] The ego-Facebook dataset is collected from Facebook, a social networking service platform that allows users to communicate and share with people around the world. In the dataset, nodes represent users on the website, and edges in the nodes represent "friend" relationships between users. The real community in the dataset consists of "circles" (or "friend lists") in Facebook.
[0085] The Bitcoin OTC dataset comes from the Bitcoin OTC platform. Nodes in the network represent users. The evaluation of one user on another user is represented by a directed edge, and the weight on the edge is the score. Users can rate each other, and the score range is -10 (complete distrust) to +10 (complete trust).
[0086] The wiki-RfA dataset comes from the RfA program of Wikipedia. If a Wikipedia editor wants to become an administrator, other Wikipedia members must submit votes for him / her. Each vote can be a neutral vote, a negative vote, or a positive vote. In the dataset, members are represented by nodes, and the directed edges between nodes are a vote from one member to another. This edge carries labels with the meanings of "Support", "Neutral", and "Oppose".
[0087] In order to measure the effect and efficiency of the method proposed in this invention, this experiment will select Precision, Recall, IoU value, F1 value, structural similarity and algorithm execution time as evaluation indicators. These evaluation indicators are introduced below:
[0088] Now suppose that a community search is performed, the query node set used in the search is Q, and the community found by the search algorithm is CQ , C Q The node set is V q , and the real community containing Q in the dataset is C t , C t The node set is V t .
[0089] The precision reflects the proportion of nodes correctly searched in the result community. The precision calculation method of this search is shown in the following formula.
[0090]
[0091] Recall reflects the proportion of nodes correctly searched in the real community. The calculation method of the recall rate of this search is shown in the following formula.
[0092]
[0093] The F1 value (F-Measure) is the harmonic mean obtained by Precision and Recall, and is an overall evaluation of the search results. The calculation method of the F1 value of this search is shown in the following formula.
[0094]
[0095] The IoU value (Intersection over Union) reflects the node overlap rate between the search result community and the real community. The IoU value calculation method for this search is shown in the following formula.
[0096]
[0097] The structural similarity between nodes is the ratio of the number of common neighbors between two nodes to the total number of neighbors of the two nodes. Q For example, the structural similarity is calculated by summing the structural similarities between all nodes in the community and dividing it by the square of the total number of nodes in the community. This indicator measures the overall degree of structure of the community, and the calculation method is as follows:
[0098]
[0099] For the datasets com-Amazon, com-DBLP and ego-Facebook with real community structures, the present invention will use Precision, Recall, IoU value, F1 value and execution time to measure the difference and execution efficiency of the search result community and real community of the proposed method in these datasets. For the symbolic network datasets Bitcoin OTC and wiki-RfA. The present invention will use structural similarity and execution time to measure the processing capability and efficiency of the research method for these two datasets.
[0100] Select the comparison method as follows:
[0101] NestIDX algorithm: This algorithm builds a nested index structure based on k-core to accelerate community search. Because the dataset processed by the NestIDX algorithm is a directed graph, it is adjusted to a model that can process undirected graphs to adapt to the experiment.
[0102] WC-index algorithm: This algorithm builds an index through a local exploration of k-core communities and uses a two-level expansion method of k-width and 1-depth to complete efficient community search.
[0103] 2-level index algorithm: This algorithm establishes a two-level index by analyzing the k-truss community structure. The algorithm maps the edges in the original graph into nodes of the first-level index using support, and maps the first-level node groups into nodes of the second-level index, completing the k-truss decomposition of the original graph, and then completes the k-truss community search through the index structure.
[0104] In order to fully evaluate the algorithm from all angles, this paper designs four sets of experiments based on the characteristics of the algorithm and data set:
[0105] Experiment 1: Experiment on the impact of k parameter on search performance. This experiment will study the ability of the CSKNI algorithm to obtain real communities when setting different k parameters. The experiment will be based on the com-Amazon, com-DBLP and ego-Facebook datasets, and will execute the CSKNI algorithm and the baseline algorithm to obtain the result community by setting different k values. Then, the Precision, Recall, IoU value and F1 value of the results obtained by different algorithms will be calculated respectively.
[0106] Experiment 2: Experiment on the impact of different k-truss index structures on community search performance. This experiment will evaluate the performance of community search results under the relaxed k-truss index structure with community division proposed in this study and the ordinary k-truss index structure without community division. The experiment is based on three datasets: com-Amazon, com-DBLP, and ego-Facebook. By setting different k values, the CSKNI algorithm with and without the relaxed k-truss index structure is executed to obtain the result community, and then the Precision, Recall, IoU value, and F1 value are calculated for the results obtained by different algorithms.
[0107] Experiment 3: Time performance evaluation experiment of index building algorithm. This experiment will execute the index building algorithm separately by using different scales of the data set, and count the execution time of the algorithm on different data sets to test whether the changes presented by the algorithm as the amount of data processed increases are in line with theoretical expectations. The experiment will select com-DBLP, ego-Facebook and com-Amazon data sets, and then divide these data sets into five groups, that is, randomly select 10%, 25%, 50%, 75% and 100% of the original data set for testing, execute the index building algorithm for each group of data, and count the total execution time of each group.
[0108] Experiment 4: Experiment on the impact of dataset scale on the effective performance of community search. This experiment will use different scales of datasets to execute the CSKNI algorithm and analyze the performance of the algorithm's search results on different datasets. The experiment will select com-DBLP, ego-Facebook, and com-Amazon datasets, and then divide these datasets into five groups, that is, randomly select 10%, 25%, 50%, 75%, and 100% of the original dataset for testing, execute the CSKNI algorithm on each group of data to obtain the result community, and then calculate the Precision, Recall, IoU value, and F1 value of the obtained results.
[0109] Experiment 5: Experiment on the processing ability of semantic information in symbolic networks. This experiment will verify the ability of the CSKNI algorithm to capture and utilize the additional semantic information carried by symbolic networks when performing community search, and test the algorithm's execution performance on symbolic networks. The experiment will select the Bitcoin OTC and wiki-RfA datasets, select search nodes to execute the CSKNI algorithm and the baseline algorithm, and calculate the structural similarity of the search result communities. Since the edge types in the two selected symbolic network datasets are directed edges, the datasets will be preprocessed here to obtain a new signed undirected graph. The processing method is divided into three steps: (1) The original graph node set remains unchanged as the new graph node set; (2) In the original graph, if two nodes have directed edges pointing to each other, an undirected edge is established for the two nodes in the new graph, and the edge weight is 0 by default; (3) If the weights of the two directed edges between the two nodes in (2) are both positive, the weight of the corresponding undirected edge is set to +1; if the weights of the original two directed edges are both negative, the weight of the corresponding undirected edge is set to -1.
[0110] 1. Experiment on the influence of k parameter on search performance
[0111] This paper will select different k parameters to execute the community search algorithm, and analyze the difference between the search result community and the real community through evaluation indicators. For the CSKNI algorithm and the 2-level index algorithm, the parameter k defines the structural constraints of the k-truss community; for the NestIDX algorithm and the WC-index algorithm, the parameter k defines the structural constraints of the k-core community. The experiment will observe the community search results by changing the value of k. The F1 value can comprehensively consider the changes in Precision and Recall. Figures 5 to 7 The changes of F1 value and IoU value calculated by the communities searched by the four algorithms for the three datasets com-DBLP, ego-Facebook and com-Amazon are shown as the parameter k changes.
[0112] from Figures 5 to 7 As can be seen from the figure, as the k value increases, the CSKNI algorithm performs best, with the highest F1 and IOU values. This proves the effectiveness of the CSKNI algorithm for community search under different k values. Figure 5 It can be seen that the performance of the three algorithms reaches a peak when k = 4 and 6, which means that a large k value does not necessarily improve the search performance on the DBLP dataset. Figure 6 and Figure 7 It can be seen from the figure that on the ego-Facebook and com-Amazon datasets, the performance of CSKNI increases steadily, while the performance of other baseline algorithms fluctuates in a larger range. Figure 6It can be noted that on the ego-Facebook dataset, when k is less than or equal to 8, the CSKNI algorithm performs better than other algorithms, which means that a large number of communities with cohesive features do not necessarily satisfy the k-truss community constraint. This conclusion further proves the necessity and superiority of the k-truss nested community structure proposed in this research method.
[0113] In summary, from the rules and comparison results of the evaluation indicators calculated based on each search result in Experiment 1, it can be seen that the results obtained by the CSKNI algorithm are consistent with the characteristics of the dataset, and compared with the baseline algorithm, the algorithm has better search results overall, which proves the effectiveness of the CSKNI algorithm.
[0114] 2. Experiment on the impact of different k-truss index structures on community search performance
[0115] This part of the experiment will use three datasets: com-Amazon, com-DBLP and ego-Facebook, and execute the community search algorithm under the relaxed k-truss index structure with community partitioning and the ordinary k-truss index structure without community partitioning, and conduct performance analysis. Figures 8 to 10 The changes in Precision, Recall, F1 and IoU values calculated by the community search algorithm under the relaxed k-truss index structure and the ordinary k-truss index structure for the three datasets com-DBLP, ego-Facebook and com-Amazon are shown respectively as the parameter k changes.
[0116] like Figures 8 to 10 As shown in the figure, the community search results on the relaxed k-truss index structure with community partition are better than those on the ordinary k-truss index without community partition in terms of Precision value, F1 value and IoU value, which proves that the design of the relaxed nested k-truss index structure proposed in this study effectively improves the performance of community search. In addition, it can be noted that the Recall value on the ordinary k-truss index structure without community partition is better than the Recall value on the relaxed k-truss index structure. This is because the design of the relaxed k-truss index structure improves the tightness constraint on the community results, which increases the constraint strength on the searched community, resulting in a relatively small searched community, and then obtaining a lower Recall value.
[0117] In summary, from the rules and comparison results of the four evaluation indicators obtained in Experiment 2, it can be seen that the k-truss nested index structure proposed in this study can effectively improve the community search performance, which further proves the effectiveness of the CSKNI algorithm based on the k-truss nested index structure.
[0118] 3. Time performance evaluation experiment of index construction algorithm
[0119] This part of the experiment will use three datasets, com-Amazon, com-DBLP and ego-Facebook, and randomly select 10%, 25%, 50%, 75% and 100% of the original datasets to execute the index construction algorithm and calculate the execution time.
[0120] like Fig.11 As shown in the figure, for the three data sets, the execution time of the algorithm shows an increasing trend with the increase of data size. It can be noted that the time cost shows a superlinear law with the size of the data set. This result is consistent with the theoretical analysis result of the time complexity of the index construction algorithm O(m 1.5 +n 2 ) is consistent. In addition, we can see that the time complexity on the com-DBLP and ego-Facebook datasets is higher than that on the com-Amazon dataset. This is because the com-DBLP and ego-Facebook networks are denser than com-Amazon and therefore have more communities, resulting in a slower index building process.
[0121] 4. Experiment on the impact of dataset size on the effective performance of community search.
[0122] This part of the experiment will use the three datasets of com-Amazon, com-DBLP and ego-Facebook, and randomly select 10%, 25%, 50%, 75% and 100% of the original datasets for execution and calculate the execution time. According to the k value corresponding to the optimal result obtained on each dataset in Experiment 1, this experiment will set the parameter k to 6, 5 and 3 for the three datasets of com-DBLP, ego-Facebook and com-Amazon respectively. Figures 12 to 15 The changes in Precision, Recall, F1, and IoU values calculated by executing the community search algorithm on the three datasets com-DBLP, ego-Facebook, and com-Amazon are shown respectively under different dataset sizes.
[0123] like Figures 12 to 15As shown in the figure, for the three data sets, the four performances of the algorithm all show an upward trend with the increase of data size. This means that the more data there is, the more conducive it is to obtain complete community information, and thus to obtain more accurate community search results. As can be seen from the figure, this algorithm can effectively use the information in the data set to extract the community. As the degree of data completeness increases, the search results obtained by this research algorithm become more accurate.
[0124] 5. Experiment on symbolic network semantic information processing capability
[0125] like Fig.16 As shown in the figure, based on the Bitcoin OTC and wiki-RfA datasets, among the community structure similarity indicators obtained by the four algorithms, the CSKNI algorithm obtains the maximum value, and the results obtained by the other three baseline algorithms are relatively close. This is because the CSKNI algorithm uses the positive and negative edge information of the symbolic network to extract the community. In addition to the structural constraints, nodes with additional positive edges may also be part of the community, while nodes connected by negative edges will hardly form a community. Experiments show that the CSKNI algorithm can better search for the target community by using this symbolic information.
[0126] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A community search method based on k-truss nested index, characterized by: The specific steps are as follows: Step 1: Data collection; Obtain raw network data from network data sources, process and cleanse the data to ensure data integrity and accuracy; the processed data includes connection relationships between nodes and node attribute information; Step 2: Index construction; By organizing and indexing large-scale data in a structured manner, an index tree is generated to improve the query efficiency and retrieval speed of data; various algorithms and data structures are used to organize data according to specific attributes and relationships to form a fast retrieval structure; Step 3: Community search; Using index tree and mapping set technology, the community structure in the network can be quickly and accurately searched; according to the user's query conditions, the community containing the specified node set can be found, supporting multi-node or single-node search requirements; Step 3: Index maintenance; For the dynamic changes of network data, namely the operations of adding nodes and edges and removing nodes and edges, corresponding algorithms are designed to maintain the community structure based on nested indexes.
2. The community search method based on k-truss nested index according to claim 1, characterized in that: The step 1 is specifically as follows: Step 1.1: Collect raw network data from online social platforms or other data sources, including posts, comments, and forwarding information; Step 1.2: Process and clean the collected raw data to extract the required information; Step 1.3: Encode the post content into an embedding vector; Step 1.4: Construct an undirected graph based on the association between posts, form a logical relationship between post nodes, and divide events such as the spread of false information into a propagation subgraph and a diffusion subgraph; Step 1.5: Use the community division method to obtain a community set with basic community characteristics.
3. The community search method based on k-truss nested index according to claim 1, characterized in that: The generation of the index tree in step 2 divides the network into multiple levels of community structures according to the characteristics of the network data and the definition of the k-truss community; at the same time, a mapping relationship between nodes and communities is established to link each node with the basic community to which it belongs and the k-truss community nested above it.
4. The community search method based on k-truss nested index according to claim 1, characterized in that: The step 3 is specifically as follows: Step 3.1: Find the corresponding basic community in the mapping set according to the query node set; Step 3.2: Based on these basic communities, search upward along the index tree to find the nearest common ancestor community that meets the parameter k requirement.
5. The community search method based on k-truss nested index according to claim 4, characterized in that: The LCA community contains the target communities of all query nodes.
6. The community search method based on k-truss nested index according to claim 1, characterized in that: In the node adding operation in step 4, the community associated with the newly added node is first found, and then the community may be merged or split according to the hierarchical relationship of these communities, and the edge support between the node and its neighboring nodes is updated; The edge addition operation finds the community corresponding to the new edge endpoint and merges or directly updates the edge support within the community; the node or edge removal operation removes the node or edge in the corresponding community and recalculates the k-truss characteristics of the community.
7. A community search system based on k-truss nested index according to any one of claims 1 to 6, characterized in that: It includes a data collection device, an index construction device, a community search device and an index maintenance device; The data collection device collects raw data from the network platform and processes it into the logical relationship of post nodes, providing preparation for the subsequent construction of a community search system based on k-truss nested index; The index construction device executes an index construction algorithm based on a k-truss nested structure according to the input original network, generates an index tree structure capable of supporting fast community search, proposes a relaxed index structure, and maintains a set of mapping relationships from nodes to communities for subsequent personalized community search; The community search device is based on a nested index and designs a community search algorithm using an index tree and a mapping set. By traversing the query nodes and searching for a k-truss community that meets the parameter k requirement upward along the index tree, a target community containing all query nodes is finally obtained. The index maintenance device processes the operations of adding and removing nodes and edges in dynamic network data through an algorithm to maintain the stability and effectiveness of the community structure based on the nested index.
8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer program product comprising a computer program / instructions, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Community searching method, model training method and related device
CN115357770A
Time sequence social network most intimate community searching method and system
CN117493700A
Community search service system to search community offering reliable contents through network and method thereof
KR100469900B1
Cited By
Data set construction method, device and equipment and readable storage medium
CN119578531A
Community search implementation method and device, medium and equipment
CN119884476A
Community search method for team identification in academic network
CN120804436A
