IP Library Granted Patent US 10,552,441
Granted Patent B2
US 10,552,441 · App. 15/154,867 · Granted Feb 4, 2020

Method and apparatus for multithreading extraction of data from a database

Inventors: Jianchao He (Hangzhou, CN); Shouyuan Chen (Hangzhou, CN); Xiaoyong Deng (Hangzhou, CN)
Assignee: ALIBABA GROUP HOLDING LIMITED
G06F16/258
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 10,552,441
App. No.
15/154,867
Granted
Feb 4, 2020
Kind
B2
Abstract

A method of multithreading extraction of data from a database is provided. The method comprises: acquiring a set of primary key character strings, the primary key character strings being uniquely associated with the data to be extracted from the database; extracting, from the primary key character strings, a first character string and a second character string; generating a first integer and a second integer based on: a preset base number, positions of characters included in the first and second character strings; determining a node segment based on the first and second integers, the node segment being associated with a node segment integer; converting the node segment integer to a node segment character; and generating an extraction statement associated with a thread for the node segment character converted from the node segment integer. The extraction statement can then be transmitted to a database when the thread is executed.

Claims (80)

1. A method of multithreading extraction of data from a database, the method comprising:

acquiring a set of primary key character strings from the database by a processor, the primary key character strings being uniquely associated with the data to be extracted from the database;

extracting, from the primary key character strings, a first character string and a second character string, the first character string being associated with a maximum value among the primary key strings, and the second character string being associated with a minimum value among the primary key character strings;

generating a first integer and a second integer based on: a preset base number, positions of characters included in the first and second character strings;

determining a node segment based on the first and second integers, the node segment being associated with a node segment integer;

converting the node segment integer to a node segment character;

generating an extraction statement for the node segment character converted from the node segment integer; and

associating the extraction statement with a thread;

wherein the extraction statement is transmitted to the database to extract portions of the data for processing by the processor when the associated thread is executed by the processor.

2. The method of claim 1 , wherein generating the first and second integers comprises:

generating one or more first products by multiplying each value associated with each character of the first character string with the base number raised to a power according to a position of the each character in the first character string;

determining the first integer based on a summation of the first products;

generating one or more second products by multiplying each value associated with each character of the second character string with the base number raised to a power according to a position of the each character in the second character string; and

determining the second integer based on a summation of the second products.

3. The method of claim 1 , wherein the association between the values and the characters is based on American Standard Code for Information Interchange (ASCII), and wherein the base number is set based on a range of values defined under ASCII.

4. The method of claim 3 , wherein converting the node segment integer to the node segment character comprises:

performing successive division on the node segment integer to generate a quotient and a remainder; and

converting the remainder to the node segment character.

5. The method of claim 1 , wherein the base number is set based on a combined maximum value and a combined minimum value, the combined maximum value being associated with a character among the characters included in the first and second character strings, the combined minimum value being associated with a character among the characters included in the first and second character strings.

6. The method of claim 5 , wherein converting the node segment integer to the node segment character comprises:

performing successive division on the node segment integer to generate a quotient and a remainder;

generating a second integer based on the remainder and the combined minimum value; and

converting the second integer to the node segment character.

7. The method of claim 1 , wherein determining the node segment comprises:

determining whether a remainder of a division of a numeric range by a predetermined number of node segments is zero.

8. The method of claim 7 , wherein determining the node segment comprises:

responsive to determining that a remainder of a division of a numeric range by a predetermined number of node segments is not zero:

determining a first segment length based on an integer division of the numeric range by the predetermined number of node segments;

determining a second segment length based on the first segment length; and

determining a first number of node segments associated with the first segment length and a second number of node segments associated with the second segment length, a sum of the first and second number of node segments being equal to the predetermined number of node segments.

9. The method of claim 7 , wherein determining the node segment comprises:

determining whether the numeric range is smaller than the predetermined number of node segments; and

upon determining that the numeric range is smaller than the predetermined number of node segments, adjusting the predetermined number of node segments;

wherein the division of the numeric range is by the adjusted predetermined number of node segments.

10. A non-transitory computer readable medium storing instructions that are executable by one or more processors to cause the one or more processors to execute a method of multithreading extraction of data from a database, the method comprising:

acquiring a set of primary key character strings from the database, the primary key character strings being uniquely associated with the data to be extracted from the database;

extracting, from the primary key character strings, a first character string and a second character string, the first character string being associated with a maximum value among the primary key strings, and the second character string being associated with a minimum value among the primary key character strings;

generating a first integer and a second integer based on: a preset base number, positions of characters included in the first and second character strings;

determining a node segment based on the first and second integers, the node segment being associated with a node segment integer;

converting the node segment integer to a node segment character;

generating an extraction statement for the node segment character converted from the node segment integer; and

associating the extraction statement with a thread;

wherein the extraction statement is transmitted to the database to extract portions of the data for processing by a processor when the associated thread is executed by the processor.

11. The medium of claim 10 , wherein generating the first and second integers comprises:

generating one or more first products by multiplying each value associated with each character of the first character string with the base number raised to a power according to a position of the each character in the first character string;

determining the first integer based on a summation of the first products;

generating one or more second products by multiplying each value associated with each character of the second character string with the base number raised to a power according to a position of the each character in the second character string; and

determining the second integer based on a summation of the second products.

12. The medium of claim 10 , wherein the association between the values and the characters is based on American Standard Code for Information Interchange (ASCII), and wherein the base number is set based on a range of values defined under ASCII.

13. The medium of claim 12 , wherein converting the node segment integer to the node segment character comprises:

performing successive division on the node segment integer to generate a quotient and a remainder; and

converting the remainder to the node segment character.

14. The medium of claim 10 , wherein the base number is set based on a combined maximum value and a combined minimum value, the combined maximum value being associated with a character among the characters included in the first and second character strings, the combined minimum value being associated with a character among the characters included in the first and second character strings.

15. The medium of claim 14 , wherein converting the node segment integer to the node segment character comprises:

performing successive division on the node segment integer to generate a quotient and a remainder;

generating a second integer based on the remainder and the combined minimum value; and

converting the second integer to the node segment character.

16. The medium of claim 10 , wherein determining the node segment comprises:

determining whether a remainder of a division of a numeric range by a predetermined number of node segments is zero.

17. The medium of claim 16 , wherein determining the node segment comprises:

responsive to determining that a remainder of a division of a numeric range by a predetermined number of node segments is not zero:

determining a first segment length based on an integer division of the numeric range by the predetermined number of node segments;

determining a second segment length based on the first segment length; and

determining a first number of node segments associated with the first segment length and a second number of node segments associated with the second segment length, a sum of the first and second number of node segments being equal to the predetermined number of node segments.

18. The medium of claim 16 , wherein determining the node segment comprises:

determining whether the numeric range is smaller than the predetermined number of node segments; and

upon determining that the numeric range is smaller than the predetermined number of node segments, adjusting the predetermined number of node segments;

wherein the division of the numeric range is by the adjusted predetermined number of node segments.

19. A system for multithreading extraction of data from a database, the system comprising:

a memory device that stores a set of instructions; and

a hardware processor configured to execute the set of instructions to:

acquire a set of primary key character strings from the database, the primary key character strings being uniquely associated with the data to be extracted from the database;

extract, from the primary key character strings, a first character string and a second character string, the first character string being associated with a maximum value among the primary key strings, and the second character string being associated with a minimum value among the primary key character strings;

generate a first integer and a second integer based on: a preset base number, positions of characters included in the first and second character strings;

determine a node segment based on the first and second integers, the node segment being associated with a node segment integer;

convert the node segment integer to a node segment character;

generate an extraction statement for the node segment character converted from the node segment integer; and

associate the extraction statement with a thread;

wherein the extraction statement is transmitted to the database to extract portions of the data for processing by a processor when the associated thread is executed by the processor.

20. The system of claim 19 , wherein the base number is set based on a combined maximum value and a combined minimum value, the combined maximum value being associated with a character among the characters included in the first and second character strings, the combined minimum value being associated with a character among the characters included in the first and second character strings.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2026
From: ALIBABA GROUP HOLDING LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075478/0225 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 16, 2016
From: HE, JIANCHAO; CHEN, SHOUYUAN; DENG, XIAOYONG
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 038936/0091 →
Priority Claims (1)
CN 2015 1 0250681 · May 15, 2015 · national
Continuity (1)
Related Publication 20160335336A1 · Nov 17, 2016