Bitmap Index for Label-Based Data Query Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data storage methods face inefficiencies in querying data based on label values, as they typically require scanning through rows in a data table, leading to low query performance when querying by label values or combinations thereof.
Innovation Solution
A data storage method that creates a bitmap index, where each bitmap corresponds to a label value and includes positions indicating the presence or absence of corresponding carrier identifiers, allowing for direct determination of data based on label values during queries.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a data table is used to store correspondence between carrier identifiers and label values, then data can be stored in a structured format, but query efficiency deteriorates when querying by label value requiring row-by-row scanning
Solution Approach 1:
The patent creates bitmap indexes in advance for each label value, pre-processing the data into a compact bitmap representation. When a query by label value is needed, the pre-computed bitmap index allows direct retrieval without scanning all rows, thus resolving the contradiction between structured storage and query efficiency
Solution Approach 2:
The patent creates a bitmap copy of the carrier identifier information for each label value. Instead of scanning the original data table rows, the system uses the copied bitmap representation to quickly identify which carriers have the queried label value, significantly reducing query time while maintaining the original structured storage
2Productivity
If bitmap indexes are created for each label value to improve query efficiency, then data query efficiency improves, but device complexity increases due to additional index structures
Solution Approach 1:
The patent transforms the data representation from traditional row-based storage to bitmap-based storage, changing the parameter of data organization. Each carrier identifier is represented as a bit position in bitmaps corresponding to different label values, simplifying the query operation to bitmap intersection while maintaining manageable structure through systematic organization
Data Source
Figure 1~5
Figure 6~7
Figure 8~9
AI summary
Embodiments of this application provide a data storage method and apparatus, and a storage medium, and relate to the field of optical information processing technologies. The method includes: obtaining at least one data record, where 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. A problem of low data query efficiency in a related technology is resolved, and the data query efficiency can be improved.