Method for querying shortest path between two points in unweighted graph of graph database, and application

A shortest path and database technology, applied in the field of complex networks, can solve problems such as slow query process and uneven node out-degree, and achieve the effect of reducing the search range

Active Publication Date: 2018-09-28
蚂蚁云创数字科技(北京)有限公司
View PDF6 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, in the actual network, due to the extremely uneven distribution of node out-degree (number of edges), D...

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
  • Method for querying shortest path between two points in unweighted graph of graph database, and application
  • Method for querying shortest path between two points in unweighted graph of graph database, and application
  • Method for querying shortest path between two points in unweighted graph of graph database, and application

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0050] Refer to the attached figure 1 Describe the method for querying the length of the shortest path between two points in an unweighted graph in a graph database according to an embodiment of the present invention, figure 1 Shows a flowchart of a method 100 for querying the length of the shortest path between two points in an unweighted graph in a graph database according to an embodiment of the present invention, where it is assumed that a given graph is G(V,E), and the query point The shortest path from a to point b, the longest hop limit is K.

[0051] Such as figure 1 As shown, in step S110, the magnitudes of the tidehead on side a and the tidehead on side b are compared.

[0052] For the initial moment, it is to compare the number of one-hop neighbors of a and the number of one-hop neighbors of b; as the process progresses, the tide head continues to move forward, and continue to compare the size of the tide head at the current moment. It should be noted that the adv...

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 method for querying the length of a shortest path between two points in an unweighted graph of a graph database. It is assumed that the given graph is G(V, E), the shortest path between the points a and b needs to be queried, and a defined longest hop count is K. The shortest path query method comprises the steps of (1) comparing the sizes of a tidehead of the a side anda tidehead of the b side; (2) selecting one side, with the relatively small quantity of elements in the tidehead, of the two sides, and obtaining a new tidehead of the side; (3) repeating the steps (1) and (2) until a tidehead node y is found, and at the moment, determining that the shortest path is found or other predetermined stop conditions are met, wherein the tidehead node y is the tidehead node of not only a but also b; and (4) if the shortest path is determined to be found, determining the length of the shortest path between the points a and b. By utilizing bidirectional search, and based on direction selection of the tidehead size, the search range can be greatly narrowed, so that the query of the shortest path between the two points can be efficiently executed on large-scale graphs.

Description

technical field [0001] The present invention generally relates to complex network technology, and in particular relates to a method, a computing device and a computer-readable storage medium for querying the length of the shortest path between two points in an unweighted graph in a database. Background technique [0002] A complex network is a network structure composed of nodes with huge data and intricate relationships between nodes. In the real world, there are various similar complex networks, such as social networks and power grids. [0003] From a mathematical perspective, a complex network is a graph with complex topological features. [0004] A graph database is also called a graph-oriented / graph-based database, and its basic meaning is to store and query data in a graph-like data structure. The main elements in a graph database are nodes and edges. In practical applications, nodes are often used to represent entities or concepts, and the edges connected between n...

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): G06F17/30
Inventor 洪春涛朱晓伟王涛
Owner 蚂蚁云创数字科技(北京)有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products