Graph Database Query Planning with Intermediate Deduplication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The efficiency of querying data in graph databases is low.

Innovation Solution

A data query method that involves generating an execution plan based on a user's query statement, determining the execution order of query operations, identifying a target operation other than the last operation, and performing deduplication on duplicate results to optimize the query process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional query methods are used in graph databases, then the query process is simple, but the data query efficiency is low

Engineering Contradiction:
Improvedata query efficiencyVSAvoidquery process complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system performs preliminary actions by determining the execution order of query operations before actually executing them. The optimization module analyzes the query plan in advance, identifies target operations that produce duplicate results, and inserts deduplication operations at appropriate positions before execution, thereby improving query efficiency without adding significant runtime complexity

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The optimization module acts as an intermediary between the query parser and the execution engine. It receives the query plan, analyzes it to identify operations requiring deduplication, inserts optimization operations, and then passes the optimized plan to the execution engine, thereby resolving the contradiction between simplicity and efficiency

Inventive Principle:
Principle #24Intermediary (Mediator)

2Manufacturing precision

If deduplication operations are inserted into the execution plan, then duplicate results are eliminated, but the execution plan becomes more complex

Engineering Contradiction:
Improvequery result accuracyVSAvoidexecution plan complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The system applies local quality by inserting deduplication operations only at specific locations in the execution plan where duplicate results are generated, rather than applying deduplication universally. The optimization module identifies target operations and inserts deduplication operations at precise positions, thereby ensuring result accuracy while minimizing the increase in execution plan complexity

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12488003B2Data query methods and apparatuses, storage media, and electronic devices
Publication Date: 2025.12.02 ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
  • US12488003B2 patent drawing
  • US12488003B2 patent drawing
  • US12488003B2 patent drawing

AI summary

This specification discloses data query methods and apparatuses, storage media, and electronic devices. In an example method, a query statement input by a user is obtained, where the query statement is used to query data from a database. Based on the query statement, an execution plan corresponding to the query statement is generated. Based on the execution plan, each query operation involved in the execution plan and an execution order of query operations are; determined. A target operation from the query operations is determined based on the execution order of the query operations, where the target operation is an operation other than a last query operation to be executed among the query operations. When executing the execution plan, deduplication is performed on duplicate results included in query results obtained by executing the target operation. Based on deduplicated query results, query data corresponding to the query statement is obtained.