Supercharge Your Innovation With Domain-Expert AI Agents!

Graph database traversal method, device, equipment and storage medium

A graph traversal and database technology, applied in the field of intelligent search, can solve the problems of low query efficiency of target elements and low utilization of system resources

Pending Publication Date: 2020-06-09
BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF11 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, in the case of large-scale data concurrency in the above two methods, the query efficiency of the target element is low, resulting in low utilization of system resources

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 database traversal method, device, equipment and storage medium
  • Graph database traversal method, device, equipment and storage medium
  • Graph database traversal method, device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0059] Figure 1A It is a flowchart of a graph database traversal method in the first embodiment of the application. The embodiment of the present application is applicable to the situation of data traversal in the graph database. The method is executed by the graph database traversal device, which uses software and / or hardware Realized, and specifically configured in an electronic device with a certain data computing capability.

[0060] Such as Figure 1A A graph database traversal method shown, including:

[0061] S101. Obtain the input graph traversal statement, determine at least two operators included in the graph traversal statement and the execution order of each operator, allocate threads to each operator, and create a buffer for each two adjacent operators queue.

[0062] Wherein, the acquisition of the graph traversal statement can be realized by the user running the written graph traversal statement. Wherein, the graph traversal statement includes at least two op...

Embodiment 2

[0084] figure 2 It is a flow chart of a graph database traversal method in Embodiment 2 of the present application. This embodiment of the present application is optimized and improved on the basis of the technical solutions of the foregoing embodiments.

[0085] Furthermore, in the graph database traversal method, the following operation is added: "according to the execution order of each operator, transfer the token data between the threads corresponding to each operator, so that the thread that receives the token data starts to execute the corresponding The operation of the operator, and the token data is passed to the thread corresponding to the next operator", so as to associate and trigger the start of the thread corresponding to the next operator.

[0086] Such as figure 2 A graph database traversal method shown, including:

[0087] S201. Obtain the input graph traversal statement, determine at least two operators included in the graph traversal statement and the ex...

Embodiment 3

[0100] Figure 3A It is a flow chart of a graph database traversal method in Embodiment 3 of the present application. This embodiment of the present application is optimized and improved on the basis of the technical solutions of the foregoing embodiments.

[0101] Further, in the graph database traversal method, the following operation is added: "When the thread corresponding to any target operator other than the first operator determines that the execution termination condition of the operator is met, perform a preset operation to notify any The thread corresponding to each operator before the target operator terminates the operation of the corresponding operator" to eliminate a large number of invalid calculations.

[0102] Such as Figure 3A A graph database traversal method shown, including:

[0103] S301. Obtain the input graph traversal statement, determine at least two operators contained in the graph traversal statement and the execution order of each operator, allo...

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 database traversal method, a device, equipment and a storage medium, and relates to the technical field of intelligent search. The method comprises the following stepsof: obtaining an input graph traversal statement, determining at least two operators contained in the graph traversal statement and an execution sequence of each operator, respectively allocating threads to each operator, and respectively creating a buffer queue for every two adjacent operators; for every two adjacent operators, executing the operation of the previous operator through the thread corresponding to the previous operator in the two adjacent operators, and writing the execution result data of the previous operator into the buffer queues corresponding to the two adjacent operators;and through the thread corresponding to the latter operator in the two adjacent operators, reading execution result data of the former operator in the two adjacent operators from the buffer queue in parallel so as to be used for executing operation of the latter operator. According to the method of the embodiment of the invention, parallel execution of operators is realized, so that the executionefficiency of traversal operation and the utilization rate of system resources are improved.

Description

technical field [0001] This application relates to computer technology, in particular to the field of intelligent search technology. Background technique [0002] In a graph database, the traversal operation is the most basic operation. In the prior art, after the graph traversal statement input by the user is obtained, the nested call between multiple operators contained in the graph traversal statement, or the execution sequence of each operator is used to perform the call of the previous operator. The execution results are screened in sequence, and finally the target element is obtained. [0003] However, in the case of large-scale data concurrency in the above two methods, the query efficiency of target elements is low, resulting in low utilization of system resources. Contents of the invention [0004] Embodiments of the present application provide a graph database traversal method, device, device, and storage medium, so as to improve query efficiency and system res...

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/901G06F16/903
CPCG06F16/9024G06F16/903G06F16/90335G06F16/24561G06F16/24537G06F16/24554G06F16/24565G06F9/3851G06F9/4881G06F9/3009G06F9/5038G06F9/544G06F9/546
Inventor 张海平汪洋陈曦王益飞
Owner BEIJING BAIDU NETCOM SCI & TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More