Sub-hypergraph inclusion query method

Through the hypergraph mapping and the method of level-include index, the expansion problem in sub-hypergraph containing queries is solved, and an efficient sub-hypergraph containing queries is achieved.

CN120011600AInactive Publication Date: 2025-05-16NORTHEASTERN UNIV CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510084140.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-16
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has an inflated problem in sub-hypergraph inclusion queries, resulting in a significant increase in computing overhead and is unable to effectively meet the growing data demand.

Method used

The hypergraph losslessly maps the hypergraph to the traditional graph through the hypergraph map and creates a level inclusion index for each vertex. These indexes are used to quickly perform sub-hypergraph inclusion queries.

Benefits of technology

It effectively avoids the problem of binary graph expansion, significantly shortens the time for sub-super graphs to include queries, and improves query efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011600A_ABST
    Figure CN120011600A_ABST
Patent Text Reader

Abstract

The invention provides a sub-hypergraph inclusion query method, which belongs to the technical field of data processing, and comprises the following steps: obtaining a to-be-queried hypergraph and a database hypergraph; converting the hypergraph to be queried into a hypergraph mapping graph to be queried; adopting a sub-hypergraph containing query algorithm to query whether the level containing index contains a sub-hypergraph corresponding to the to-be-queried hypergraph mapping graph or not, and taking the sub-hypergraph corresponding to the to-be-queried hypergraph mapping graph as a query result; wherein the level comprises an index, and the construction process comprises the steps of converting the database hypergraph into a database hypergraph mapping graph, and constructing the level containing index with a tree structure according to each vertex of the database hypergraph mapping graph. According to the method, the problem that the hypergraph is mapped into the graph without causing expansion of a bipartite graph and the like is solved, the data hypergraph does not need to be traversed during query, and the matching time is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data processing, and in particular relates to a sub-hypergraph inclusion query method. Background Art

[0002] Graphs are widely used in fields such as chemistry, biology, and sociology because they can represent complex relationships between various objects. In recent years, with the development of big data and data mining technology, the size of data has grown at an unprecedented rate, and the relationships between objects have become increasingly complex. Therefore, traditional graphs can no longer meet the growing demand. Hypergraphs are a generalization of graphs. Unlike traditional graphs where each edge connects two vertices, hyperedges in hypergraphs can connect any number of vertices. Therefore, hypergraphs can effectively describe complex relationships between entities and higher-order information.

[0003] Sub-hypergraph queries, such as sub-hypergraph matching queries, sub-hypergraph inclusion queries, and sub-hypergraph inclusion relationship queries, are to find all sub-hypergraphs that meet the requirements in the data hypergraph H based on the query hypergraph q. Sub-hypergraph queries have been widely used in the following practical scenarios:

[0004] (1) Biological network mining: Finding protein complexes with specific functions is an important research direction in bioinformatics. Biologists can use hypergraph queries to understand the relationships and interactions between proteins. Similarly, hypergraphs can also be applied to gene regulatory networks and disease-related research.

[0005] (2) Querying objects in images: Querying for specific objects in images is a core problem in pattern recognition and computer vision. Hypergraphs can accurately model the spatial context of images. Sub-hypergraph queries can reduce the huge computational overhead caused by calculating pixel similarity.

[0006] Sub-hypergraph inclusion query is an extension of sub-hypergraph matching query. In sub-hypergraph matching query, the types and number of vertices contained in the corresponding hyperedges in the matching sub-hypergraph and the query hypergraph q are the same, and this feature can be called the integrity of hyperedge semantics. At the same time, the number and type of overlapping vertices between hyperedges in the matching sub-hypergraph are the same as the number and type of overlapping vertices between corresponding hyperedges in the query hypergraph, and this feature can be called the integrity of hyperedge structure.

[0007] The most direct approach to sub-hypergraph matching queries is to convert the query hypergraph q and the data hypergraph H into bipartite graphs. The upper vertices of the bipartite graph represent hyperedges in the hypergraph, the lower vertices represent vertices in the hypergraph, and the edges in the bipartite graph represent the inclusion relationship between hyperedges and vertices. After converting the query hypergraph and the data hypergraph into bipartite graphs, existing sub-graph matching algorithms can be used directly to perform sub-hypergraph matching. However, although bipartite graphs can preserve hypergraph information without losing it, they significantly increase the size of the graph. For example, a hypergraph with 500 vertices and 100 hyperedges will generate a bipartite graph with 600 vertices and tens of thousands of edges. The sub-graph matching problem has been proven to be NP-hard, so this expansion will result in significant additional computational overhead.

[0008] An example of sub-hypergraph inclusion is searching for articles with at least two co-authors in an author-article hypergraph database. Similar to sub-hypergraph matching queries, sub-hypergraph inclusion queries must also satisfy the completeness of hyperedge semantics. Unlike sub-hypergraph matching queries, the number and type of overlapping vertices between hyperedges in the matching sub-hypergraph must be greater than or equal to the number and type of overlapping vertices between corresponding hyperedges in the query hypergraph. This feature is an extension of the structural completeness of hyperedges. There is currently a lack of public reports on related research. Summary of the invention

[0009] In response to the shortcomings of the prior art, the present application proposes a sub-hypergraph inclusion query method, which losslessly maps a hypergraph to a traditional graph through a hypergraph mapping graph without causing expansion, and establishes a level inclusion index for each vertex of the hypergraph mapping graph. Finally, the sub-hypergraph inclusion query is quickly performed through the level inclusion index and the hypergraph mapping graph.

[0010] In a first aspect, the present application proposes a sub-hypergraph inclusion query method, comprising:

[0011] Obtain the hypergraph to be queried and the database hypergraph;

[0012] Converting the hypergraph to be queried into a hypergraph mapping graph to be queried;

[0013] A sub-hypergraph inclusion query algorithm is used to query whether the level inclusion index contains the sub-hypergraph corresponding to the hypergraph mapping graph to be queried, and the sub-hypergraph corresponding to the hypergraph mapping graph to be queried is used as the query result; wherein, the level inclusion index is constructed by: converting the database hypergraph into a database hypergraph mapping graph, and constructing a level inclusion index with a tree structure according to each vertex of the database hypergraph mapping graph.

[0014] The step of converting the hypergraph to be queried into a hypergraph mapping graph to be queried includes:

[0015] Convert each hyperedge of the hypergraph to be queried into a vertex in the hypergraph mapping graph to be queried, and the signature of each hyperedge of the hypergraph to be queried is equal to the signature of the corresponding vertex in the hypergraph mapping graph to be queried;

[0016] If there are two hyperedges in the hypergraph to be queried that correspond to two vertices in the hypergraph mapping graph to be queried, and the two vertices overlap, then there is a connecting edge between the two vertices in the hypergraph mapping graph to be queried, and the label of the connecting edge is composed of the signatures of the two hyperedges of the hypergraph to be queried, and the labels of the connecting edge are arranged according to the vertex encoding order of the hypergraph mapping graph.

[0017] The sub-hypergraph inclusion query algorithm satisfies the following three rules, and the hypergraph to be queried is said to be a sub-hypergraph inclusion of the database hypergraph, including:

[0018] Vertex label consistency rule: The signature of each vertex in the hypergraph map to be queried is consistent with the corresponding vertex in the level inclusion index;

[0019] Connection edge mapping rule: Each connection edge in the hypergraph mapping graph to be queried can find an edge with the same vertex set in the level inclusion index;

[0020] Intersection relationship rule: The vertex intersection of two connecting edges in the hypergraph mapping graph to be queried is contained in the vertex intersection corresponding to the two connecting edges in the level inclusion index.

[0021] The step of converting the database hypergraph into a database hypergraph mapping graph comprises:

[0022] Convert each hyperedge of the database hypergraph to a vertex in the database hypergraph mapping graph, and the signature of each hyperedge of the database hypergraph is equal to the label of the corresponding vertex in the database hypergraph mapping graph;

[0023] If there are two hyperedges in the database hypergraph that correspond to two vertices in the database hypergraph mapping graph, and the two vertices overlap, then there is a connecting edge between the two vertices in the database hypergraph mapping graph, and the label of the connecting edge is composed of the signatures of the two hyperedges of the database hypergraph, and the labels of the connecting edge are arranged in the vertex encoding order of the hypergraph mapping graph.

[0024] The level inclusion index is used to save nodes, adjacent nodes, edges between nodes, node labels, and edge labels. There are multiple nodes, and the top layer of the tree structure is the root node. There is no overlap or inclusion relationship between the node labels of the lowest layer of the tree structure. The labels of the upper-layer edges include the labels of the adjacent lower-layer edges. If the labels of two edges are the same, then the two edges will be stored under the same node in the level inclusion index.

[0025] The method of constructing a level-inclusive index having a tree structure according to each vertex of the database hypergraph mapping graph includes:

[0026] Step S100: Find a vertex in the hypergraph map connected to the root node, and if the label of the edge of the vertex is not included in other edge labels, insert the vertex into a level inclusion index with a tree structure;

[0027] Step S101: Find a vertex in a hypergraph mapping graph connected to the root node or a node inserted into a level inclusion index, and if the label of the edge of the vertex is not included in other edge labels, insert the vertex into a level inclusion index having a tree structure, and the insertion position is below the node inserted into the level inclusion index, and the label of the node inserted into the level inclusion index will include the label of the edge of the node inserted into the level inclusion index;

[0028] Step S102: Repeat step S101 until all vertices of the hypergraph map are inserted into the level inclusion index having a tree structure.

[0029] In a second aspect, the present application proposes an electronic device, comprising: one or more processors, and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the sub-hypergraph inclusion query method.

[0030] In a third aspect, the present application proposes a computer-readable storage medium storing executable instructions, which, when executed, enable a processor to execute the sub-hypergraph inclusion query method.

[0031] In a fourth aspect, the present application proposes a computer program product, including a computer program or instructions, which implement the sub-hypergraph inclusion query method when executed by a processor.

[0032] Beneficial effects:

[0033] This application proposes a sub-hypergraph inclusion query method. (1) A structure for mapping a hypergraph to a graph is proposed, called a hypergraph mapping graph, which solves the problem of mapping a hypergraph to a graph without causing expansion of a bipartite graph. (2) A level inclusion index is established. During the sub-hypergraph matching process, the index can be directly queried without traversing the data hypergraph, which greatly shortens the matching time. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A sub-hypergraph of an embodiment of the present application includes a query method flow chart;

[0035] Figure 2Schematic diagram of a hypergraph to be queried and a database hypergraph in an embodiment of the present application; wherein (a) is a hypergraph to be queried, and (b) is a database hypergraph;

[0036] Figure 3 Schematic diagram of a hypergraph mapping diagram in an embodiment of the present application; wherein (a) a hypergraph mapping diagram to be queried, and (b) a database hypergraph mapping diagram;

[0037] Figure 4 The level of the embodiment of the present application includes an index diagram; wherein (a) e Hm0 Neighborhood structure of vertex e Hm0 The level contains the index. DETAILED DESCRIPTION

[0038] The specific implementation of the present application is further described in detail below in conjunction with the drawings and examples.

[0039] Embodiment 1:

[0040] This embodiment proposes a sub-hypergraph inclusion query method, such as Figure 1 As shown, including:

[0041] Step S1: Obtain the hypergraph to be queried and the database hypergraph;

[0042] In this embodiment, Figure 2 As shown, Figure 2 (a) is the hypergraph to be queried, Figure 2 (b) is the database hypergraph. The hypergraph to be queried needs to be searched in the database hypergraph to find the corresponding sub-hypergraph.

[0043] Step S2: converting the hypergraph to be queried into a hypergraph mapping graph to be queried;

[0044] In this embodiment, the hypergraph to be queried is converted into a hypergraph mapping graph to be queried, such as Figure 3 As shown in (a), the database hypergraph is also converted into a database hypergraph mapping graph, such as Figure 3 As shown in (b), the conversion methods of the two are consistent. Among them, the hypergraph mapping diagram is a method of mapping a hypergraph to a traditional graph. In this hypergraph mapping diagram, each hyperedge in the hypergraph (including: the hypergraph to be queried and the database hypergraph) will correspond to a vertex in the hypergraph mapping diagram, and the label of the vertex represents the signature of the hyperedge. The signature usually contains some characteristics or information about the hyperedge. Among them, each hyperedge of the hypergraph is converted into a vertex in the hypergraph mapping diagram to be queried, and the signature of each hyperedge of the hypergraph is equivalent to the signature of the corresponding vertex in the hypergraph mapping diagram, wherein the hyperedge signature is a set of ordered vertex labels contained in the hyperedge, such as e in the hypergraph to be queried. q0 Super edge signature, S(e q0)={A,A,B}, arranged in the encoding order of vertices u0 u1 u2. The hyperedge signature of the hypergraph to be queried is equivalent to the vertex label corresponding to the mapping graph.

[0045] If two hyperedges in a hypergraph (including the query hypergraph and the database hypergraph) have overlapping vertices, then in the hypergraph mapping, there will be a connecting edge between the vertices corresponding to the two hyperedges. The label of this connecting edge will be composed of the labels of the overlapping vertices of the two hyperedges, and these labels are arranged in the order of the vertex encoding of the hypergraph mapping.

[0046] The vertex labels in the hypergraph mapping graph are the hyperedge features of the hyperedges in the hypergraph, that is, the hyperedge signature S. The edge labels in the hypergraph mapping graph are the ordered labels of the overlapping vertices of the hyperedges in the hypergraph. For example: q0 Super edge signature S(e q0 )={A,A,B} contains u0u1 u2,e q1 Super edge signature S(e q1 )={A,A,B,C} contains u0 u1 u3 u4, and the vertex that overlaps the two is u0 u1, then e q0 and e q1 The edge label of this connecting edge is {A,A}.

[0047] By matching vertex labels in the hypergraph map, the semantic integrity of hyperedges can be ensured. By matching edge labels, the structural integrity of hyperedges can be ensured. That is, matching vertex labels ensures the types and relationships between hyperedges, while matching edge labels ensures that the structural overlap of these hyperedges is preserved.

[0048] Step S3: Use the sub-hypergraph inclusion query algorithm to query whether the level inclusion index contains the sub-hypergraph corresponding to the hypergraph mapping graph to be queried, and take the sub-hypergraph corresponding to the hypergraph mapping graph to be queried as the query result; wherein, the level inclusion index is constructed in the following process: converting the database hypergraph into a database hypergraph mapping graph, and constructing a level inclusion index with a tree structure according to each vertex of the database hypergraph mapping graph.

[0049] In this embodiment, given a hypergraph mapping graph q to be queried and a database hypergraph mapping graph H, if there is a mapping f that maps vertices in the hypergraph mapping graph to be queried to vertices in the database hypergraph mapping graph and satisfies the following three rules, then the query hypergraph q is said to be a sub-hypergraph inclusion of the data hypergraph H. The three rules include:

[0050] (1) Vertex label consistency rule: The signature of each vertex in the hypergraph map to be queried is consistent with the corresponding vertex in the level inclusion index;

[0051] In this embodiment, for each vertex in the hypergraph to be queried, the vertex label in the hypergraph to be queried is the same as the label of the corresponding vertex in the data hypergraph. This means that each vertex in the hypergraph to be queried has a corresponding vertex with the same attributes or labels in the database hypergraph. Since the hypergraph to be queried and the database hypergraph are both converted into corresponding hypergraph maps, if the signatures of the corresponding vertices in the level inclusion index for each vertex in the queried hypergraph map are consistent, then the vertex label consistency rule is satisfied.

[0052] (2) Edge mapping rule: Each edge in the hypergraph mapping graph to be queried can find an edge with the same vertex set in the level inclusion index;

[0053] In this embodiment, for each hyperedge in the hypergraph to be queried, the vertices contained in the hyperedge in the hypergraph to be queried can be mapped to the corresponding vertices in the database hypergraph through the mapping f, and these vertices constitute a hyperedge in the database hypergraph. This means that for each hyperedge in the hypergraph to be queried, a hyperedge with the same set of vertices in the database hypergraph can be found. Since the hypergraph to be queried and the database hypergraph are converted into corresponding hypergraph mapping graphs, if each connection edge in the hypergraph mapping graph to be queried can find an edge with the same set of vertices in the level inclusion index, it is said that the connection edge mapping rule is satisfied.

[0054] (3) Intersection relationship rule: The vertex intersection of two connecting edges in the hypergraph mapping diagram to be queried is contained in the vertex intersection corresponding to the two connecting edges in the level inclusion index.

[0055] In this embodiment, for any two hyperedges in the hypergraph to be queried, if the two hyperedges have overlapping vertices (i.e., have common vertices), then the hyperedges mapped in the database hypergraph should also satisfy a similar intersection relationship. Specifically, the vertex intersection of the two hyperedges in the hypergraph to be queried should be included in the vertex intersection of the two hyperedges in the database hypergraph.

[0056] Subgraph inclusion query is to find all subgraphs in the database hypergraph that satisfy the inclusion relationship with the hypergraph to be queried.

[0057] Since the hypergraph to be queried and the database hypergraph are both converted into corresponding hypergraph mappings, if the vertex intersection of two connecting edges in the hypergraph mapping to be queried is contained in the vertex intersection corresponding to the two connecting edges in the level inclusion index, the intersection relationship rule is said to be satisfied.

[0058] The level inclusion index is used to save nodes, adjacent nodes, edges between nodes, node labels, and edge labels. There are multiple nodes, and the top layer of the tree structure is the root node. There is no overlap or inclusion relationship between the node labels of the lowest layer of the tree structure. The labels of the upper-layer edges include the labels of the adjacent lower-layer edges. If the labels of two edges are the same, then the two edges will be stored under the same node in the level inclusion index.

[0059] In this embodiment, a method called Level-Include Index (LII) is proposed to create an index for each vertex in the hypergraph map. LII is a tree structure used to store nodes, node adjacency information, and edge information. The parent node label of each layer in the LII index contains the node label of the layer. For example, Figure 4 As shown, Figure 4 (a) is e Hm0 The neighborhood structure of Figure 4 (b) is vertex e Hm0 The level contains the index. The first level of the level containing the index of each vertex contains the node labels that are not included in other labels. The node labels of other levels will be included in the labels of its upper parent nodes.

[0060] In the LII index, the vertices in the hypergraph map are called nodes after being inserted into the index, and the edge labels between vertices are called node labels. If two edge labels of a vertex are the same, then these edges will be stored under the same node in the LII index.

[0061] The method of constructing a level-inclusive index having a tree structure according to each vertex of the database hypergraph mapping graph includes:

[0062] Step S100: Find a vertex in the hypergraph map connected to the root node, and if the label of the edge of the vertex is not included in other edge labels, insert the vertex into a level inclusion index with a tree structure;

[0063] In this embodiment, the root node is determined according to conventional rules. After the hyperedges are labeled, they are generally numbered starting from the upper left corner, which is the root node, and then numbered from the root node to the right. The vertices in the hypergraph map connected to the root node are found, and the edge labels of these vertices are not included by other edge labels, and then these vertices are inserted into the level inclusion index with a tree structure.

[0064] Step S101: Find a vertex in a hypergraph mapping graph connected to the root node or a node inserted into a level inclusion index, and if the label of the edge of the vertex is not included in other edge labels, insert the vertex into a level inclusion index having a tree structure, and the insertion position is below the node inserted into the level inclusion index, and the label of the node inserted into the level inclusion index will include the label of the edge of the node inserted into the level inclusion index;

[0065] In this embodiment, the remaining vertices connected to the root node are found, whose edge labels are not included in other edge labels, and they are inserted into the tree. The insertion position is below the already inserted nodes, and these node labels will include their edge labels.

[0066] Step S102: Repeat step S101 until all vertices of the hypergraph map are inserted into the level inclusion index having a tree structure.

[0067] In this embodiment, through steps S100 to S101, the LII index creates a hierarchical index structure for each vertex, which helps to efficiently find and match query vertices in the hypergraph.

[0068] In this embodiment, a recursive method is used to perform a sub-hypergraph inclusion query through a hypergraph mapping graph and a level inclusion index (LII). The process of the sub-hypergraph inclusion query algorithm is as follows:

[0069] First, select the initial query vertex u0 in the hypergraph to be queried, and select a data vertex v from the possible matching vertex set C(u0) i Among them, the possible matching vertex set is the one whose edge label of the query hypergraph is less than or equal to the edge label of the database hypergraph. All vertices that meet this condition are regarded as the possible matching vertex set. At this time, the current query result is a set M containing the vertices of the query hypergraph and the vertices of the database hypergraph. The final query result is found by continuously expanding this set.

[0070] If the selected u0 is the correct match and a valid match can be found later, a valid query result is returned. If the currently selected match is unsuccessful, it will backtrack and try the next possible matching vertex until a valid query result is found. Among them, a correct match that satisfies the three rules in the sub-hypergraph inclusion query algorithm is called a correct match.

[0071] During the query process, the level-inclusion index query performs a breadth-first search to find nodes containing a specific label. In particular, during the breadth-first search process, if a node does not contain the required label, its child nodes are unlikely to contain the label, so there is no need to query these child nodes further.

[0072] Finding inclusion is a process for finding a candidate matching set for the next query vertex based on the current partial query result and the level inclusion index of the next query vertex. Specifically, finding inclusion obtains a possible matching set for the next query vertex from the current query result.

[0073] Ultimately, through this recursive approach, the algorithm will continue to expand the query results until it finds a match that satisfies the sub-hypergraph inclusion condition or backtracks and tries a different match until the search is complete.

[0074] A sub-hypergraph included in the query method proposed in this embodiment reduces the scale of the traditional method of converting a hypergraph into a normal graph. The number of vertices and edges of the bipartite graph formed by the ordinary method will increase significantly, thereby increasing the complexity of storage and calculation, because the bipartite graph needs to simultaneously represent the vertices and hyperedges in the hypergraph, as well as the relationship between them. The method proposed in this embodiment is to convert hyperedges into vertices and overlapping hypergraph vertices into edges, which can reduce the scale of the final mapping graph. The vertices and edges generated by the method of this embodiment will be less than those generated by the ordinary method.

[0075] Embodiment 2:

[0076] This embodiment proposes an electronic device, including: one or more processors, and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the one or more processors, the one or more processors execute the sub-hypergraph inclusion query method.

[0077] The electronic device may be a mobile phone, a computer or a tablet computer, etc., including a memory and a processor, wherein a computer program is stored on the memory, and when the computer program is executed by the processor, a sub-hypergraph inclusion query method as described in the embodiment is implemented. It can be understood that the electronic device may also include an input / output (I / O) interface and a communication component.

[0078] The processor is used to execute all or part of the steps in the sub-hypergraph query method described in the above embodiment. The memory is used to store various types of data, which may include instructions of any application or method in the electronic device, as well as data related to the application.

[0079] The processor can be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components, and is used to execute a sub-hypergraph inclusion query method described in the above embodiment.

[0080] Embodiment 3:

[0081] This embodiment provides a computer-readable storage medium storing executable instructions. When the instructions are executed and implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0082] The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of a sub-hypergraph inclusion query method described in various embodiments of the present application.

[0083] The aforementioned storage media include: flash memory, hard disk, multimedia card, card-type memory (for example, SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR abbreviation, memory data register) memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, CD, server, APP (Application, abbreviation of application software) application store and other media that can store program verification codes, on which computer programs are stored. When the computer program is executed by the processor, it can implement the various steps of the above-mentioned sub-hypergraph inclusion query method.

[0084] Embodiment 4:

[0085] This embodiment provides a computer program product, including a computer program or instructions, which implement the sub-hypergraph inclusion query method when executed by a processor.

[0086] Based on such understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a computer program product.

[0087] The various embodiments in the present application are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0088] The protection scope of the present application is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.

Claims

1. A sub-hypergraph inclusion query method, characterized in that: include: Obtain the hypergraph to be queried and the database hypergraph; Converting the hypergraph to be queried into a hypergraph mapping graph to be queried; A sub-hypergraph inclusion query algorithm is used to query whether the level inclusion index contains the sub-hypergraph corresponding to the hypergraph mapping graph to be queried, and the sub-hypergraph corresponding to the hypergraph mapping graph to be queried is used as the query result; wherein, the level inclusion index is constructed by: converting the database hypergraph into a database hypergraph mapping graph, and constructing a level inclusion index with a tree structure according to each vertex of the database hypergraph mapping graph.

2. A sub-hypergraph inclusion query method according to claim 1, characterized in that: The step of converting the hypergraph to be queried into a hypergraph mapping graph to be queried includes: Convert each hyperedge of the hypergraph to be queried into a vertex in the hypergraph mapping graph to be queried, and the signature of each hyperedge of the hypergraph to be queried is equal to the signature of the corresponding vertex in the hypergraph mapping graph to be queried; If there are two hyperedges in the hypergraph to be queried that correspond to two vertices in the hypergraph mapping graph to be queried, and the two vertices overlap, then there is a connecting edge between the two vertices in the hypergraph mapping graph to be queried, and the label of the connecting edge is composed of the signatures of the two hyperedges of the hypergraph to be queried, and the labels of the connecting edge are arranged according to the vertex encoding order of the hypergraph mapping graph.

3. A sub-hypergraph inclusion query method according to claim 1, characterized in that: The sub-hypergraph inclusion query algorithm satisfies the following three rules, and the hypergraph to be queried is said to be a sub-hypergraph inclusion of the database hypergraph, including: Vertex label consistency rule: The signature of each vertex in the hypergraph map to be queried is consistent with the corresponding vertex in the level inclusion index; Connection edge mapping rule: Each connection edge in the hypergraph mapping graph to be queried can find an edge with the same vertex set in the level inclusion index; Intersection relationship rule: The vertex intersection of two connecting edges in the hypergraph mapping graph to be queried is contained in the vertex intersection corresponding to the two connecting edges in the level inclusion index.

4. A sub-hypergraph inclusion query method according to claim 1, characterized in that: The step of converting the database hypergraph into a database hypergraph mapping graph comprises: Convert each hyperedge of the database hypergraph to a vertex in the database hypergraph mapping graph, and the signature of each hyperedge of the database hypergraph is equal to the label of the corresponding vertex in the database hypergraph mapping graph; If there are two hyperedges in the database hypergraph that correspond to two vertices in the database hypergraph mapping graph, and the two vertices overlap, then there is a connecting edge between the two vertices in the database hypergraph mapping graph, and the label of the connecting edge is composed of the signatures of the two hyperedges of the database hypergraph, and the labels of the connecting edge are arranged in the vertex encoding order of the hypergraph mapping graph.

5. A sub-hypergraph inclusion query method according to claim 1, characterized in that: The level inclusion index is used to save nodes, adjacent nodes, edges between nodes, node labels, and edge labels. There are multiple nodes, and the top layer of the tree structure is the root node. There is no overlap or inclusion relationship between the node labels of the lowest layer of the tree structure. The labels of the upper-layer edges include the labels of the adjacent lower-layer edges. If the labels of two edges are the same, then the two edges will be stored under the same node in the level inclusion index.

6. A sub-hypergraph inclusion query method according to claim 1, characterized in that: The level inclusion index having a tree structure is constructed according to each vertex of the database hypergraph mapping graph, include: Step S100: Find a vertex in the hypergraph map connected to the root node, and if the label of the edge of the vertex is not included in other edge labels, insert the vertex into a level inclusion index with a tree structure; Step S101: Find a vertex in a hypergraph mapping graph connected to the root node or a node inserted into a level inclusion index, and if the label of the edge of the vertex is not included in other edge labels, insert the vertex into a level inclusion index having a tree structure, and the insertion position is below the node inserted into the level inclusion index, and the label of the node inserted into the level inclusion index will include the label of the edge of the node inserted into the level inclusion index; Step S102: Repeat step S101 until all vertices of the hypergraph map are inserted into the level inclusion index having a tree structure.

7. An electronic device, characterized in that: include: One or more processors, and a memory, wherein the memory is used to store instructions, and when the instructions are executed by the one or more processors, the one or more processors execute a sub-hypergraph inclusion query method as described in any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that: It stores executable instructions, which, when executed, enable a processor to execute a sub-hypergraph inclusion query method as described in any one of claims 1 to 6.

9. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, a sub-hypergraph inclusion query method as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Sub-hypergraph matching method and device based on MCMC frame

    CN105809197A

  • 5G wireless communication network slice classification method based on hypergraph segmentation

    CN113240020A

  • Method for carrying out graph compression based on relation between nodes and edges

    CN119046486A

  • Systems and Methods for Optimizing Data Analysis

    US20150356137A1

  • Multi-source data fusion method and apparatus, and electronic device and storage medium

    WO2024255741A1