Terminal Database Parallel Query Partitioning by CPU Frequency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Intelligent terminal databases face challenges in utilizing multiple CPU cores efficiently due to the presence of both big and little cores, leading to suboptimal parallel execution performance, especially in scenarios where SQL statement execution durations are short, affecting user experience.

Innovation Solution

A method and apparatus that dynamically divide a data table into partitions based on the frequency proportion of thread CPUs, allowing each thread CPU to query a corresponding data partition, thereby optimizing data query efficiency by ensuring that higher frequency CPUs handle larger data loads and lower frequency CPUs handle smaller loads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If data is equally allocated to each CPU core, then task distribution is simple, but execution efficiency decreases due to frequency differences between big and little cores

Engineering Contradiction:
Improvetask allocation simplicityVSAvoidparallel execution efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent applies local quality by allocating different amounts of data to different CPU cores based on their specific frequency characteristics. High-frequency big cores receive larger data partitions while low-frequency little cores receive smaller partitions, optimizing overall execution efficiency by matching task load to processing capability.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the parameter of data allocation from equal distribution to frequency-proportional distribution. By calculating frequency proportions of available CPU cores and allocating data partitions accordingly, the system adapts to heterogeneous core performance and improves parallel query execution efficiency.

Inventive Principle:
Principle #35Parameter changes

2Ease of manufacture

If conventional equal data allocation is used, then implementation is straightforward, but big cores wait for little cores causing reduced overall efficiency

Engineering Contradiction:
Improveimplementation simplicityVSAvoidwaiting time
Core Design Contradiction:
Ease of manufactureVSLoss of time

Solution Approach 1:

The patent changes the allocation parameter from uniform distribution to frequency-proportional distribution. By calculating the frequency proportion of each CPU core and allocating data partitions accordingly, the system ensures that big cores complete their tasks faster and don't need to wait for little cores, reducing overall execution time.

Inventive Principle:
Principle #35Parameter changes

3Use of energy by moving object

If CPU frequency is limited, then power consumption is reduced, but execution duration of SQL statements greatly increases

Engineering Contradiction:
Improvepower consumptionVSAvoidSQL execution duration
Core Design Contradiction:
Use of energy by moving objectVSDuration of action of moving object

Solution Approach 1:

The patent applies dynamics by dynamically selecting and allocating CPU cores based on their frequency characteristics and availability. The system can adaptively choose which cores to use and how to distribute data partitions, optimizing the balance between power consumption and execution duration for database queries.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10884817B2Method and apparatus for parallel execution in terminal database using data partitions
Publication Date: 2021.01.05 HUAWEI TECH CO LTD
  • US10884817B2 patent drawing
  • US10884817B2 patent drawing
  • US10884817B2 patent drawing

AI summary

A parallel execution method and apparatus in a terminal database, where the method includes determining, by a terminal, each thread central processing unit (CPU) based on a preset degree of parallelism, where the degree of parallelism is a quantity of threads executed in parallel, obtaining, by the terminal, a frequency of each thread CPU, calculating a frequency proportion of the thread CPUs, dividing, by the terminal, a to-be-queried data table in the terminal database into data partitions based on the frequency proportion of the thread CPUs, determining a data partition corresponding to each thread CPU, and querying in parallel, by the terminal, data in the corresponding data partition using each thread CPU.