# US 2023/0273875 A1 · Method for searching free blocks in bitmap data, and related components

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

- Number: US 2023/0273875 A1
- Document ID: US20230273875A1
- Status: Published application
- Kind: A1
- Application number: 18/011,510
- Filed: 2021-06-30
- Published: 2023-08-31
- Earliest claimed: 2020-08-28
- Assignees: Inspur Suzhou Intelligent Technology Co., Ltd.
- Applicants: Inspur Suzhou Intelligent Technology Co., Ltd.
- Inventors: Yanhong LI
- Web page: https://patentgrep.com/patent/US20230273875A1

## CPC

- G06F 12/0238: {Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory}
- G06F 16/2237: {Vectors, bitmaps or matrices}
- G06F 3/061: {Improving I/O performance}
- G06F 3/064: {Management of blocks}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 16/2228: {Indexing structures}
- G06F 2212/1016: Performance improvement
- G06F 2212/7204: Capacity control, e.g. partitioning, end-of-life degradation
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- 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

A method for searching free blocks in bitmap data. For free block search of one piece of bitmap data, by taking values of integer data obtained after bitmap data partitioning taken as subscripts, free block distribution condition information can be directly obtained by performing array value operation on a template array, so that great power consumption occupied by comparing and counting bits in the bitmap data one by one is avoided, and processing efficiency is greatly improved. Also provided are an apparatus for searching the free blocks in the bitmap data, a device, and a readable storage medium, which have the aforementioned beneficial effects.

## Claims

### Claim 1

A method for searching for free blocks in bitmap data, comprising:
determining a bitmap data block that is to be searched for free blocks;
dividing the bitmap data block into a plurality of integer data with a fixed length;
obtaining data arrangement characteristic information corresponding to integer data by performing, with a value of the integer data being used as an index, an array value solving operation on a template array; wherein values of all integer data with the fixed length are used as array indexes of the template array, and corresponding data arrangement characteristic information is used as data items of the template array; the data arrangement characteristic information comprises distribution information and a number of free blocks; and
obtaining a statistic of an overall distribution of free blocks in the bitmap data block according to data arrangement characteristic information corresponding to each of the integer data.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the data arrangement characteristic information comprises a data level and the number of free blocks, the data level indicates a data block release priority generated according to the distribution of free blocks, and is used as the distribution information;
after obtaining the statistic of the overall distribution of free blocks in the bitmap data block according to data arrangement characteristic information corresponding to each of the integer data, the method further comprises: releasing the bitmap data block according to the overall distribution of free blocks.

### Claim 3 (depends on 2)

The method according to claim 2, wherein dividing the bitmap data block into a plurality of integer data with a fixed length comprises:
dividing the bitmap data block every 16 bits to obtain a plurality of 16-bit integer data.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the data level and a corresponding determination rule comprise:
Level 1, more than 15 bits being 0;
Level 2, 8 or more successive bits being 0, and the successive bits of 0 being located on both sides;
Level 3, 8 or more successive bits being 0, and the successive bits of 0 being located in the middle;
Level 4, 4-7 successive bits being 0, and the successive bits of 0 being located on both sides;
Level 5, 4-7 successive bits being 0, and the successive bits of 0 being located in the middle;
Level 6, less than 4 successive bits being 0, and a total number of bits of 0 being not less than 10;
Level 7, less than 4 successive bits being 0, and the total number of bits of 0 being not less than 6;
Level 8, no successive bits being 0, and the total number of bits of 0 being not less than 6;
Level 9, no successive bits being 0, and the total number of bits of 0 being less than 6;
Level 10, 16 bits all being 1;
wherein 0 is a free block, 1 is a non-free block, and a data block release priority decreases from Level 1 to Level 10.

### Claim 5 (depends on 4)

The method according to claim 4, wherein releasing the bitmap data block according to the overall distribution of free blocks comprises:
for integer data belonging to Level 1, Level 2 and Level 3, selecting more than 8 successive bits of 0 for bit release;
for integer data belonging to Level 4 and Level 5, selecting more than 4 successive bits of 0 for bit release; and
for integer data belonging to Level 6, Level 7, Level 8, Level 9 and Level 10, searching for bits of 0 for bit release.

### Claim 6 (depends on 2)

The method according to claim 2, after dividing the bitmap data block into a plurality of integer data with a fixed length, the method further comprises:
selecting a designated number of data as sample data by sampling the integer data randomly.

### Claim 7 (depends on 2)

The method according to claim 2, wherein the obtaining data arrangement characteristic information corresponding to integer data comprises:
performing a weighted calculation, with a data block release priority corresponding to the data level being used as a weight, on the number of sample data corresponding to each data level, and using the obtained weighted value as the overall distribution of free blocks in the bitmap data block.

### Claim 8

(canceled)

### Claim 9 (depends on 1)

A computer device, comprising:
a memory for storing a computer program; and
a processor for executing the computer program to implement the method for searching for free blocks in bitmap data according to claim 1.

### Claim 10 (depends on 1)

A non-transitory readable storage medium, wherein the readable storage medium has stored thereon a program that, when executed by a processor, implements the method for searching for free blocks in bitmap data according to claim 1.

### Claim 11 (depends on 6)

The method according to claim 6, wherein the obtaining data arrangement characteristic information corresponding to integer data by performing, with a value of the integer data being used as an index, an array value solving operation on a template array comprises: obtaining data arrangement characteristic information corresponding to the sample data by performing, with the value of the sample data being used as the index, an array value solving operation on the template array.

### Claim 12 (depends on 6)

The method according to claim 6, wherein the obtaining a statistic of an overall distribution of free blocks in the bitmap data block according to data arrangement characteristic information corresponding to each of the integer data comprises: obtaining the statistic of the overall distribution of free blocks in the bitmap data block according to data arrangement characteristic information corresponding to each of the sample data.

### Claim 13 (depends on 7)

The method according to claim 7, wherein after obtaining statistics of the overall distribution of free blocks in the bitmap data block according to the data arrangement characteristic information corresponding to each integer data, the method further comprises:
calculating a ratio of a weighted value corresponding to each bitmap data block to the total number of free blocks in the bitmap data block;
releasing each bitmap data block in a descending order of the ratio.

### Claim 14 (depends on 1)

The method according to claim 1, wherein the bitmap data block is one of a data volume bitmap block and a metadata volume bitmap block.

### Claim 15 (depends on 1)

The method according to claim 1, wherein the obtaining a statistic of an overall distribution of free blocks in the bitmap data block comprises:
determining an adjacent integer data according to a dividing position of each integer data to determine the distribution of free blocks in the whole bitmap data block.

### Claim 16 (depends on 3)

The method according to claim 3, wherein the data arrangement characteristic information is 8-bit integer data, the first 4 bits of the 8-bit integer data indicate the data level, and the last 4 bits of the 8-bit integer data indicate the number of 0 in the 16-bit integer data.

### Claim 17 (depends on 13)

The method according to claim 13, wherein the determining a bitmap data block that is to be searched for free blocks comprises selecting the bitmap data block in the descending order of the ratio.

### Claim 18 (depends on 1)

The method according to claim 1, further comprising modifying the data block, wherein a minimum modification unit is bit, an allocation of block corresponds to modifying a bit from 0 to 1, and a recovery of block corresponds to modifying a bit from 1 to 0.

### Claim 19 (depends on 9)

The computer device according to claim 9, wherein the data arrangement characteristic information comprises a data level and the number of free blocks, the data level indicates a data block release priority generated according to the distribution of free blocks, and is used as the distribution information;
after obtaining the statistic of the overall distribution of free blocks in the bitmap data block according to data arrangement characteristic information corresponding to each of the integer data, the processor is further configured to implement steps of releasing the bitmap data block according to the overall distribution of free blocks.

### Claim 20 (depends on 19)

The computer device according to claim 19, wherein the processor is further configured to implement steps of:
dividing the bitmap data block every 16 bits to obtain a plurality of 16-bit integer data.

### Claim 21 (depends on 20)

The computer device according to claim 20, wherein the data level and a corresponding determination rule comprise:
Level 1, more than 15 bits being 0;
Level 2, 8 or more successive bits being 0, and the successive bits of 0 being located on both sides;
Level 3, 8 or more successive bits being 0, and the successive bits of 0 being located in the middle;
Level 4, 4-7 successive bits being 0, and the successive bits of 0 being located on both sides;
Level 5, 4-7 successive bits being 0, and the successive bits of 0 being located in the middle;
Level 6, less than 4 successive bits being 0, and a total number of bits of 0 being not less than 10;
Level 7, less than 4 successive bits being 0, and the total number of bits of 0 being not less than 6;
Level 8, no successive bits being 0, and the total number of bits of 0 being not less than 6;
Level 9, no successive bits being 0, and the total number of bits of 0 being less than 6;
Level 10, 16 bits all being 1;
wherein 0 is a free block, 1 is a non-free block, and a data block release priority decreases from Level 1 to Level 10.
