IP Library Granted Patent US 11,868,332
Granted Patent B2
US 11,868,332 · App. 17/236,573 · Granted Jan 9, 2024

Data index establishment method, and apparatus

Inventors: Wenli Zhou (Xi'an, CN); Mingchang Wei (Shenzhen, CN); Jiangbo Liu (Xi'an, CN)
Assignee: HUAWEI CLOUD COMPUTING TECHNOLOGIES CO., LTD.
G06F16/2282
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,868,332
App. No.
17/236,573
Granted
Jan 9, 2024
Kind
B2
Abstract

A data index establishment method obtains M raw data segments and a first-layer mapping relationship through segment fitting on raw data in a raw data table, and further obtains N first key segments and a second-layer mapping relationship through segment fitting on a first key of each raw data segment. In a subsequent data query process, a multi-layer mapping relationship is input from a to-be-queried key sequentially in descending order, until a location of the to-be-queried key in the raw data table is located.

Claims (55)

1. A data method for index establishment and comprising:

obtaining a raw data table comprising a plurality of pieces of raw data, wherein the pieces comprise first keys and values;

segmenting the pieces based on the first keys to obtain M raw data segments and M first mapping relationships, wherein the M first mapping relationships indicate first correspondences between M first keys and locations of the M first keys in the raw data table;

obtaining the M first keys;

segmenting the M first keys to obtain N first key segments and N second mapping relationships;

obtaining a to-be-queried key;

determining, based on the to-be-queried key and the N second mapping relationships, a first mapping relationship corresponding to the to-be-queried key; and

obtaining, based on the to-be-queried key and the first mapping relationship, a first location of the to-be-queried key in the raw data table,

wherein the N second mapping relationships indicate second correspondences between the M first keys and first identifiers of the M first mapping relationships.

2. The method of claim 1 , wherein the M first mapping relationships comprise monotone functions, wherein the first keys are inputs of the monotone function, and wherein the locations are outputs of the monotone function.

3. The method of claim 1 , wherein the N second mapping relationships comprise a monotone function, wherein the M first keys are inputs of the monotone function, and wherein the first identifiers are outputs of the monotone function.

4. The method of claim 1 , further comprising:

obtaining N first keys of the N first key segments; and

segmenting the N first keys to obtain J first keys and J third mapping relationships,

wherein the J third mapping relationships indicate third correspondences between the M first keys and second identifiers of the N second mapping relationships.

5. The method of claim 1 , further comprising:

further obtaining the raw data table from a database; and

storing the M first mapping relationships and the N second mapping relationships into a memory.

6. A computing device comprising:

a memory configured to store instructions; and

a processor coupled to the memory and configured to:

obtain a raw data table comprising a plurality of pieces of raw data, wherein the pieces comprise first keys and values;

segment the pieces based on the first keys to obtain M raw data segments and M first mapping relationships, wherein the M first mapping relationships indicate first correspondences between M first keys and locations of the M first keys in the raw data table;

obtain the M first keys;

segment the M first keys to obtain N first key segments and N second mapping relationships;

obtain a to-be-queried key;

determine, based on the to-be-queried key and the N second mapping relationships, a first mapping relationship corresponding to the to-be-queried key; and

obtain, based on the to-be-queried key and the first mapping relationship, a first location of the to-be-queried key in the raw data table,

wherein the N second mapping relationships indicate second correspondences between the M first keys and first identifiers of the M first mapping relationships.

7. The computing device of claim 6 , wherein the M first mapping relationships comprise monotone functions, wherein the first keys are inputs of the monotone function, and wherein the locations are outputs of the monotone function.

8. The computing device of claim 6 , wherein the N second mapping relationships comprise a monotone function, wherein the M first keys are inputs of the monotone function, and wherein the first identifiers are outputs of the monotone function.

9. The computing device of claim 6 , wherein the processor is further configured to:

obtain N first keys of the N first key segments;

segment the N first keys to obtain J first keys and J third mapping relationships, wherein the J third mapping relationships indicate third correspondences between the M first keys and second identifiers of the N second mapping relationships; and

store the J third mapping relationships into the memory.

10. The computing device of claim 6 , wherein the processor is further configured to:

further obtain the raw data table from a database; and

store the M first mapping relationships and the N second mapping relationships into the memory.

11. A computer program product comprising instructions that are stored on a non-transitory computer-readable medium and that, when executed by a processor, cause a computing device to:

obtain a raw data table comprising a plurality of pieces of raw data, wherein the pieces comprise first keys and values;

segment the pieces based on the first keys to obtain M raw data segments and M first mapping relationships, wherein the M first mapping relationships indicate first correspondences between M first keys and locations of the M first keys in the raw data table;

obtain the M first keys;

segment the M first keys to obtain N first key segments and N second mapping relationships;

obtain a to-be-queried key;

determine, based on the to-be-queried key and the N second mapping relationships, a first mapping relationship corresponding to the to-be-queried key; and

obtain, based on the to-be-queried key and the first mapping relationship, a first location of the to-be-queried key in the raw data table,

wherein the N second mapping relationships indicate second correspondences between the M first keys and first identifiers of the M first mapping relationships.

12. The computer program product of claim 11 , wherein the M first mapping relationships comprise monotone functions, wherein the first keys are inputs of the monotone function, and wherein the locations are outputs of the monotone function.

13. The computer program product of claim 11 , wherein the N second mapping relationships comprise a monotone function, wherein the M first keys are inputs of the monotone function, and wherein the first identifiers are outputs of the monotone function.

14. The computer program product of claim 11 , wherein the instructions further cause the computing device to:

obtain N first keys of the N first key segments; and

segment the N first keys to obtain J first keys and J third mapping relationships, wherein the J third mapping relationships indicate third correspondences between the M first keys and second identifiers of the N second mapping relationships.

15. The computer program product of claim 14 , wherein the instructions further cause the computing device to store the J third mapping relationships into a memory.

16. The computer program product of claim 11 , wherein the instructions further cause the computing device to further obtain the raw data table from a database.

17. The computer program product of claim 16 , wherein the instructions further cause the computing device to store the M first mapping relationships and the N second mapping relationships into a memory.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 1, 2022
From: HUAWEI TECHNOLOGIES CO., LTD.
To: HUAWEI CLOUD COMPUTING TECHNOLOGIES CO., LTD.
Reel/Frame 059267/0088 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2021
From: ZHOU, WENLI; WEI, MINGCHANG; LIU, JIANGBO
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 055992/0259 →