Unlock instant, AI-driven research and patent intelligence for your innovation.

Graph data structure representation, storage and query method and device based on hierarchical coding

A technology of hierarchical coding and graph data, applied in graph data query, query optimization, graph database, graph field, and can solve problems such as unsatisfactory efficiency

Pending Publication Date: 2022-01-21
COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For such large-scale graph data management and query, the efficiency of even the best graph database is unsatisfactory

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Graph data structure representation, storage and query method and device based on hierarchical coding
  • Graph data structure representation, storage and query method and device based on hierarchical coding
  • Graph data structure representation, storage and query method and device based on hierarchical coding

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] A hierarchical encoding method for nodes in an acyclic graph: This method aims to realize the dimensionality reduction representation of special structures in the graph through encoding. If a part of the graph database satisfies this definition, then this part can be regarded as an acyclic subgraph in the graph database. For an acyclic subgraph, the following coding method can be used to describe the relationship between nodes:

[0047] (1) In a directed acyclic subgraph, find all nodes without incoming edges (ie root nodes). Denote the set of these nodes as L1.

[0048] (2) Let the logarithmic value of the data size in L1 be base 2 v=log 2 size(L1), and round up v, so that The nodes in the collection are numbered sequentially using an m-bit binary encoding. For example: if L1 contains 1 node, then m=1, then the code of this node is "0". If L1 contains 3 nodes, then v=2, and the binary codes of the three nodes are: 00, 01, 10 respectively.

[0049] (3) Denote t...

Embodiment 2

[0056] In order to make full use of the hierarchical coding described in the content of the invention to speed up the query, the present invention proposes an improved method for storing graph data, which is described as follows:

[0057] (1) For an acyclic subgraph, calculate its "level code" for each node according to the method described in Summary 1 of the invention.

[0058] (2) Treat the level coding of each node as a special attribute of the node. This special attribute is different from user data and belongs to the metadata category of database management.

[0059] (3) Construct a table for the acyclic subgraph, the table includes two columns, the first column is the "level code" of each node in the table, and the second column is the id of each node in the table. Save the correspondence between the table and the acyclic subgraph for subsequent lookups.

[0060] (4) Sort the table according to the first column, and the sorting basis is: lexicographical ascending order....

Embodiment 3

[0064] In an acyclic subgraph, graph queries starting from a certain node can be divided into four types:

[0065] 1. All child nodes of a node;

[0066] 2. All parent nodes of a node;

[0067] 3. A child node of a node that does not exceed the specified number of hops;

[0068] 4. The parent node of a node that does not exceed the specified hop count.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a graph data structure representation, storage and query method and device based on hierarchical coding, and the structure representation method comprises the steps: calculating the coding digit m0 of a root node according to the number of root nodes in a directed acyclic subgraph, and generating the global code of each root node based on the coding digit m0; according to the number of t-hop sub-nodes of each root node, calculating a coding digit mt of the t-hop sub-nodes, and generating a global code of each t-hop sub-node based on the coding digit mt and the corresponding root node code or (t-1)-hop sub-node code; and representing the structure of the directed acyclic subgraph based on the global code of each node. According to the method, the typical query on the acyclic subgraph is accelerated.

Description

technical field [0001] The present invention relates to the fields of graphs, graph databases, graph data query, query optimization, etc., and in particular to providing a method and device for representing, storing, and querying graph data structures based on hierarchical coding. Background technique [0002] In the natural world, associations generally exist between entities. The graph model models data for associations, and can highlight the relationship between entities. Therefore, graph models are widely used in many fields such as social networks and financial anti-fraud. In the era of big data, the scale of graph data is getting bigger and bigger, the number of nodes generally reaches the level of one hundred million, and the number of relationships generally reaches one billion or even tens of billions. For such large-scale graph data management and query, the efficiency of even the best graph database is unsatisfactory. In many scenarios, there are a large number ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/36G06F16/33G06F16/22
CPCG06F16/367G06F16/334G06F16/374G06F16/2282
Inventor 沈志宏赵子豪高联欣周园春
Owner COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI