A relationship tree-based attribute community query method and system

By constructing a relation tree in the attribute information network and defining attribute scores, the community query results are optimized, solving the problem of insufficient attribute tightness in existing methods and achieving higher community cohesion and structural tightness.

CN118245637BActive Publication Date: 2026-04-10HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Filing Date
2024-04-02
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing attribute information network community query methods ignore the correlation between attributes, resulting in insufficient community attribute density and low community cohesion in query results, which fails to meet user needs.

Method used

A relation tree is constructed to describe the inclusion relationship between attributes, attribute scores are defined to describe the attribute cohesion between nodes, and query results are optimized through core decomposition and attribute score calculation to ensure the uniqueness of the community and attribute cohesion.

Benefits of technology

The system improves the attribute cohesion of community query results, reduces user input, makes query results more realistic, and significantly enhances community cohesion and structural tightness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118245637B_ABST
    Figure CN118245637B_ABST
Patent Text Reader

Abstract

The application discloses a kind of attribute community query method and system based on relationship tree, the method first obtains the data relationship of target field, constructs the attribute information network of target field in the mode of graph.Secondly, attribute information network is loaded through unified access interface, data processing, subgraph construction and algorithm operation and query are carried out on attribute information network.Then, the interface of attribute community query is provided to user, input community structure parameter k value and query target q, return a community containing query point q, satisfy structure cohesion and optimal attribute cohesion.Finally, the rendering and interaction of user interface, it presents the community query result returned by interface to user through graphical method, renders the query result as dynamic community network graph.The application does not need to give query attribute list, reduces user input, so that community query result is more in line with actual.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of information retrieval, and relates to attribute community query, in particular to an attribute community query method and system based on a relationship tree. BACKGROUND

[0002] In recent years, the rapid development of emerging technologies such as the Internet, big data, cloud computing, etc. not only promotes the rapid growth of data volume, but also makes the form and content of data more complex. As a common data organization form, graphs are often used to depict entities and complex relationships between entities in information networks, where entities are represented as nodes in the graph, and relationships are represented as edges between nodes. Traditional information networks often only focus on the relationship between nodes, ignoring the rich attribute information carried by the nodes, which greatly limits the ability and depth of network analysis. In this context, attribute information networks emerged as the times require. Attribute information networks not only consider the relationship between nodes, but also fully utilize and mine the attribute information of nodes, so as to more accurately describe and depict the complexity and diversity of information networks. Community is a tight subgraph structure that exists universally in information networks, reflecting the strong dependence relationship between nodes in information networks according to the universal interaction mechanism. How to effectively mine target communities that meet user needs from information networks is a key problem in the field of graph data mining.

[0003] In attribute information networks, community query refers to the process of identifying community structure in the network according to the attributes of nodes and the connection mode between nodes, given a query node and taking the attribute of the query node as the attribute input by default. This query uses attribute data to enhance community discovery to find node groups that are not only closely connected in the network but also similar or related in attribute characteristics. It is particularly suitable for network graphs that have descriptive metadata in addition to being connected by edges. In short, the purpose of community query is to find node sets that are cohesive in both attributes and structure.

[0004] For the network with complex attribute relations, the current community is mainly constrained by two dimensions of structure cohesion and attribute cohesion. Among them, the classic k-core and k-truss structure are mainly used to constrain the structure tightness to form a relatively tight subgraph community. For attribute tightness, the maximum number of shared attributes is currently used to describe the attribute tightness, and the subcommunity with the most common attributes that meets the structure tightness is selected to reveal the degree of common features between nodes. The above method calculates the maximum number of shared attributes based on the equal value matching of attributes, ignores the relevance of attributes itself, and leads to the problem of insufficient community attribute tightness. In the extreme case, if it is assumed that the attribute of the query node is related to but not the same as the attribute of all nodes in the information network, it will lead to an empty community. If it is assumed that the attribute of the query node is contained by all nodes in the entire network, the target community only needs to meet the structure tightness, which will lead to a too large target community. In summary, the existing method does not consider the meaning association between attributes when querying the community of attribute information network, which leads to low attribute cohesion of the resulting community, and an attribute information network community query method considering the meaning association between attributes is urgently needed. SUMMARY

[0005] In view of the deficiencies of the prior art, the present application provides an attribute community query method and system based on a relationship tree, which improves the original method, constructs a relationship tree to describe the inclusion relationship between attributes, and defines attribute scores to describe the attribute cohesion between nodes and subgraph attribute cohesion. At the same time, this attribute information network community query method also ensures the uniqueness and optimization of attribute cohesion of the query result community, which greatly improves the cohesion of the result community compared with the existing method.

[0006] An attribute community query method based on a relationship tree, specifically comprising the following steps:

[0007] S1, obtain the data relationship of the target field, and construct an attribute information network of the target field in the form of a graph. The nodes of the attribute information network represent entities in the target field, and the edges between the nodes represent the relationship between two entities. At the same time, a mapping relationship between the nodes of the attribute information network and the attribute list is constructed, each entity node corresponds to a series of attributes, indicating that the entity node has the attribute list. At the same time, according to all attributes of the target field, a relationship tree is constructed according to the real attribute relationship.

[0008] S2, load attribute information network through unified access interface, perform data processing, initial graph construction, subgraph construction and algorithm operation and query on the attribute information network. The algorithm flow is as follows: first, perform core decomposition on the attribute information network G: obtain the subgraph H' of the maximum k-core according to the given value k of the user, then obtain the attribute score of all nodes in the subgraph H' except the query node q according to the relationship tree and the score calculation formula; delete the node with the minimum score, at this time the number of points and edges in the subgraph is n and m, if m-n<2*(k^2-k)-1, the subgraph does not contain k-core, add the node with the minimum score and exit, otherwise, perform core decomposition again and continue to delete the node with the minimum score. Specifically, the following steps are included:

[0009] S2-1, perform core decomposition on the attribute information network G to obtain the subgraph H' of the maximum k-core, and the k-core is a community in which the degree of each node is greater than or equal to k. First, calculate the degree of each node in the attribute information network, that is, the number of edges connected to each node; second, remove all nodes in the attribute information network whose degree is less than the predetermined threshold k and the edges connected to them. This operation may cause the degree of some remaining nodes to decrease to less than k, and these nodes will also be removed later. This removal process is iterative and continues until there are no nodes with a degree less than k. After the iteration is terminated, the remaining network structure is the subgraph H' of the maximum k-core, which is characterized in that the degree of all remaining nodes is at least k, thereby forming a tightly connected community structure in which each node is connected to at least k other nodes.

[0010] S2-2, calculate the score of all nodes in the subgraph according to the attribute relationship. First, define the relationship tree T, which specifies the inclusion relationship between attributes. The meaning of the parent node attribute contains the meaning of the child node attribute. Through this relationship tree T, the pre-construction of the distance index between attributes can be performed, that is, the distance between any two attributes on the relationship tree is calculated. Through the score definition, the score between the node and the query node can be calculated, which is marked as the score of the node. Repeat the calculation of the score of all nodes in the subgraph. The specific steps are as follows:

[0011] S2-2-1, define the relationship tree and perform pre-construction of the distance index between attributes; traverse each attribute w and use the breadth-first search algorithm to mark the attributes reached at each hop until all attributes of the relationship tree are traversed; for the attribute w' reached at the hth hop, store the index <w, w'> as the distance h; process all attributes of the relationship tree in turn to obtain an attribute distance index.

[0012] S2-2-2, after obtaining the attribute distance index, traverse the entire subgraph node except the query node, and calculate the target node score according to the following formula. Where n1 is the number of query point attributes, a1, a2,..,an1 are the attribute values of the query point, n2 is the number of target node attributes, a1, a2,..,an2 are the attribute values of the target node, and d is the distance between the query point and the target node.n1 A is the attribute sequence of the query node, n2 is the number of target node attributes, b1, b2,.., bn2 are the attributes of the target node, B is the attribute sequence of the target node. n2 A is the attribute sequence of the query node, n2 is the number of target node attributes, b1, b2,.., bn2 are the attributes of the target node, B is the attribute sequence of the target node. i B is the attribute sequence of the target node; mindistance(a i B) is the minimum value among the distances between all attributes in the sequence a j B) is the minimum value among the distances between all attributes in the sequence b j B) is the minimum value among the distances between all attributes in the sequence b According to the following formula, the score of the target node can be obtained. It is easy to know that the score has normalization, and the greater the value, the higher the attribute correlation between the two nodes.

[0013] The score calculation formula is as follows:

[0014]

[0015] S2-3, after obtaining the scores of all nodes, mark the node with the lowest score, delete the node, at this time the number of points and edges in the subgraph is n, m, if m-n < 2*(k^2-k)-1, the subgraph does not contain k-core, add the node with the lowest score and exit, otherwise, re-perform core decomposition, continue to delete the node with the lowest score, continue to delete the node with the lowest score, until the subgraph no longer contains k-core, at this time return the community as the query result.

[0016] S3, provide an interface for attribute community query to the user, input the community structure parameter k value and the query target q, and return a community containing the query point q, which satisfies the structural cohesion and optimal attribute cohesion.

[0017] S4, rendering and interaction of the user interface, which presents the community query result returned by the interface to the user in a graphical way, and renders the query result into a dynamic community network graph.

[0018] An attribute community query system based on a relationship tree, comprising a data module, an algorithm module, an application module, and a display module.

[0019] The data module is responsible for obtaining the original data relationship of the target field, constructing the attribute information network and the relationship tree according to the demand, and obtaining the attribute list mapping relationship of the attribute information network node;

[0020] The algorithm module applies the relationship tree and the attribute score definition, and continuously deletes the node with the lowest score in the subgraph until the subgraph no longer contains k-core, to obtain the queried community;

[0021] The application module provides a user query interface, inputs a community structure parameter k value and a query target q, and returns a community containing the query point q through the algorithm module, the community satisfying the structure cohesion and the optimal attribute cohesion;

[0022] The display module is responsible for rendering the query result into a dynamic community network graph and displaying.

[0023] The application has the following beneficial effects:

[0024] The application introduces the concept of a relationship tree on the basis of traditional attribute community query, so that the relationship between attributes is not a binary relationship, but a complex containing relationship between attributes, the relationship between attributes is quantitatively described by the distance of attributes in the relationship tree, the real situation is fully considered, and the demand of a user for an optimal scheme is met. Meanwhile, the application also introduces the concept of attribute score, compared with the traditional maximum number of attributes, the attribute score has a good description of the common attributes between nodes, and the normalization of the attribute score also makes the attribute correlation between two nodes have a good explanation, that is, the closer the value is to 1, the higher the attribute correlation between the two is. Meanwhile, compared with the traditional attribute information network query which needs to give a query attribute list, the application does not need to give a query attribute list, reduces the user input, and makes the community query result more in line with the actual situation. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 A flow chart of an attribute community query algorithm based on a relationship tree for an embodiment;

[0026] Figure 2 A whole architecture diagram of an attribute community query method based on a relationship tree for an embodiment;

[0027] Figure 3 An attribute isomorphism network schematic diagram for an embodiment;

[0028] Figure 4 A relationship tree constructed according to attribute relationships for an embodiment;

[0029] Figure 5 An initial subgraph obtained through core decomposition for an embodiment;

[0030] Figure 6 A subgraph after deleting nodes with low attribute scores for an embodiment. DETAILED DESCRIPTION

[0031] The specific embodiments of the application will be described below with reference to the accompanying drawings:

[0032] The attribute community query method based on the relationship tree provided by the embodiment includes the following steps: Figure 1 and Figure 2 as shown in the whole architecture of the community query.

[0033] S1, obtain network relationship data of a target field, and construct a graph of a homogeneous network of the target field, as shown in Figure 3 . In the network, a node represents an entity in the target field, each entity corresponds to a list of attributes representing various attributes of the entity, and an edge between nodes represents a certain confirmed relationship between two entities. Meanwhile, according to all attributes of the target field, a relationship tree is constructed according to the real attribute inclusion relationship. In this embodiment, the nodes in the network represent users in a social network, and the edges between the nodes represent the association between the users, such as a friend relationship. The nodes in the network include a series of attributes a1a2...a5, which respectively represent that the users have a1a2...a5 interests in the social network, such as badminton, swimming, calligraphy, etc. For the relationship tree, each node represents a class of attributes, and all nodes of the entire relationship tree cover all attributes of the tree, and the attributes of the parent node include the attributes of the child node, for example, the ball class includes badminton, table tennis, basketball, etc. The distance between two attributes on the relationship tree also reflects the similarity between the attributes.

[0034] S2, load the above attribute network through a unified access interface, and perform data processing, subgraph construction, and algorithm operation and query on the attribute network. In this embodiment, the k-core constraint k=3, and the query node is "ball class". The algorithm flow is as shown in Figure 1 . First, the initial graph is core-decomposed, and a subgraph as shown in Figure 5 is obtained by using a given algorithm. The degree of all points in the subgraph is greater than or equal to 3. Then, an attribute distance index is constructed according to the relationship tree constructed by the data layer, and each attribute pair distance is obtained by using a breadth-first search algorithm and stored as a relationship mapping of the attribute pair and the distance value. If the relationship tree does not change, the attribute distance index mapping also does not change. For Figure 5 other nodes except the query node "ball class", the attribute score is calculated. The distance between the attribute pairs is obtained from the attribute distance index, and the score of the target node is calculated in both directions according to the attribute score formula. Then, the node with the minimum attribute score is deleted, and it is judged whether the current subgraph contains k-core according to the number of points and edges after the deletion. If not, the deletion point is directly exited, otherwise, a new subgraph is obtained by core-decomposing, and the point with the minimum attribute score is repeatedly deleted. Specifically, the following steps are included:

[0035] S2-1, first, the initial graph is core-decomposed, and the nodes with a degree less than 3 are iteratively deleted. First, nodes E, J, I, and G are deleted, and the adjacent edges of these nodes are also deleted. Then, since node H has a degree less than 3, node H is deleted, and a subgraph H' of the initial maximum k-core as shown in Figure 5 is obtained. The k-core is a community in which the degrees of all nodes are greater than or equal to k.

[0036] S2-2, according to the relationship tree constructed by the data layer, the attribute distance index is constructed. Wherein, the parent-child relationship of the nodes of the relationship tree has actual meaning. According to Figure 4 , the parent node "entertainment" contains "sports" and "art", that is, "sports" and "art" belong to the "entertainment" category. According to the attribute distance index and the attribute score definition, the attribute score of the node other than the query node in the attribute information network is solved, wherein the attribute score definition is a bidirectional asymmetric structure, which needs to be calculated from two dimensions of the query node and the target node. The final attribute score takes the value of normalization, representing the attribute relevance between the target node and the query node, and the smallest attribute score represents the overall relevance of the subgraph. Then continuously iterate to delete the node with the smallest score to maintain the overall subgraph score getting larger and larger, and the attribute relevance of the subgraph is higher. The specific steps are as follows:

[0037] S2-2-1, according to the relationship tree, the attribute distance index is constructed, that is, the distance between all attribute pairs is solved. For the attribute "badminton", using the breadth-first search algorithm, the first jump is "ball", so the distance between the attribute pair <badminton, ball> is 1; The second jump is "sports" and "table tennis", so store the attribute pairs <badminton, sports> and <badminton, table tennis> as 2, and so on until all attribute nodes of the relationship tree are traversed. Then use the BFS algorithm with "table tennis" as the starting point, repeat the above process, and so on to solve all attribute pairs. According to the above attribute pairs, the attribute distance index mapping is obtained, the relationship tree is unchanged, and the mapping is unchanged. Subsequent solution about the distance between attributes only needs to take out the index.

[0038] S2-2-2, according to the attribute distance index, the nodes other than the query point "ball" are calculated. For the target node "water sports", the attribute score definition is calculated. Traverse the attribute list of the query node {badminton, literature, music}, for the attribute "badminton", traverse the attribute list of the target node {table tennis, novel, classical music}, take out <badminton, table tennis>, <badminton, novel>, <badminton, classical music> in the attribute distance index to get the minimum distance as 2; for the attribute "literature", traverse the attribute list of the target node {table tennis, novel, classical music}, take out <literature, table tennis>, <literature, novel>, <literature, classical music> in the attribute distance index to get the minimum distance as 1; for the attribute "music", traverse the attribute list of the target node {table tennis, novel, classical music}, take out <music, table tennis>, <music, novel>, <music, classical music> in the attribute distance index to get the minimum distance as 1. For the attribute list of the target node {table tennis, novel, classical music}, for the attribute "table tennis", traverse the attribute list of the query node {badminton, literature, music}, take out <table tennis, badminton>, <table tennis, literature>, <table tennis, music> in the attribute distance index to get the minimum distance as 2; for the attribute "novel", traverse the attribute list of the query node {badminton, literature, music}, take out <novel, badminton>, <novel, literature>, <novel, music> in the attribute distance index to get the minimum distance as 1; for the attribute "classical music", traverse the attribute list of the query node {badminton, literature, music}, take out <classical music, badminton>, <classical music, literature>, <classical music, music> in the attribute distance index to get the minimum distance as 1. According to the following attribute score formula, the score is calculated as 0.87. Similarly, the attribute scores of nodes C, D, F are calculated as 0.843, 0.859, 0.897 respectively.

[0039]

[0040] S2-3, after obtaining the attribute scores of all nodes, delete the node with the minimum score "literature". After deletion, the number of nodes n is 4 and the number of edges m is 5. According to the judgment m-n<2*(k^2-k)-1, it is determined that the subgraph does not contain k-core. After adding the node "literature", exit and return the query result as Figure 6 .

[0041] S3, provide an interface for community query to users, call the above community query algorithm to complete the following functions: input the community structure parameter k value as 3 and the query target "ball", return a community containing the query point "ball" which meets the structural cohesion and optimal attribute cohesion through the algorithm layer, and realize k-core community query through the algorithm layer.

[0042] S4, rendering and interaction of the user interface, which presents the community query result returned by the interface to the user in a graphical way, and renders the query result into a dynamic community network graph. To achieve this function, the React framework is combined with D3.js and Ant Design component library to realize the visualization of community network relationship. The user inputs the community structure parameter k value and the query target q in the front-end interface, and sends GET or POST request to the application layer by using Fetch API or Axios HTTP client library. After the application layer receives the request, it executes the corresponding query logic and returns the result to the display layer. After the display layer receives the query result, it uses the componentized development idea of React, combined with the powerful data visualization capability of D3.js, to render the result into a dynamic community network graph.

[0043] A property community query system based on a relationship tree, comprising a data module, an algorithm module, an application module, and a display module.

[0044] The data module is responsible for obtaining the original data relationship of the target field, constructing the attribute information network and the relationship tree according to the requirements, and obtaining the attribute list mapping relationship of the attribute information network node;

[0045] The algorithm module applies the relationship tree and attribute score definition, and continuously deletes the node with the lowest subgraph score until the subgraph no longer contains k-core, to obtain the queried community;

[0046] The application module provides a user query interface, inputs the community structure parameter k value and the query target q, and returns a community containing the query point q through the algorithm module, which satisfies the structural cohesion and optimal attribute cohesion;

[0047] The display module is responsible for rendering the query result into a dynamic community network graph and displaying.

[0048] It should be emphasized that the foregoing description is only a detailed explanation of the preferred embodiments of the present application and the operation principle thereof. However, for those skilled in the art with ordinary knowledge in this technical field, according to the core concept disclosed by the present application, various modifications and changes can be made in different specific implementation processes. These adjustments and changes based on the core principle of the present application should be understood as falling within the scope of protection claimed by the present application, i.e. these changes and adjustments should be regarded as part of the patent protection of the present application.

Claims

1. A method for attribute community query based on relationship tree, characterized in that, Comprise the following steps: S1, obtain the data relationship of the target field, and construct the attribute information network of the target field in the form of a graph; S2, load the attribute information network through a unified access interface, and perform data processing, subgraph construction, and algorithm operation and query on the attribute information network, and the specific process is as follows: S2-1, core decomposition is performed on the attribute information network G to obtain a subgraph of maximum k-core , the k-core is a community in which the degree of each node is greater than or equal to k: first, the degree of each node in the attribute information network is calculated, i.e., the number of edges connected to each node; second, all nodes in the attribute information network whose degree is less than a predetermined threshold k and the edges connected to the nodes are removed; the process is continued until there is no node whose degree is less than k, and the remaining network structure is a subgraph of maximum k-core ; S2-2, calculate the scores of all nodes in the subgraph according to the attribute relationship; first, define a relationship tree T, which defines the containing relationship between attributes, the parent node attribute meaning contains the attribute meaning of the child node, and the distance index between attributes is pre-constructed through the relationship tree T, that is, the distance between any two attributes on the relationship tree is calculated; the score between the node and the query node is calculated through the score definition, which is marked as the score of the node, and the scores of all nodes in the subgraph are repeatedly calculated, and the specific implementation is as follows: S2-2-1, define a relationship tree, and pre-construct a distance index between attributes; traverse each attribute w, and use a breadth-first search algorithm to mark the attributes reached in each hop until all attributes of the relationship tree are traversed; for the attribute w' reached in the hth hop, store the index <w, w'> as the distance h; all attributes of the relationship tree are processed in turn to obtain an attribute distance index; S2-2-2, after obtaining the attribute distance index, traverse all nodes of the subgraph except the query node, and calculate the target node score, the greater the value, the higher the attribute correlation between the two nodes; the score calculation formula is as follows: ; wherein is the number of attributes of the query point, , is the sequence of attributes of the query node, is the number of attributes of the target node, is the attribute of the target node, is the sequence of attributes of the target node; is the attribute and the minimum of the distances between all attributes of the sequence, is the attribute and the minimum of the distances between all attributes of the sequence. S2-3, after getting all the node scores, mark the node with the lowest score, delete the node, at this time the number of nodes and edges in the subgraph is n, m, if then the subgraph does not contain k-core, add the node with the lowest score and exit, otherwise, re-perform core decomposition, continue to delete the node with the lowest score until the subgraph no longer contains k-core, at this time return the community as the query result; S3, provide an attribute community query interface to the user, input the community structure parameter k value and the query target q, and return a community containing the query point q, which satisfies the structural cohesion and optimal attribute cohesion; S4, rendering and interaction of the user interface, rendering the community query result returned by the interface into a dynamic community network graph and presenting it to the user.

2. The method of claim 1, wherein, The nodes of the attribute information network in S1 represent entities in the target field, and the edges between the nodes represent the relationship between the two entities. 3.The relationship tree based attribute community query method of claim 2, wherein, S1 further comprises constructing a mapping relationship between the nodes of the attribute information network and the attribute list, each entity node corresponds to a series of attributes, indicating that the entity node has the attribute list; at the same time, according to all attributes of the target field, a relationship tree is constructed according to the actual attribute relationship.

4. A system for attribute community query based on relationship tree, for implementing the attribute community query method of any one of claims 1 to 3, characterized in that, Comprise data module, algorithm module, application module and display module; The data module is responsible for obtaining the original data relationship of the target field, constructing the attribute information network and the relationship tree, and obtaining the attribute list mapping relationship of the attribute information network node; The algorithm module applies the relationship tree and the attribute score definition, and continuously deletes the node with the lowest score in the subgraph until the subgraph no longer contains k-core, to obtain the queried community; The application module provides a user query interface, inputs the community structure parameter k value and the query target q, and returns a community containing the query point q through the algorithm module, which satisfies the structural cohesion and optimal attribute cohesion; The display module is responsible for rendering the query result into a dynamic community network graph and displaying it.

Citation Information

Patent Citations

  • Bipartite graph-based community search method and apparatus, and processing device

    CN114547476A

  • Retrieval supporting system common in communities

    JP2009134639A