# US 2021/0286791 A1 · Method and apparatus for processing label data, device, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0286791 A1
- Document ID: US20210286791A1
- Status: Published application
- Kind: A1
- Application number: 17/334,354
- Filed: 2021-05-28
- Published: 2021-09-16
- Earliest claimed: 2020-09-27
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science and Technology Co., Ltd.
- Inventors: Weilong Quan; Dong Wang; Yuyang Zhao
- Web page: https://patentgrep.com/patent/US20210286791A1

## CPC

- G06F 16/2237: {Vectors, bitmaps or matrices}
- G06F 16/258: {Data format conversion from or to a database}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/24556: {Aggregation; Duplicate elimination}
- G06F 16/248: Presentation of query results
- G06F 16/285: {Clustering or classification}
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

The present disclosure provides a method and an apparatus for processing label data, a device and a storage medium, relates to a field of big data processing technology. The technical solution includes determining a segment identifier of a user based on user identification information, determining a bucket identifier of the user based on the segment identifier, storing label data of the user into a data bucket associated with the bucket identifier and aggregating the label data in the data bucket to bitmap data for storage.

## Claims

### Claim 1

A method for processing label data, and comprising:
determining a segment identifier of a user based on user identification information;
determining a bucket identifier of the user based on the segment identifier;
storing label data of the user into a data bucket associated with the bucket identifier and aggregating the label data in the data bucket to bitmap data for storage.

### Claim 2 (depends on 1)

The method of claim 1, wherein the determining the segment identifier of the user based on the user identification information comprises:
determining a user number in a single data bucket based on an estimated user total number and a bucket total number of a database; and
determining the segment identifier based on the user identification information and the user number.

### Claim 3 (depends on 1)

The method of claim 1, wherein the determining the bucket identifier of the user based on the segment identifier comprises:
determining the bucket identifier based on the segment identifier and a bucket total number of a database.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
determining a user identifier value as the user identification information, wherein the user identifier value is a unique integer, and the user identifier value and user identifier values of other users are consecutive.

### Claim 5 (depends on 4)

The method of claim 4, wherein the determining the user identifier value comprises:
determining a latest user identifier value in a database based on metadata of the database; and
determining the user identifier value based on the latest user identifier value, wherein the user identifier value and the latest user identifier value are consecutive.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
generating at least one label dimension set based on access frequencies of label dimensions, wherein the at least one label dimension set comprises at least one label dimension; and
generating a materialized view of the at least one label dimension set based on bitmap data of the at least one label dimension.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
determining a data table satisfying a screening condition as a candidate data table in response to a label query request carrying the screening condition, wherein the data table comprises a bitmap data table and a materialized view table;
determining attribute information of each candidate data table, wherein the attribute information comprises at least one of machine room information, a number of dimensions and a number of label records;
selecting a target data table from one or more candidate data tables based on the attribute information of each candidate data table; and
determining a label query result based on the target data table.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
determining query results of at least two data buckets in a database based on bitmap data of the at least two data buckets in response to a label query request; and
gathering the query results of the at least two data buckets to obtain a label query result.

### Claim 9

An electronic device, comprising:
at least one processor; and
a memory communicatively connected to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor to cause the at least one processor to perform the method for processing label data, and comprising:
determining a segment identifier of a user based on user identification information;
determining a bucket identifier of the user based on the segment identifier;
storing label data of the user into a data bucket associated with the bucket identifier and aggregating the label data in the data bucket to bitmap data for storage.

### Claim 10 (depends on 9)

The electronic device of claim 9, wherein the determining the segment identifier of the user based on the user identification information comprises:
determining a user number in a single data bucket based on an estimated user total number and a bucket total number of a database; and
determining the segment identifier based on the user identification information and the user number.

### Claim 11 (depends on 9)

The electronic device of claim 9, wherein the determining the bucket identifier of the user based on the segment identifier comprises:
determining the bucket identifier based on the segment identifier and a bucket total number of a database.

### Claim 12 (depends on 9)

The electronic device of claim 9, wherein the processor is further caused to perform the following:
determining a user identifier value as the user identification information, wherein the user identifier value is a unique integer, and the user identifier value and user identifier values of other users are consecutive.

### Claim 13 (depends on 12)

The electronic device of claim 12, wherein the determining the user identifier value comprises:
determining a latest user identifier value in a database based on metadata of the database; and
determining the user identifier value based on the latest user identifier value, wherein the user identifier value and the latest user identifier value are consecutive.

### Claim 14 (depends on 9)

The electronic device of claim 9, wherein the processor is further caused to perform the following:
generating at least one label dimension set based on access frequencies of label dimensions, wherein the at least one label dimension set comprises at least one label dimension; and
generating a materialized view of the at least one label dimension set based on bitmap data of the at least one label dimension.

### Claim 15 (depends on 14)

The electronic device of claim 14, wherein the processor is further caused to perform the following:
determining a data table satisfying a screening condition as a candidate data table in response to a label query request carrying the screening condition, wherein the data table comprises a bitmap data table and a materialized view table;
determining attribute information of each candidate data table, wherein the attribute information comprises at least one of machine room information, a number of dimensions and a number of label records;
selecting a target data table from one or more candidate data tables based on the attribute information of each candidate data table; and
determining a label query result based on the target data table.

### Claim 16 (depends on 9)

The electronic device of claim 9, wherein the processor is further caused to perform the following:
determining query results of at least two data buckets in a database based on bitmap data of the at least two data buckets in response to a label query request; and
gathering the query results of the at least two data buckets to obtain a label query result.

### Claim 17

A non-transitory computer readable storage medium, having computer instructions stored therein, wherein the computer instructions are configured to cause a computer to perform the method for processing label data, and comprising:
determining a segment identifier of a user based on user identification information;
determining a bucket identifier of the user based on the segment identifier;
storing label data of the user into a data bucket associated with the bucket identifier and aggregating the label data in the data bucket to bitmap data for storage.

### Claim 18 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the determining the segment identifier of the user based on the user identification information comprises:
determining a user number in a single data bucket based on an estimated user total number and a bucket total number of a database; and
determining the segment identifier based on the user identification information and the user number.

### Claim 19 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the determining the bucket identifier of the user based on the segment identifier comprises:
determining the bucket identifier based on the segment identifier and a bucket total number of a database.

### Claim 20 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the computer instructions are configured to cause the computer to perform the following:
determining a user identifier value as the user identification information, wherein the user identifier value is a unique integer, and the user identifier value and user identifier values of other users are consecutive.
