IP Library Granted Patent US 11,036,733
Granted Patent B2
US 11,036,733 · App. 16/882,880 · Granted Jun 15, 2021

Method, apparatus, system, server, and storage medium for connecting tables stored at distributed database

Inventors: Bin Liu (Hangzhou, CN); Yi Pan (Hangzhou, CN); Bo Zhang (Hangzhou, CN); Huang Yu (Hangzhou, CN)
Assignee: Ant Financial (Hang Zhou) Network Technology Co., Ltd.
G06F16/24537G06F16/2282G06F16/2456G06F16/27
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 11,036,733
App. No.
16/882,880
Granted
Jun 15, 2021
Kind
B2
Abstract

A method includes: obtaining, by an inner table node that stores a portion of an inner table, a portion of an outer table from each of outer table nodes, and wherein a size of the outer table is less than a size of the inner table; reading, by the inner table node, the outer table by table joining threads or table joining processes of the inner table node; matching, by the table joining threads or the table joining processes, the outer table with the portion of the inner table stored at the inner table node; and outputting, by the inner table node, data from the outer table and the portion of the inner table that matches with each other.

Claims (49)

1. A method for joining tables in a distributed database, comprising:

obtaining, by an inner table node that stores a portion of an inner table less than the entire inner table, an entire outer table by obtaining a portion of the outer table from each of outer table nodes through a computer network that couples the inner table node to each of the outer table nodes, wherein a size of the entire outer table is less than a size of the entire inner table, and the portion of the inner table is not transmitted from the inner table node to the outer table nodes;

reading, by the inner table node, the entire outer table by table joining threads or table joining processes of the inner table node;

matching, by the table joining threads or the table joining processes, the outer table with the portion of the inner table stored at the inner table node; and

outputting, by the inner table node, data from the outer table and the portion of the inner table that matches with each other.

2. The method according to claim 1 , wherein the reading, by the inner table node, the entire outer table by table joining threads or table joining processes of the inner table node comprises:

dividing the outer table into a plurality of pieces of data in a random or Round-Robin manner; and

reading, by each of the table joining threads or the table joining processes, each of the plurality of pieces of data in sequence.

3. The method according to claim 1 , wherein the reading, by the inner table node, the entire outer table by table joining threads or table joining processes of the inner table node comprises:

gathering all portions of the outer table in a data set, each portion sent by an outer table node; and

reading, by each of the table joining threads or the table joining processes, data row by row or in batches from the data set until the data set is completely read.

4. The method according to claim 1 , wherein the portion of the inner table stored at the inner table node includes a primary key index or a local index; and

the matching, by the table joining thread or the table joining process, the outer table with the portion of the inner table stored at the inner table node comprises:

searching, according to the primary key index or the local index in the table joining threads or the table joining processes, data of the inner table to match with data of the outer table.

5. The method according to claim 1 , wherein the table joining threads include a Nested Loop Join algorithm.

6. The method according to claim 1 , wherein the portion of the outer table is sent to the inner table node by broadcasting.

7. An inner table node, comprising:

one or more processors; and

a memory storing a portion of an inner table less than the entire inner table and instructions executable by the one or more processors to cause the one or more processors to perform operations comprising:

obtaining an entire outer table by obtaining a portion of the outer table from each of outer table nodes through a computer network that couples the inner table node to each of the outer table node, wherein a size of the entire outer table is less than a size of the entire inner table, and the portion of the inner table is not transmitted from the inner table node to the outer table nodes;

reading the entire outer table by table joining threads or table joining processes of the inner table node;

matching, by the table joining threads or the table joining processes, the outer table with the portion of the inner table stored at the inner table node; and

outputting data from the outer table and the portion of the inner table that matches with each other.

8. The inner table node according to claim 7 , wherein the reading the entire outer table by table joining threads or table joining processes of the inner table node comprises:

dividing the outer table into a plurality of pieces of data in a random or Round-Robin manner; and

reading, by each of the table joining threads or the table joining processes, each of the plurality of pieces of data in sequence.

9. The inner table node according to claim 7 , wherein the reading the entire outer table by table joining threads or table joining processes of the inner table node comprises:

gathering all portions of the outer table in a data set, each portion sent by an outer table node; and

reading, by each of the table joining threads or the table joining processes, data row by row or in batches from the data set until the data set is completely read.

10. The inner table node according to claim 7 , wherein the portion of the inner table from the inner table node includes a primary key index or a local index; and

the matching, by the table joining thread or the table joining process, the outer table with the portion of the inner table stored at the inner table node comprises:

searching, according to the primary key index or the local index in the table joining threads or the table joining processes, data of the inner table to match with data of the outer table.

11. The inner table node according to claim 7 , wherein the table joining threads include a Nested Loop Join algorithm.

12. The inner table node according to claim 7 , wherein the portion of the outer table is sent to the inner table node by broadcasting.

13. One or more non-transitory computer-readable storage media configured with instructions executable by one or more processors of an inner table node that stores a portion of an inner table less than the entire inner table to cause the one or more processors to perform operations comprising:

obtaining an entire outer table by obtaining a portion of the outer table from each of outer table nodes through a computer network that couples the inner table node to each of the outer table node, wherein a size of the entire outer table is less than a size of the entire inner table, and the portion of the inner table is not transmitted from the inner table node to the outer table nodes;

reading the entire outer table by table joining threads or table joining processes of the inner table node;

matching, by the table joining threads or the table joining processes, the outer table with the portion of the inner table stored at the inner table node; and

outputting data from the outer table and the portion of the inner table that matches with each other.

14. The one or more non-transitory computer-readable storage media according to claim 13 , wherein the reading the entire outer table by table joining threads or table joining processes of the inner table node comprises:

dividing the outer table into a plurality of pieces of data in a random or Round-Robin manner; and

reading, by each of the table joining threads or the table joining processes, each of the plurality of pieces of data in sequence.

15. The one or more non-transitory computer-readable storage media according to claim 13 , wherein the reading the entire outer table by table joining threads or table joining processes of the inner table node comprises:

gathering all portions of the outer table in a data set, each portion sent by an outer table node; and

reading, by each of the table joining threads or the table joining processes, data row by row or in batches from the data set until the data set is completely read.

16. The one or more non-transitory computer-readable storage media according to claim 13 , wherein the portion of the inner table stored at the inner table node includes a primary key index or a local index; and

the matching, by the table joining thread or the table joining process, the outer table with the portion of the inner table stored at the inner table node comprises:

searching, according to the primary key index or the local index in the table joining threads or the table joining processes, data of the inner table to match with data of the outer table.

17. The one or more non-transitory computer-readable storage media according to claim 13 , wherein the table joining threads include a Nested Loop Join algorithm.

Assignments (5)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 27, 2021
From: ANT FINANCIAL (HANG ZHOU) NETWORK TECHNOLOGY CO., LTD.
To: BEIJING OCEANBASE TECHNOLOGY CO., LTD.
Reel/Frame 057312/0153 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 4, 2021
From: ADVANCED NEW TECHNOLOGIES CO., LTD.
To: ANT FINANCIAL (HANG ZHOU) NETWORK TECHNOLOGY CO., LTD.
Reel/Frame 055145/0942 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 16, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053796/0281 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 3, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053702/0392 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 30, 2020
From: LIU, BIN; PAN, YI; ZHANG, BO; YU, HUANG
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 053679/0831 →