IP Library › Granted Patent US 12,259,885
Granted Patent B2
US 12,259,885 · App. 18/492,456 · Granted Mar 25, 2025

Query optimization methods, apparatuses, and systems for secure multi-party database

Inventors: Yang Yang (Hangzhou, CN); Qunshan Huang (Hangzhou, CN); Jun Qi (Hangzhou, CN); Shunde Cao (Hangzhou, CN); Pu Duan (Hangzhou, CN); Jian Du (Hangzhou, CN); Qingkai Mao (Hangzhou, CN); Yang Zhao (Hangzhou, CN); Kefeng Yu (Zhejiang, CN); Lei Wang (Hangzhou, CN); Benyu Zhang (Hangzhou, CN)
Assignee: Alipay (Hangzhou) Information Technology Co., Ltd.
G06F16/24545H04L9/06H04L2209/46
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,259,885
App. No.
18/492,456
Granted
Mar 25, 2025
Kind
B2
Abstract

Implementations of this specification provide query optimization methods, apparatuses, and systems for secure multi-party databases. In an implementation, a method includes: receiving a current query associated with a plurality of target database of a multi-party database system, generating a plurality of execution plans for the current query, determining, for each execution plan, a respective cost computation formula of a plurality of cost computation values for computing an execution cost of jointly executing the execution plan by the plurality of target databases, receiving a secure computation result from each of a plurality of query engines corresponding to the plurality of target databases, and determining an optimal execution plan having a lowest cost value in the plurality of cost computation formulas based on the secure computation result.

Claims (67)

1. A computer-implemented method, comprising:

receiving, by a central device of a multi-party database system, a current query associated with a plurality of target databases of the multi-party database system;

generating, by the central device, a plurality of execution plans for the current query;

determining, by the central device for each execution plan, a respective cost computation formula of a plurality of cost computation formulas for computing an execution cost of jointly executing the execution plan by the plurality of target databases;

receiving, by the central device, a secure computation result from each of a plurality of query engines corresponding to the plurality of target databases, wherein the secure computation result is obtained by performing secure multi-party computation (MPC) based on a target secure computation method corresponding to the respective cost computation formula; and

determining, by the central device, an optimal execution plan having a lowest cost value in the plurality of cost computation formulas based on a cryptographic result of a cost value of each of the plurality of cost computation formulas.

2. The computer-implemented method according to claim 1 , wherein the execution cost comprises computing resource costs of the plurality of target databases and costs of communications between the plurality of target databases.

3. The computer-implemented method according to claim 1 , further comprising:

determining, by the central device, the target secure computation method based on the plurality of cost computation formulas; and

sending, by the central device, the target secure computation method to the plurality of query engines.

4. The computer-implemented method according to claim 1 , wherein the secure computation result is an index number of a cost computation formula with the lowest cost value in the plurality of cost computation formulas; and wherein

determining the optimal execution plan having the lowest cost value comprises:

determining an execution plan corresponding to the index number as the optimal execution plan.

5. The computer-implemented method according to claim 1 , wherein the secure computation result is

the cryptographic result of each of the plurality of cost computation formulas.

6. The computer-implemented method according to claim 5 , wherein the cryptographic result is a cost value shard computed based on secret sharing; and wherein

determining the optimal execution plan comprises:

aggregating a plurality of cost value shards sent by the plurality of query engines for a same execution plan of the plurality of execution plans to obtain a cost value of the same execution plan; and

determining the optimal execution plan by comparing cost values of the plurality of execution plans.

7. The computer-implemented method according to claim 5 , wherein the cryptographic result is a ciphertext cost value encrypted based on a public key of the central device; and wherein

determining the optimal execution plan comprises:

decrypting the ciphertext cost value based on a private key corresponding to the public key, to obtain a plaintext cost value; and

determining the optimal execution plan by comparing plaintext cost values of the plurality of execution plans.

8. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:

receiving, by a central device of a multi-party database system, a current query associated with a plurality of target databases of the multi-party database system;

generating, by the central device, a plurality of execution plans for the current query;

determining, by the central device for each execution plan, a respective cost computation formula of a plurality of cost computation formulas for computing an execution cost of jointly executing the execution plan by the plurality of target databases;

receiving, by the central device, a secure computation result from each of a plurality of query engines corresponding to the plurality of target databases, wherein the secure computation result is obtained by performing secure multi-party computation (MPC) based on a target secure computation method corresponding to the respective cost computation formula; and

determining, by the central device, an optimal execution plan having a lowest cost value in the plurality of cost computation formulas based on a cryptographic result of a cost value of each of the plurality of cost computation formulas.

9. The non-transitory, computer-readable medium according to claim 8 , wherein the execution cost comprises computing resource costs of the plurality of target databases and costs of communications between the plurality of target databases.

10. The non-transitory, computer-readable medium according to claim 8 , the operations further comprising:

determining, by the central device, the target secure computation method based on the plurality of cost computation formulas; and

sending, by the central device, the target secure computation method to the plurality of query engines.

11. The non-transitory, computer-readable medium according to claim 8 , wherein the secure computation result is an index number of a cost computation formula with the lowest cost value in the plurality of cost computation formulas; and wherein

determining the optimal execution plan having the lowest cost value comprises:

determining an execution plan corresponding to the index number as the optimal execution plan.

12. The non-transitory, computer-readable medium according to claim 8 , wherein the secure computation result is

the cryptographic result of each of the plurality of cost computation formulas.

13. The non-transitory, computer-readable medium according to claim 12 , wherein the cryptographic result is a cost value shard computed based on secret sharing; and wherein

determining the optimal execution plan comprises:

aggregating a plurality of cost value shards sent by the plurality of query engines for a same execution plan of the plurality of execution plans to obtain a cost value of the same execution plan; and

determining the optimal execution plan by comparing cost values of the plurality of execution plans.

14. The non-transitory, computer-readable medium according to claim 12 , wherein the cryptographic result is a ciphertext cost value encrypted based on a public key of the central device; and wherein

determining the optimal execution plan comprises:

decrypting the ciphertext cost value based on a private key corresponding to the public key, to obtain a plaintext cost value; and

determining the optimal execution plan by comparing plaintext cost values of the plurality of execution plans.

15. A central device of a multi-party database system, comprising:

one or more processors; and

one or more computer memory devices interoperably coupled with the one or more processors and storing programming instructions for execution by the one or more processors to perform operations comprising:

receiving a current query associated with a plurality of target databases of the multi-party database system;

generating a plurality of execution plans for the current query;

determining, for each execution plan, a respective cost computation formula of a plurality of cost computation formulas for computing an execution cost of jointly executing the execution plan by the plurality of target databases;

receiving a secure computation result from each of a plurality of query engines corresponding to the plurality of target databases, wherein the secure computation result is obtained by performing secure multi-party computation (MPC) based on a target secure computation method corresponding to the respective cost computation formula; and

determining an optimal execution plan having a lowest cost value in the plurality of cost computation formulas based on a cryptographic result of a cost value of each of the plurality of cost computation formulas.

16. The central device according to claim 15 , wherein the execution cost comprises computing resource costs of the plurality of target databases and costs of communications between the plurality of target databases.

17. The central device according to claim 15 , the operations further comprising:

determining the target secure computation method based on the plurality of cost computation formulas; and

sending the target secure computation method to the plurality of query engines.

18. The central device according to claim 15 , wherein the secure computation result is an index number of a cost computation formula with the lowest cost value in the plurality of cost computation formulas; and wherein

determining the optimal execution plan having the lowest cost value comprises:

determining an execution plan corresponding to the index number as the optimal execution plan.

19. The central device according to claim 15 , wherein the secure computation result is

the cryptographic result of each of the plurality of cost computation formulas.

20. The central device according to claim 19 , wherein the cryptographic result is a cost value shard computed based on secret sharing; and wherein

determining the optimal execution plan comprises:

aggregating a plurality of cost value shards sent by the plurality of query engines for a same execution plan of the plurality of execution plans to obtain a cost value of the same execution plan; and

determining the optimal execution plan by comparing cost values of the plurality of execution plans.

Assignments (6)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 17, 2024
From: HUANG, QUNSHAN; CAO, SHUNDE; DUAN, PU; ZHAO, YANG; YU, KEFENG; WANG, LEI
To: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 069608/0304 →
EMPLOYMENT AGREEMENT Recorded Dec 17, 2024
From: YANG, YANG
To: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 069718/0421 →
EMPLOYMENT AGREEMENT Recorded Dec 17, 2024
From: QI, JUN
To: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 069727/0049 →
EMPLOYMENT AGREEMENT Recorded Dec 17, 2024
From: DU, JIAN
To: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 069727/0274 →
EMPLOYMENT AGREEMENT Recorded Dec 17, 2024
From: MAO, QINGKAI
To: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 069727/0313 →
EMPLOYMENT AGREEMENT Recorded Dec 17, 2024
From: ZHANG, BENYU
To: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 069990/0143 →
Priority Claims (1)
CN 202110443996.3 · Apr 23, 2021 · national
Continuity (2)
Continuation PCTCN2022086531 · Apr 13, 2022
Related Publication 20240054129A1 · Feb 15, 2024
References Cited (14)
US 20060020573A1 · Galindo-Legaria · 2006 [cited by examiner]
US 20180196850A1 · Schaeffer et al. · 2018 [cited by applicant]
US 20180357427A1 · Lindell et al. · 2018 [cited by applicant]
US 20180365290A1 · Kaushik et al. · 2018 [cited by applicant]
CN 101739398 · 2010 [cited by applicant]
CN 111737011 · 2020 [cited by applicant]
CN 111767304 · 2020 [cited by applicant]
CN 112329072 · 2021 [cited by applicant]
CN 112860738 · 2021 [cited by applicant]
Pattuk, E., Kantarcioglu, M., Ulusoy, H., Malin, B.. CheapSMC: A Framework to Minimize Secure Multiparty Computation Cost in the Cloud. In: Ranise, S., Swarup, V. (eds) Data and Applications Security and Privacy XXX. DB… [cited by examiner]
cbcb.umd.edu [online], “Chapter 13: Query Optimization,” available on or before Mar. 28, 2016, via Internet Archive: Wayback Machine URL <https://web.archive.org/web/20230000000000*/https://www.cbcb.umd.edu/confcour/Spr… [cited by applicant]
International Preliminary Report on Patentability in Appln. No. PCT/CN2022/086531, mailed on Nov. 2, 2023, 14 pages (with English translation). [cited by applicant]
International Search Report and Written Opinion in Appln. No. PCT/CN2022/086531, mailed on Jul. 8, 2022, 17 pages (with English translation). [cited by applicant]
Song et al., “Survey on AI powered new techniques for query processing and optimization,” Journal of Frontiers of Computer Science & Technology, Jul. 1, 2020, 14(7):1081-1103 (with English Abstract). [cited by applicant]