Heterogeneous Acceleration Platform SQL Where Clause Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing heterogeneous acceleration platforms for database servers are limited in supporting diverse SQL queries, particularly in handling complex where clauses with arithmetic and logical operations, due to their fixed template constraints and limited data type support.

Innovation Solution

A data query method and system that utilizes a CPU and parallel processor to convert SQL where clauses into binary tree and linked list data structures, generating an operation code stream for the parallel processor to execute, enabling flexible support for any type of where clause query by determining operators, converting where clauses into binary trees and linked lists, and generating operation code streams based on node information.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a fixed template approach is used for heterogeneous acceleration, then the system structure is simple, but the platform cannot support diverse SQL queries with complex where clauses

Engineering Contradiction:
Improvesupport for diverse SQL queriesVSAvoidsystem structure complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements dynamic adaptability by allowing the heterogeneous acceleration platform to dynamically parse and adapt to different SQL query structures. The system uses a query parser to convert various where clauses into executable operation code streams, enabling the platform to handle diverse SQL queries without requiring fixed templates for each query type. This dynamic approach resolves the contradiction by making the system structure flexible rather than rigid.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent creates a universal query processing mechanism that can handle multiple types of SQL queries through a common architecture. The operation code stream generation system serves as a multi-functional interface that translates different where clause structures (arithmetic operations, logical operations, comparisons) into a unified execution format. This universal approach enables the platform to support diverse queries while maintaining a consistent system structure.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Productivity

If the parallel processor handles complex arithmetic and logical operations in where clauses, then query processing capability is improved, but the data type support remains limited

Engineering Contradiction:
Improvequery processing capabilityVSAvoiddata type support
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent enhances data type support by implementing parameter-based operation handling in the parallel processor. The system determines the data types of operands in where clauses and dynamically adjusts the execution parameters of arithmetic and logical operations. This allows the same operation code stream mechanism to handle different data types (numeric, string, date, etc.) by changing operational parameters rather than requiring separate processing paths for each data type.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent segments the query processing into distinct operational phases: parsing the where clause, determining operator types and data types, generating operation code streams, and executing on the parallel processor. This segmentation allows each phase to handle specific aspects independently, enabling the system to process complex arithmetic and logical operations while maintaining broad data type support through specialized handling in each segment.

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If the CPU converts where clauses into binary tree and linked list data structures, then the platform supports any type of where clause query, but the processing time increases

Engineering Contradiction:
Improvesupport for any where clause queryVSAvoidprocessing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-compiling and caching the operation code streams for common where clause patterns. When a SQL query is received, the system checks whether the where clause structure matches previously processed patterns. If a match is found, the pre-generated operation code stream is reused, avoiding redundant parsing and conversion operations. This preliminary preparation significantly reduces processing time for recurring query patterns while maintaining full support for diverse where clause structures.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by creating reusable templates for common where clause structures. Instead of parsing and converting every where clause from scratch, the system identifies structural patterns and copies previously analyzed data structures and operation code streams. This copying mechanism reduces the computational overhead of converting where clauses into binary trees and linked lists, thereby reducing processing time while preserving the ability to handle any where clause query type.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS20240045860A1Data query method and system, heterogeneous acceleration platform, and storage medium
Publication Date: 2024.02.08 INSPUR SUZHOU INTELLIGENT TECH CO LTD
  • US20240045860A1 patent drawing
  • US20240045860A1 patent drawing
  • US20240045860A1 patent drawing

AI summary

Provided is a data query method, applied to a heterogeneous acceleration platform. The data query method includes: determining operators in a database management system, and accomplishing, in a parallel processor, functions corresponding to the operators (S101); if an SQL query statement is received, converting, by using a CPU, the where clause in the SQL query statement into a data structure including a binary tree and a linked list (S102); controlling the CPU to generate an operation code stream of the data structure according to node information (S103); and performing, by using the parallel processor, a screening operation corresponding to the operation code stream on records in the database management system to obtain a query result conforming to the where clause (S104).