IP Library Granted Patent US 12,530,356
Granted Patent B2
US 12,530,356 · App. 17/882,782 · Granted Jan 20, 2026

Method and system for providing a context-sensitive, non-intrusive data processing optimization framework

Inventors: Zanqing Zhang (Toronto, CA); Benoit Hudzia (Dublin, IE); Arven Ding (Toronto, CA); Guo Yang (Shenzhen, CN); Zheng Li (Shenzhen, CN); Jingfang Zhang (Shenzhen, CN); Songling Liu (Shenzhen, CN); Denghong Liao (Shenzhen, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F16/24549G06F8/4442G06F16/24537G06F16/24542
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,530,356
App. No.
17/882,782
Filed
Aug 8, 2022
Granted
Jan 20, 2026
Kind
B2
Art Unit
2154
USPC
707/718
Abstract

A method of performing a data search in a data source by which an operator of a data search pipeline is just-in-time optimized and compiled, using an operator optimization module which optimizes and compiles an intermediate representation of the operator, considering runtime information, and optimization rules, to produce an operator that is optimized for the data search being performed. The method can be applied with one operator or with many operators applied in any sequence or tree structure according to a query plan, as determined by runtime information and optimization rules.

Claims (67)

1 . A computerized method of performing, by a query processing engine, a data search in a database:

obtaining, by an operator specialization module of the query processing engine, intermediate representation code of at least one operator, the intermediate representation code configured in a high-level programming language and compiled by a front-end compiler;

optimizing, by the operator specialization module and during runtime of performing the data search, the intermediate representation code based on runtime information of the runtime of performing the data search, to generate at least one optimized and compiled operator, the information of the runtime of performing the data search comprising statistical information about the data search of the data related thereto, the optimizing the intermediate representation code comprising:

specializing, based on the information of the runtime of performing the data search, the intermediate representation code for adapting to the data search and the hardware of the query processing engine,

selecting a level of parallelism and an operator fusion mechanism using the statistical information, and

optimizing the specialized intermediate representation code based on the information of the runtime of performing the data search to generate at least one optimized and compiled operator,

compiling the optimized intermediate representation code to generate at least one optimized and compiled operator; and

performing the data search by the query processing engine using the at least one optimized and compiled operator.

2 . The method of claim 1 , wherein the at least one operator comprises annotations tagging functions that are to be specialized when the at least one operator is being optimized and compiled for the data search at the runtime of performing the data search.

3 . The method of claim 1 , wherein the runtime information of the runtime of performing the data search further comprises:

data layout of the data search or data related thereto,

statistical information about the data search or data related thereto, or

a combination thereof.

4 . The method of claim 1 , wherein the optimization rules include global algorithms.

5 . The method of claim 1 , wherein the optimization rules are based on the runtime information of the runtime of performing the data search.

6 . The method of claim 1 , wherein the optimization rules include algorithms specific to the at least one operator.

7 . The method of claim 1 , wherein optimizing the at least one operator comprises an application of at least one optimization to a code of the at least one operator that increases the efficiency of a data search executing the at least one operator.

8 . The method of claim 1 , wherein the performing the data search comprises generating optimized and compiled operators via the optimizing and compiling, which are subsequently executed by the data search according to a query plan defined by the data search.

9 . A system for performing, by a query processing engine of specific hardware, a data search in a database comprising:

a memory storing instructions; and

at least one processor in communication with the memory, the at least one processor configured, upon execution of the instructions, to perform the following steps:

obtaining intermediate representation code of at least one operator, the intermediate representation code configured in a high-level programming language and compiled by a front-end compiler;

optimizing the intermediate representation code, based on information of the runtime of performing the data search;

compiling the optimized intermediate representation code to generate at least one optimized and compiled operator, and

performing the data search by the query processing engine using the at least one optimized and compiled operator,

wherein the information of the runtime of performing the data search comprises statistical information about the data search or the data related thereto; and

wherein the optimizing the intermediate representation code comprises:

specializing, based on the information of the runtime of performing the data search, the intermediate representation code for adapting to the data search and the hardware of the query processing engine,

selecting a level of parallelism and an operator fusion mechanism using the statistical information, and

optimizing the specialized intermediate representation code, based on the information of the runtime of performing the data search, to generate at least one optimized and compiled operator.

10 . The system of claim 9 , further comprising an operator specialization module that is operative to receive at least one operator file, as well as the runtime information from the query processing engine; and to have the at least one operator file optimized and compiled based on the runtime information of the data search.

11 . The system of claim 9 , wherein the at least one operator comprises annotations tagging functions that are to be specialized when the at least one operator is being optimized and compiled for the data search at the runtime of performing the data search.

12 . The system of claim 9 , wherein the information of the runtime of performing the data search further comprises:

data layout of the data search or data related thereto,

statistical information about the data search or data related thereto, or

a combination thereof.

13 . The system of claim 9 , wherein the optimization rules include global algorithms.

14 . The system of claim 9 , wherein the optimization rules are based on the runtime information of the runtime of performing the data search.

15 . The system of claim 9 , wherein the optimization rules include algorithms specific to the at least one operator.

16 . The system of claim 9 , wherein the performing the data search comprises generating optimized and compiled operators via the optimizing and compiling, which are subsequently executed by the data search according to a query plan defined by the data search.

17 . A non-transitory computer-readable media storing comprising computer instructions that configure at least one processor, upon execution of the instructions, to perform the following steps:

obtain intermediate representation code of at least one operator, the intermediate representation code configured in a high-level programming language and compiled by a front-end compiler;

optimized the intermediate representation code, based on information of the runtime of performing the data search;

compile the optimized intermediate representation code to generate at least one optimized and compiled operator; and

perform the data search by the query pr si engine using the at least one optimized and compiled operator;

wherein the information of the runtime of performing the data search comprises statistical information about the data search or the data related thereto; and

wherein the optimizing specializing, based on the information of the runtime of performing the data search the intermediate representation code for adapting to the data search and the hardware of the query processing engine,

selecting a level of parallelism and an operator fusion mechanism using the statistical information, and

optimizing the specialized intermediate representation code, based on the information of the runtime of performing the data search, to generate at least one optimized and compiled operator.

18 . The method of claim 1 , wherein the optimizing and compiling comprise:

obtaining the runtime information of the runtime of performing the data search;

obtaining optimization rules; and

one or a combination of operations selected from removing dead code in the intermediate representation code, removing dead branches in the representation code, and adding logic in the intermediate representation code to bypass unused portions of code based on the runtime information of the runtime of performing the data search and the optimization rules.

19 . The non-transitory computer-readable media of claim 17 , wherein the specializing the intermediate representation code comprises:

specializing, based on the runtime information of the runtime of performing the data search, the intermediate representation code by:

optimizing the at least one operator for the hardware of the query processing engine, and

defining or giving values to variables of the intermediate representation code that were previously unknown.

20 . The non-transitory computer-readable media of claim 17 , wherein the at least one operator comprises annotations tagging functions that are to be specialized when the at least one operator is being optimized and compiled for the data search at the runtime of performing the data search.

21 . The non-transitory computer-media of claim 17 , wherein the runtime information of the runtime of performing the data search further comprises:

data layout of the data search or data related thereto,

statistical information about the data search or data related thereto, or

a combination thereof.

22 . The non-transitory computer-readable media of claim 17 , wherein the optimization rules include global algorithms.

23 . The non-transitory computer-readable media of claim 17 , wherein the optimization rules are based on the runtime information of the runtime of performing the data search.

24 . The non-transitory computer-readable media of claim 17 , wherein the optimization rules include algorithms specific to the at least one operator.

25 . The non-transitory computer-readable media of claim 17 , wherein optimizing the at least one operator comprises an application of at least one optimization to a code of the at least one operator that increases the efficiency of a data search executing the at least one operator.

26 . The non-transitory computer-readable media of claim 17 , wherein performing a data search comprises the optimizing and compiling many operators, which are subsequently executed by the data search according to a query plan defined by the data search.

Continuity (2)
Continuation PCTCN2021103461 · Jun 30, 2021
Related Publication 20230004563A1 · Jan 5, 2023
References Cited (55)
US 6567802B1 · Popa et al. · 2003 [cited by applicant]
US 6745384B1 · Biggerstaff · 2004 [cited by applicant]
US 7716215B2 · Lohman et al. · 2010 [cited by applicant]
US 8204875B2 · Srinivasan et al. · 2012 [cited by applicant]
US 9607017B2 · Debray et al. · 2017 [cited by applicant]
US 9934051B1 · Ding · 2018 [cited by examiner]
US 10607134B1 · Cosic · 2020 [cited by examiner]
US 10901990B1 · Vogelsgesang et al. · 2021 [cited by applicant]
US 11221834B2 · Gao · 2022 [cited by examiner]
US 20040267719A1 · Doherty et al. · 2004 [cited by applicant]
US 20070198484A1 · Ahmed et al. · 2007 [cited by applicant]
US 20080016507A1 · Thomas · 2008 [cited by examiner]
US 20080163181A1 · Guo · 2008 [cited by examiner]
US 20080229028A1 · Cascaval · 2008 [cited by examiner]
US 20090216709A1 · Cheng et al. · 2009 [cited by applicant]
US 20100070730A1 · Pop · 2010 [cited by examiner]
US 20100313079A1 · Beretta · 2010 [cited by examiner]
US 20120005190A1 · Faerber · 2012 [cited by examiner]
US 20130031536A1 · De · 2013 [cited by examiner]
US 20130086566A1 · Gaster · 2013 [cited by examiner]
US 20130205286A1 · Barraclough · 2013 [cited by examiner]
US 20140245271A1 · Miller · 2014 [cited by examiner]
US 20140365533A1 · Debray · 2014 [cited by examiner]
US 20150363466A1 · Balmin et al. · 2015 [cited by applicant]
US 20160306847A1 · Ding · 2016 [cited by examiner]
US 20170083837A1 · Berlandier · 2017 [cited by examiner]
US 20170091269A1 · Zhu · 2017 [cited by examiner]
US 20170104627A1 · Bender et al. · 2017 [cited by applicant]
US 20180089268A1 · Lee et al. · 2018 [cited by applicant]
US 20180373515A1 · Brown · 2018 [cited by examiner]
US 20190026088A1 · Gong · 2019 [cited by examiner]
US 20190121893A1 · Fender · 2019 [cited by examiner]
US 20190377589A1 · Hossbach · 2019 [cited by examiner]
US 20200117433A1 · Tene · 2020 [cited by examiner]
US 20200293299A1 · Santosuosso · 2020 [cited by examiner]
US 20200311084A1 · Merker · 2020 [cited by applicant]
US 20200341741A1 · Brooker · 2020 [cited by examiner]
US 20210064353A1 · Al Sheikh · 2021 [cited by examiner]
US 20210132922A1 · Chen · 2021 [cited by examiner]
US 20220334851A1 · Zhurba · 2022 [cited by examiner]
US 20220366008A1 · Shin · 2022 [cited by examiner]
CN 102323772A · 2012 [cited by applicant]
CN 103729392A · 2014 [cited by applicant]
CN 107250983A · 2017 [cited by applicant]
CN 108027838A · 2018 [cited by applicant]
CN 112364053A · 2021 [cited by applicant]
CN 112749143A · 2021 [cited by applicant]
KR 20180104498A · 2018 [cited by applicant]
Chinese Intellectual Property Office (ISR/CN), “International Search Report for PCT/CN2021/103461”, China, Mar. 28, 2022. [cited by applicant]
PCT International Search Report in Respect of International Application PCT/CN2021/103461, Mar. 28, 2022. [cited by applicant]
Yannis Klonatos, et al., “Building Efficient Query Engines in a High-Level Language”, Proceedings of the VLDB Endowment, vol. 7, No. 10, Jun. 1, 2014 (Jun. 1, 2014), pp. 853-864, XP055279415, total 12 pages. [cited by applicant]
Supplementary European Search Report in respect of European Application No. EP 21 947 521.7 dated May 8, 2024. [cited by applicant]
European Search Opinion in respect of European Application No. EP 21 947 521.7 dated May 8, 2024. [cited by applicant]
DU Wu et al., “Similarity query based on Apache AsterixDB”, computer knowledge and technology, Feb. 15, 2020,with English abstract total 3 pages. [cited by applicant]
CN 202411171686.0 Office Action, Jul. 23, 2025. [cited by applicant]