Data compression method and apparatus, computing device, and storage system
AssigneeHuawei Technologies Co., Ltd.
InventorsSizhe Luo, Ruliang Dong, Hongde Zhu, Yong Sun
Life of this patent
Estimating the term…
Abstract
In a data compression method, a computing device determines a compression feature value of to-be-compressed data based on a first parameter that affects a compression result of the to-be-compressed data. The computing device determines, based on the compression feature value, a compression policy for compressing the to-be-compressed data. The computing device then compresses the to-be-compressed data according to the compression policy to obtain compressed data, and stores the compressed data.
Claims18
A data compression method performed by a computing device, the method comprising:
- determining a compression feature value of to-be-compressed data based on a first parameter that affects a compression result of the to-be-compressed data, wherein the to-be-compressed data is to be sent by the computing device to a storage device;
- determining, based on the compression feature value, a compression policy for compressing the to-be-compressed data, wherein the compression policy comprises a plurality of compression windows;
- compressing the to-be-compressed data according to the compression policy to obtain compressed data, wherein the step of compressing the to-be-compressed data according to the compression policy comprises:
- separately compressing the to-be-compressed data based on the plurality of compression windows to obtain a plurality of pieces of compressed data;
- comparing compression rates of the plurality of pieces of compressed data;
- and
- selecting, from the plurality of pieces of compressed data based on the comparing, first compressed data with a highest compression rate as the compressed data;
- and
- sending a data packet to the storage device, wherein the data packet comprises a packet header and a payload, and the payload includes the first compressed data and a compression window of the first compressed data.
A computing device comprising:
- a memory storing executable instructions;
- and
- a processor configured to execute the executable instructions to perform operations of:
- determining a compression feature value of to-be-compressed data based on a first parameter that affects a compression result of the to-be-compressed data, wherein the to-be-compressed data is to be sent by the computing device to a storage device;
- determining, based on the compression feature value, a compression policy for compressing the to-be-compressed data, wherein the compression policy comprises a plurality of compression windows;
- compressing the to-be-compressed data according to the compression policy to obtain compressed data, wherein the step of compressing the to-be-compressed data according to the compression policy comprises:
- separately compressing the to-be-compressed data based on the plurality of compression windows to obtain a plurality of pieces of compressed data;
- comparing compression rates of the plurality of pieces of compressed data;
- and
- selecting, from the plurality of pieces of compressed data based on the comparing, first compressed data with a highest compression rate as the compressed data;
- and
- sending a data packet to the storage device, wherein the data packet comprises a packet header and a payload, and the payload includes the first compressed data and a compression window of the first compressed data.
A storage system, comprises:
- a computing node;
- and
- a storage node,
- wherein the computing node is configured to perform operations of:
- determining a compression feature value of to-be-compressed data based on a first parameter that affects a compression result of the to-be-compressed data, wherein the to-be-compressed data is to be sent by the computing node to the storage node;
- determining, based on the compression feature value, a compression policy for compressing the to-be-compressed data, wherein the compression policy comprises a plurality of compression windows;
- compressing the to-be-compressed data according to the compression policy to obtain compressed data, and storing the compressed data, wherein the step of compressing the to-be-compressed data according to the compression policy comprises:
- separately compressing the to-be-compressed data based on the plurality of compression windows to obtain a plurality of pieces of compressed data;
- comparing compression rates of the plurality of pieces of compressed data;
- and
- selecting, from the plurality of pieces of compressed data based on the comparing, first compressed data with a highest compression rate as the compressed data;
- and
- sending a data packet to the storage node, wherein the data packet comprises a packet header and a payload, and the payload includes the first compressed data and a compression window of the first compressed data;
- and
- wherein the storage node is configured to store the first compressed data.
Dependencies are inferred from the claim text.