IP Library › Granted Patent US 11,249,969
Granted Patent B2
US 11,249,969 · App. 16/748,252 · Granted Feb 15, 2022

Data storage method and apparatus, and storage medium

Inventors: Jieshan Bi (Shenzhen, CN); Chaoqiang Zhong (Shenzhen, CN); Ming Lin (Shenzhen, CN); Zhenfeng Ji (Xi'an, CN)
Assignee: HUAWEI TECHOLOGIES CO., LTD.
G06F16/2237G06F16/2264G06F16/2282G06F16/278G06F16/284
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,249,969
App. No.
16/748,252
Granted
Feb 15, 2022
Kind
B2
Abstract

A data storage method includes obtaining at least one data record, each data record includes one carrier identifier and at least one label value, the at least one data record is stored in a data table, and the data table is used to record a correspondence between a carrier identifier and a label value; and creating a bitmap index corresponding to the at least one data record, where the bitmap index includes at least one bitmap; each bitmap corresponds to one label value; each bitmap includes at least one bitmap position, and each bitmap position is used to record whether a carrier corresponding to one carrier identifier has a label value corresponding to a current bitmap.

Claims (64)

1. A data storage method comprising:

obtaining at least one data record from a data table, wherein each data record comprises one carrier identifier and at least one label value which corresponds to the carrier identifier;

creating a bitmap index corresponding to the at least one data record, wherein the bitmap index comprises at least one bitmap, wherein each bitmap corresponds to one label value and comprises at least one bitmap position, and wherein each bitmap position in a bitmap of the at least one bitmap records whether a carrier corresponding to one carrier identifier has a label value corresponding to the bitmap; and

dividing the data table into M data partitions based on a first range of carrier identifiers, wherein each data partition comprises at least one sub-data table, wherein a carrier identifier set corresponding to each data partition is the first range, and wherein there is no intersection set between carrier identifier sets corresponding to different data partitions; and

determining N bitmap index partitions based on the M data partitions, wherein each bitmap index partition comprises at least one sub-bitmap, wherein a carrier identifier range corresponding to each bitmap index partition is greater than or equal to the first range, wherein there is no intersection set between carrier identifier sets corresponding to different bitmap index partitions, wherein M and N are positive integers, wherein N is less than or equal to M, and wherein N is greater than or equal to 2.

2. The data storage method of claim 1 , wherein before obtaining at least one data record, the data storage method further comprises:

presetting a label definition table comprising a plurality of preset label values; and

generating the data table based on to-be-stored source data and the label definition table.

3. The data storage method of claim 2 , wherein the label definition table further comprises label configuration information, wherein the label configuration information indicates that the bitmap resides in a memory, and wherein the data storage method further comprises loading, to the memory based on the label configuration information, the bitmap.

4. The data storage method of claim 1 , further comprising:

obtaining new data, wherein a carrier identifier or a label value in a new correspondence comprised in the new data is new; and

updating the bitmap index based on the new correspondence.

5. The data storage method of claim 4 , further comprising:

determining a bitmap index partition to which the carrier identifier in the new correspondence belongs; and

updating, in the bitmap index partition, the label value in the new correspondence or updating a bitmap corresponding to the label value in the new correspondence.

6. The data storage method of claim 1 , further comprising dividing the bitmap index into a plurality of bitmap index partitions, wherein each bitmap index partition comprises at least one sub-bitmap and corresponds to a carrier identifier set, and wherein there is no intersection set between carrier identifier sets corresponding to different bitmap index partitions.

7. The data storage method of claim 6 , wherein same bitmap positions in different bitmaps in the bitmap index correspond to a same carrier identifier, wherein same bitmap positions in different sub-bitmaps in each bitmap index partition correspond to a same carrier identifier, and wherein same bitmap positions in different sub-bitmaps in different bitmap index partitions correspond to different carrier identifiers.

8. The data storage method of claim 6 , further comprising:

receiving a data query request comprising at least one target label value;

determining, from the bitmap index partitions, at least one target sub-bitmap corresponding to the at least one target label value;

determining an identifier of a target carrier corresponding to a target bitmap position comprised in each of the at least one target sub-bitmap;

querying the data table for a label value of the target carrier; and

feeding back the label value of the target carrier.

9. A data storage apparatus comprising:

a storage configured to store a program code; and

a processor coupled to the storage and configured to execute the program code to cause the data storage apparatus to:

obtain at least one data record from a data table, wherein each data record comprises one carrier identifier and at least one label value which corresponds to the carrier identifier;

create a bitmap index corresponding to the at least one data record, wherein the bitmap index comprises at least one bitmap, wherein each bitmap corresponds to one label value and comprises at least one bitmap position, and wherein each bitmap position in a bitmap of the at least one bitmap records whether a carrier corresponding to one carrier identifier has a label value corresponding to the bitmap;

divide the data table into M data partitions based on a first range of carrier identifiers, wherein each data partition comprises at least one sub-data table, wherein a carrier identifier set corresponding to each data partition is the first range, and wherein there is no intersection set between carrier identifier sets corresponding to different data partitions; and

determine N bitmap index partitions based on the M data partitions, wherein each bitmap index partition comprises at least one sub-bitmap, wherein a carrier identifier range corresponding to each bitmap index partition is greater than or equal to the first range, wherein there is no intersection set between carrier identifier sets corresponding to different bitmap index partitions, wherein M and N are positive integers, wherein N is less than or equal to M, and wherein N is greater than or equal to 2.

10. The data storage apparatus of claim 9 , wherein before obtaining the data record, the processor is further configured to execute the program code to cause the data storage apparatus to:

preset a label definition table comprising a plurality of preset label values; and

generate the data table based on to-be-stored source data and the label definition table.

11. The data storage apparatus of claim 10 , wherein the label definition table further comprises label configuration information, wherein the label configuration information indicates that the bitmap resides in a memory, and wherein the processor is further configured to execute the program code to cause the data storage apparatus to load, to the memory based on the label configuration information, the bitmap.

12. The data storage apparatus of claim 9 , wherein the processor is further configured to execute the program code to cause the data storage apparatus to divide the bitmap index into a plurality of bitmap index partitions, wherein each bitmap index partition comprises at least one sub-bitmap and corresponds to a carrier identifier set, and wherein there is no intersection set between carrier identifier sets corresponding to different bitmap index partitions.

13. The data storage apparatus of claim 12 , wherein same bitmap positions in different bitmaps in the bitmap index correspond to a same carrier identifier, wherein same bitmap positions in different sub-bitmaps in each bitmap index partition correspond to a same carrier identifier, and wherein same bitmap positions in different sub-bitmaps in different bitmap index partitions correspond to different carrier identifiers.

14. The data storage apparatus of claim 12 , wherein the processor is further configured to execute the program code to cause the data storage apparatus to:

receive a data query request comprising at least one target label value;

determine, from the bitmap index partitions, at least one target sub-bitmap corresponding to the at least one target label value;

determine an identifier of a target carrier corresponding to a target bitmap position comprised in each of the at least one target sub-bitmap;

query the data table for a label value of the target carrier; and

feed back the label value of the target carrier.

15. The data storage apparatus of claim 9 , wherein the processor is further configured to execute the program code to cause the data storage apparatus to:

obtain new data, wherein a carrier identifier or a label value in a new correspondence comprised in the new data is new; and

update the bitmap index based on the new correspondence.

16. The data storage apparatus of claim 15 , wherein the processor is further configured to execute the program code to cause the data storage apparatus to:

determine a bitmap index partition to which the carrier identifier in the new correspondence belongs; and

update, in the bitmap index partition, the label value in the new correspondence or update a bitmap corresponding to the label value in the new correspondence.

17. A computer program product comprising computer-executable instructions that are stored on a non-transitory computer-readable medium and that, when executed by a processor, cause a data storage apparatus to:

obtain at least one data record from a data table, wherein each data record comprises one carrier identifier and at least one label value which corresponds to the carrier identifier;

create a bitmap index corresponding to the at least one data record, wherein the bitmap index comprises at least one bitmap, wherein each bitmap corresponds to only one label value and comprises at least one bitmap position, and wherein each bitmap position in a bitmap of the at least one bitmap records whether a carrier corresponding to one carrier identifier has a label value corresponding to the bitmap;

divide the data table into M data partitions based on a first range of carrier identifiers, wherein each data partition comprises at least one sub-data table, wherein a carrier identifier set corresponding to each data partition is the first range, and wherein there is no intersection set between carrier identifier sets corresponding to different data partitions; and

determine N bitmap index partitions based on the M data partitions, wherein each bitmap index partition comprises at least one sub-bitmap, wherein a carrier identifier range corresponding to each bitmap index partition is greater than or equal to the first range, wherein there is no intersection set between carrier identifier sets corresponding to different bitmap index partitions, wherein M and N are positive integers, wherein N is less than or equal to M, and wherein N is greater than or equal to 2.

18. The computer program product of claim 17 , wherein the computer-executable instructions, when executed by the processor, further cause the data storage apparatus to divide the bitmap index into a plurality of bitmap index partitions, wherein each bitmap index partition comprises at least one sub-bitmap and corresponds to a carrier identifier set, and wherein there is no intersection set between carrier identifier sets corresponding to different bitmap index partitions.

19. The computer program product of claim 18 , wherein same bitmap positions in different bitmaps in the bitmap index correspond to a same carrier identifier, wherein same bitmap positions in different sub-bitmaps in each bitmap index partition correspond to a same carrier identifier, and wherein same bitmap positions in different sub-bitmaps in different bitmap index partitions correspond to different carrier identifiers.

20. The computer program product of claim 18 , wherein the computer-executable instructions, when executed by the processor, further cause the data storage apparatus to:

receive a data query request comprising at least one target label value;

determine, from the bitmap index partitions, at least one target sub-bitmap corresponding to the at least one target label value;

determine an identifier of a target carrier corresponding to a target bitmap position comprised in each of the at least one target sub-bitmap;

query the data table for a label value of the target carrier; and

feed back the label value of the target carrier.

21. The computer program product of claim 17 , wherein the computer-executable instructions, when executed by the processor, further cause the data storage apparatus to:

preset a label definition table comprising a plurality of preset label values; and

generate the data table based on to-be-stored source data and the label definition table.

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 Mar 25, 2020
From: BI, JIESHAN; ZHONG, CHAOQIANG; LIN, MING; JI, ZHENFENG
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 052220/0571 →
Continuity (2)
Continuation PCTCN2017095893 · Aug 3, 2017
Related Publication 20200159708A1 · May 21, 2020
Cited By (1)
US 12,271,767