IP Library › Granted Patent US 12,638,969
Granted Patent B2
US 12,638,969 · App. 18/677,357 · Granted May 26, 2026

Data compression method and flash memory device

Inventors: Juming Liao (Shenzhen, CN); Xueming Cao (Shenzhen, CN); Yuanpeng Ma (Shenzhen, CN); Ying Yang (Shenzhen, CN)
Assignee: DAPUSTOR CORPORATION
G06F3/0608G06F3/0659G06F3/0679G11C2207/102
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 12,638,969
App. No.
18/677,357
Granted
May 26, 2026
Kind
B2
Abstract

A data compression method is disclosed. The data compression method is applied to a flash memory device having a flash memory medium. The data compression method includes: reading at least two pieces of cold data in the flash memory medium; compressing the at least two pieces of cold data in the flash medium, so as to obtain at least two pieces of compressed data; splicing the at least two pieces of compressed data, so as to generate at least one write unit; and writing each of the at least one write unit into the flash memory medium.

Claims (60)

1 . A method of data compression, applied to a flash memory device comprising a flash medium, the method comprising:

reading at least two pieces of cold data in the flash medium;

compressing the at least two pieces of cold data in the flash medium to obtain at least two pieces of compressed data, respectively, wherein the at least two pieces of compressed data comprise a first piece of compress data and a second piece of compressed data;

concatenating the at least two pieces of compressed data to generate at least one write unit such that the first piece of compressed data is connected to the second piece of compressed data in one of the at least one write unit without invalid data padding in between the first and second pieces of compressed data, wherein each write unit comprises a header file comprising a logical address, a data length, and a starting position of each piece of compressed data within the corresponding write unit; and

writing each of the at least one write unit into the flash medium.

2 . The method according to claim 1 , wherein reading the at least two pieces of cold data in the flash medium comprises:

acquiring a cold data table;

determining, based on the cold data table, multiple pieces of valid cold data within the cold data table; and

reading, from the multiple pieces of valid cold data, at least two pieces of valid cold data in the flash medium.

3 . The method according to claim 2 , wherein determining, based on the cold data table, the multiple pieces of valid cold data within the cold data table comprises:

for each piece of cold data in the cold data table, searching for a logical address of the piece of cold data in the cold data table; and

determining the piece of cold data as a piece of valid cold data if the piece of cold data meets a preset condition, wherein the preset condition comprises: the logical address belonging to valid logical addresses.

4 . The method according to claim 3 , further comprising determining whether the logical address belongs to the valid logical addresses at least by:

determining that the logical address belongs to the valid logical addresses if a physical address corresponding to the logical address of the piece of cold data is valid, the logical address of the piece of cold data falls within a range of logical addresses corresponding to user data in the flash medium, and the logical address of the piece of cold data has not been processed by an erase command after the piece of cold data has been written in the flash medium.

5 . The method according to claim 1 , wherein the flash memory device comprises a high-speed cache module, and reading the at least two pieces of cold data in the flash medium comprises:

writing the at least two pieces of cold data that have been written into the flash medium to the high-speed cache module according to a data granularity size of each piece of cold data when being written to the flash medium, wherein one piece of cold data corresponds to one data granularity size.

6 . The method according to claim 5 , wherein compressing the at least two pieces of cold data in the flash medium to obtain the at least two pieces of compressed data, respectively, comprises:

acquiring the at least two pieces of cold data from the high-speed cache module; and

compressing the at least two pieces of cold data based on a data compression command, thereby obtaining the at least two pieces of compressed data.

7 . The method according to claim 6 , wherein concatenating the at least two pieces of compressed data to generate the at least one write unit comprises:

assembling the at least two pieces of compressed data based on a data reassembly command to generate the at least one write unit.

8 . The method according to claim 7 , wherein the at least two pieces of compressed data comprises a third piece of compressed data and a fourth piece of compressed data, and assembling the at least two pieces of compressed data based on the data reassembly command to generate the at least one write unit comprises:

concatenating the third piece of compressed data with the fourth piece of compressed data to obtain a concatenation unit, and determining whether a total data length of the concatenation unit is greater than a data length of one write unit;

if the total data length of the concatenation unit is greater than the data length of one write unit, discarding the fourth piece of compressed data from the concatenation unit, considering the concatenation unit including the third piece of compressed data as one write unit, and using the fourth piece of compressed data as a piece of compressed data in a new concatenation unit to continue the concatenation; and

if the total data length of the concatenation unit is not greater than the data length of one write unit, continuing to concatenate another piece of compressed data to the concatenation unit until the total data length of the concatenation unit is greater than the total data length of one write unit.

9 . The method according to claim 8 , further comprising:

after discarding the fourth piece of compressed data, and if the total data length of the concatenation unit is less than the total data length of one write unit, filling the concatenation unit with dummy data to make the total data length of the concatenation unit equal to the total data length of one write unit.

10 . The method according to claim 7 , further comprising:

when reading data in the flash medium, and if the data is located in a write unit, decompressing the write unit, and determining, based on a header file of the write unit, a starting position and a data length of the data to read compressed data within the write unit.

11 . A flash memory device, comprising:

a flash medium; and

a processor configured to perform operations comprising:

reading at least two pieces of cold data in the flash medium;

compressing the at least two pieces of cold data in the flash medium to obtain at least two pieces of compressed data, respectively, wherein the at least two pieces of compressed data comprise a first piece of compress data and a second piece of compressed data;

concatenating the at least two pieces of compressed data to generate at least one write unit such that the first piece of compressed data is connected to the second piece of compressed data in one of the at least one write unit without invalid data padding in between the first and second pieces of compressed data, wherein each write unit comprises a header file comprising a logical address, a data length, and a starting position of each piece of compressed data within the corresponding write unit; and

writing each of the at least one write unit into the flash medium.

12 . The flash memory device according to claim 11 , further comprising:

a high-speed cache module configured to store the at least two pieces of cold data read from the flash medium.

13 . The flash memory device according to claim 11 , wherein reading the at least two pieces of cold data in the flash medium comprises:

acquiring a cold data table;

determining, based on the cold data table, multiple pieces of valid cold data within the cold data table; and

reading, from the multiple pieces of valid cold data, at least two pieces of valid cold data in the flash medium.

14 . The flash memory device according to claim 13 , wherein determining, based on the cold data table, the multiple pieces of valid cold data within the cold data table comprises:

for each piece of cold data in the cold data table, searching for a logical address of the piece of cold data in the cold data table; and

determining the piece of cold data as a piece of valid cold data if the piece of cold data meets a preset condition, wherein the preset condition comprises: the logical address belonging to valid logical addresses.

15 . The flash memory device according to claim 14 , wherein the operations further comprise determining whether the logical address belongs to the valid logical addresses at least by:

determining that the logical address belongs to the valid logical addresses if a physical address corresponding to the logical address of the piece of cold data is valid, the logical address of the piece of cold data falls within a range of logical addresses corresponding to user data in the flash medium, and the logical address of the piece of cold data has not been processed by an erase command after the piece of cold data has been written in the flash medium.

16 . The flash memory device according to claim 12 , wherein reading the at least two pieces of cold data in the flash medium comprises:

writing the at least two pieces of cold data that have been written into the flash medium to the high-speed cache module according to a data granularity size of each piece of cold data when being written to the flash medium, wherein one piece of cold data corresponds to one data granularity size.

17 . The flash memory device according to claim 16 , wherein compressing the at least two pieces of cold data in the flash medium to obtain the at least two pieces of compressed data, respectively, comprises:

acquiring the at least two pieces of cold data from the high-speed cache module; and

compressing the at least two pieces of cold data based on a data compression command, thereby obtaining the at least two pieces of compressed data.

18 . The flash memory device according to claim 17 , wherein concatenating the at least two pieces of compressed data to generate the at least one write unit comprises:

assembling the at least two pieces of compressed data based on a data reassembly command to generate the at least one write unit.

19 . The flash memory device according to claim 18 , wherein the at least two pieces of compressed data comprises a third piece of compressed data and a fourth piece of compressed data, and assembling the at least two pieces of compressed data based on the data reassembly command to generate the at least one write unit comprises:

concatenating the third piece of compressed data with the fourth piece of compressed data to obtain a concatenation unit, and determining whether a total data length of the concatenation unit is greater than a data length of one write unit;

if the total data length of the concatenation unit is greater than the data length of one write unit, discarding the fourth piece of compressed data from the concatenation unit, considering the concatenation unit including the third piece of compressed data as one write unit, and using the fourth piece of compressed data as a piece of compressed data in a new concatenation unit to continue the concatenation; and

if the total data length of the concatenation unit is not greater than the data length of one write unit, continuing to concatenate another piece of compressed data to the concatenation unit until the total data length of the concatenation unit is greater than the total data length of one write unit.

20 . The flash memory device according to claim 19 , further comprising:

after discarding the fourth piece of compressed data, and if the total data length of the concatenation unit is less than the total data length of one write unit, filling the concatenation unit with dummy data to make the total data length of the concatenation unit equal to the total data length of one write unit.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 29, 2024
From: LIAO, JUMING; CAO, XUEMING; MA, YUANPENG; YANG, YING
To: DAPUSTOR CORPORATION
Reel/Frame 067553/0710 →
Priority Claims (1)
CN 202210594147.2 · May 27, 2022 · national
Continuity (2)
Continuation PCTCN2023093999 · May 12, 2023
Related Publication 20240311005A1 · Sep 19, 2024
References Cited (16)
US 11216186B1 · Armangau · 2022 [cited by examiner]
US 20130073798A1 · Kang · 2013 [cited by examiner]
US 20140281129A1 · Heller · 2014 [cited by examiner]
US 20180032435A1 · Parker · 2018 [cited by examiner]
US 20180152733A1 · Karaje · 2018 [cited by examiner]
US 20180267746A1 · Itoh · 2018 [cited by examiner]
US 20200097181A1 · Volvovski · 2020 [cited by examiner]
CN 107870728A · 2018 [cited by applicant]
CN 110908608A · 2020 [cited by applicant]
CN 111125047A · 2020 [cited by applicant]
CN 114356225A · 2022 [cited by applicant]
CN 114968837A · 2022 [cited by applicant]
pp. 796-797 from Memory Systems: Cache, DRAM, Disk by Bruce Jacob, et el. (Year: 2008). [cited by examiner]
A Merriam-Webster screen shot that defines the verb concatenate (Year: 2022). [cited by examiner]
Merriam-Webster definition of the term ‘respectively’ (Year: 2022). [cited by examiner]
International Search Report and Written Opinion in related PCT Application No. PCT/CN2023/093999 dated Jun. 16, 2023 (6 pages). [cited by applicant]