CN108848383A - A kind of compression method of video, image data - Google Patents
A kind of compression method of video, image data Download PDFInfo
- Publication number
- CN108848383A CN108848383A CN201810624300.5A CN201810624300A CN108848383A CN 108848383 A CN108848383 A CN 108848383A CN 201810624300 A CN201810624300 A CN 201810624300A CN 108848383 A CN108848383 A CN 108848383A
- Authority
- CN
- China
- Prior art keywords
- data
- compression
- compressed
- length
- block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
Abstract
The present invention discloses the compression method of a kind of video, image data, including receiving the block number evidence to be compressed according to video, the image of default first length input;To the block number according to first time data compression is carried out, compressed compression blocks data are obtained, wherein the first time data compression is to be compressed using the first compression algorithm by extracting characteristic information in from block number to be compressed;Intermediate data is constructed according to the characteristic information, second of data compression is carried out to the intermediate data using the second compression algorithm;Second of compressed data is subjected to linking arrangement according to compression sequence in preset multiple physical volumes, obtains linking compression blocks data;The linking compression blocks data are allocated to the data block that multiple length are preset second length, so that system carries out space release as unit of the data block.The present invention improves the efficiency of data compression, so that system carries out further space release as unit of data block, it is possible to reduce the waste to space.
Description
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of video, the compression method of image data.
Background technique
With the development of data compression technique, the data volume in storage system is significantly reduced, to reduce storage
Space improves system transmission, storage and processing efficiency.
The method of existing data compression mainly includes two kinds, method first is that fixed-length block data to fixed-length block data pressure
Contracting, for example, 64KB block number according to being compressed into the integral multiple of 8KB, or by the block number of 8KB according to the integral multiple for being compressed into 1KB.It will lead
Block number that machine issues carries out polishing reading according to the block number evidence for being cut into 8KB alignment if being misaligned, make block number to be compressed according to rounding at
8KB, then by the block number of 8KB according to compressing, compressed block number is according to according to the upward rounding of 1KB, such as compressed block number
According to being 1.1KB, then stored according to 2KB.By way of rounding, compressed block number is solved according to elongated bring Logical Disk
On space distribution fragment problems;Method is second is that elongated block number evidence arrives the compression of fixed-length block data, by host in the same time
The multiple block numbers issued are according to a big block number is spliced into according to being compressed, and compressed block number is according to according to fixed granularity 8KB
It stores in following Logical Disk.
Both the above data compression method has some disadvantages, wherein the compressed block number evidence of method one is fixed length
, it is necessary to rounding is carried out with certain granularity, there are biggish space wastes, influence the compression efficiency of data.Secondly, method two
Since the length of each block number evidence is different, so needing to record each block number according to the address for being input to compression processor including each block number evidence
Metadata information, the index of metadata is complicated.
Summary of the invention
In order to solve the above technical problems, the present invention provides the following technical solutions:
A kind of compression method of video, image data, which is characterized in that including:
Receive the block number evidence to be compressed according to video, the image of default first length input;
To the block number according to first time data compression is carried out, compressed compression blocks data are obtained, wherein the first time
Data compression is to be compressed using the first compression algorithm by extracting characteristic information in from block number to be compressed;
Intermediate data is constructed according to the characteristic information, the intermediate data is carried out second using the second compression algorithm
Data compression;
Second of compressed data is subjected to linking arrangement according to compression sequence in preset multiple physical volumes, is obtained
It is connected compression blocks data;The linking compression blocks data are allocated to the data block that multiple length are preset second length, with
System is set to carry out space release as unit of the data block.
It is described to receive the block number evidence to be compressed inputted according to preset first length as the preferred of the present embodiment, it connects
Receive the block number evidence to be compressed in such a way that polishing is read according to preset first length input video and/or image.
As the preferred of the present embodiment, the compression blocks data after carrying out the first time data compression include tuple information,
It is described to extract characteristic information from the first time compressed data, it specifically includes:The characteristic information is extracted from tuple information,
Wherein, characteristic information includes field information, length information, character information and figure product information.
As the preferred of the present embodiment, first compression algorithm is dictionary compression algorithm.
As the preferred of the present embodiment, intermediate data is constructed according to the characteristic information, is specifically included using the field
Non- matching field described in information structuring constructs the Matching Offsets using the offset information, and uses the length
Matching length described in information structuring.
As the preferred of the present embodiment, second compression algorithm includes prime compression algorithm and rear class compression algorithm,
In, the contraction principle of the prime compression algorithm is identical as the contraction principle of the first compression algorithm, and the method also includes detections
When accessed to the second compressed data, using the corresponding decompression algorithm of the rear class compression algorithm to second compressed data into
Row decompression, obtains the intermediate data;
The intermediate data is decompressed using the prime compression algorithm corresponding decompression algorithm, is obtained described initial
Data;Wherein, second compressed data is compressed to obtain using the second compression algorithm to the intermediate data.
As the preferred of the present embodiment, it is preset second length that the linking compression blocks data, which are allocated to multiple length,
Data block, system carries out space release as unit of the data block.
As the preferred of the present embodiment, it includes for each data that the system carries out space release as unit of data block
Block judges whether the corresponding relationship changes;If it is, determining each linking compression blocks in the data block
Data are invalid block data;The data block is subjected to space release.
Compared with prior art, the beneficial effects of the invention are as follows:
The embodiment of the present invention is compressed by receiving the block number evidence to be compressed inputted according to preset first length to first
When data are compressed, without reusing the compression of the second compression algorithm after decompressing to the first compressed data, but from first
Characteristic information is extracted in compressed data, intermediate data is constructed according to the characteristic information, using the second compression algorithm in described
Between data compressed, the process of the decompression to the first compressed data is omitted, thus saved by the first compressed data convert
For the time of the second compressed data, the efficiency of data compression is improved, by preset more after carrying out second of data compression
Linking arrangement is carried out according to compression sequence in a physical volume, obtains linking compression blocks data, linking compression blocks data are allocated to
Multiple length are the data block of preset second length, so that system carries out further space release as unit of data block,
In this way, it is possible to reduce the waste to space improves the compression efficiency of block number evidence.
Detailed description of the invention
Fig. 1 be a kind of video in the embodiment of the present invention, image data compression method implementation flow chart;
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
It is shown in Figure 1, the embodiment of the present invention provide a kind of video, image data compression method implementation flow chart,
This method may comprise steps of:
The block number evidence to be compressed that S1, reception are inputted according to preset first length.
In the present embodiment, (video or figure to be compressed can in the present embodiment, be referred mainly to block number evidence to be compressed
Picture) its first length being input in compression processor is preset, each block number evidence to be compressed is input to according to first length
In compression processor, compression processor receives the block number evidence to be compressed inputted according to preset first length.It is grown using fixed
The block number evidence of the input method of degree, input may be through the overweight block number evidence deleted, convenient for the combination deleted and compressed.In the present embodiment
In, it is more shorter better to the first length requirement, it is usually no more than 64KB, preferably 8KB.It receives in such a way that polishing is read according to pre-
If the first length input block number evidence to be compressed.Each block number to be compressed is input to compression according to according to the first length of setting
After processor, where the first length system space may have it is vacant, therefore can across block Data-parallel language read, will next to
The block number evidence of compression, which is read into this, to be had in vacant system space, to save space.
S2, to the block number according to first time data compression is carried out, obtain compressed compression blocks data, wherein described the
Data compression is to be compressed using the first compression algorithm by extracting characteristic information in from block number to be compressed, foundation
The characteristic information constructs intermediate data, carries out second of data compression to the intermediate data using the second compression algorithm.?
When to block number to be compressed according to first time data compression is carried out, by extracting the characteristic information of block number evidence to be compressed, then according to
Intermediate data is constructed according to the characteristic information of extraction, then the intermediate data of construction is compressed using the second compression algorithm, is obtained
Second compressed data;And then directly the first compressed data is compressed using the second compression algorithm, it saves compared with the prior art
Omited the process of the decompression to the first compressed data, thus saved by the first compressed data be converted to the second compressed data when
Between, improve the efficiency of data compression.Compression processor to each block number to be compressed received according to compressing, after being compressed
Compression blocks data.With reference to first aspect, in the first possible implementation of the first aspect, first compressed data
Including tuple information, the tuple information is by the code field of non-matching field, the code field of Matching Offsets and length
Code field composition;During extracting characteristic information from the first compressed data, from the non-matching field of tuple information
Field information is extracted in code field, extracts offset information, Yi Jicong from the code field of the Matching Offsets of tuple information
The code field of the length of tuple information extracts length information, i.e., the described characteristic information may include field information, offset information
And length information;And then characteristic information is directly extracted from the tuple information of the first compressed data, improve feature information extraction
Efficiency.
In the second possible implementation of the first aspect, the intermediate data includes non-matching field, matches partially
Shifting amount and matching length can be used under type such as and construct intermediate data:Non- matching field is constructed using the field information, is used
The offset information constructs Matching Offsets, and constructs matching degree using the length information.With reference to first aspect
Two kinds of possible implementations, in a third possible implementation of the first aspect, when first compressed data includes
When at least two groups tuple information, the characteristic information is also more than one set of, then can be respectively adopted the non-matching field of following method construct,
Matching Offsets and matching length:Field information at least two constituent element group informations is spliced to obtain and described does not match word
Section;Spliced the offset information at least two constituent element group informations to obtain the Matching Offsets;By at least two group of components
Length information in information is spliced to obtain the matching length.It is not matched to described respectively using second compression algorithm
Field, the Matching Offsets and the matching length are encoded, and the second compressed data is obtained;And then by intermediate data
Coding first the second compressed data of compressed data boil down to is realized into the compression to the first compressed data.
In the present embodiment, second compression algorithm includes prime compression algorithm and rear class compression algorithm, wherein described
The contraction principle of prime compression algorithm is identical as the contraction principle of the first compression algorithm, using the second compression algorithm in described
Between data compressed after obtaining the second compressed data, the method further includes:After detecting that the second compressed data is accessed,
Second compressed data is decompressed using the corresponding decompression algorithm of the rear class compression algorithm, obtains mediant data;
The intermediate data is decompressed using the prime compression algorithm corresponding decompression algorithm, obtains primary data;Inciting somebody to action
After first compressed data is compressed, the corresponding decompression algorithm of the second compression algorithm can be used and decompressed, primary data is obtained.
In the present embodiment, first compression algorithm is dictionary compression algorithm, and the prime compression algorithm of second compression algorithm is
The dictionary compression algorithm, the rear class compression algorithm of second compression algorithm are entropy coding.
S3, second of compressed data will be subjected to linking row according to compression sequence in preset multiple physical volumes
Cloth obtains linking compression blocks data.In the present embodiment, the compression block number obtained after to be compressed piece of data compression of same length
According to length can be different, and compressed each compression blocks data may be stored in preset multiple and different physical volume
In, compressed compression blocks data are subjected to linking arrangement according to compression sequence in preset multiple physical volumes and obtain linking pressure
Contracting block number evidence can make compressed compression blocks data accomplish the other compression of byte level, so that compression blocks data are more stepped up
It is real, without cavity.
S4, the data block that compression blocks data are allocated to multiple length as preset second length will be connected, system is with data
Block is that unit carries out space release.Wherein, the second length is the disk array band stored to linking compression blocks data
The integral multiple of length.The length of compressed compression blocks data may be different, the space point after the release of space next time
With complexity, need to record the address for including at least the space for having been dispensed into compression blocks data and the space bit map of length, and
After the release of space, it is also desirable to update space bit map, the update of assignment bit map will lead to the performance decline of system, and space bit map is more
The abrasion that can also accelerate SSD is frequently write into caused by new, reduces the reliability of system.Therefore, multiple second can be preset
The data block block of length will be connected compression blocks digitization and give the data block that multiple length are preset second length.At this
In the case of kind, system can carry out space release as unit of data block.It is effective to get around by the space separating management of bulk
The way to manage of space bit map, reduces system complexity.Simultaneously as without using the way to manage of space bit map, block number
When according to updating, do not need to update message bit pattern.Second length of preset data block is specifically configured to disk array RAID stripe
Integral multiple, when the downward brush of such data block, the disk of rear end can carry out writing for full band.It is inputted by fixed length, is elongated defeated
Block data compression scheme out, and the compressed block number of elongated output will be connected according to linking arrangement is carried out by compression sequence
Block number evidence after arrangement is allocated to the data block that multiple length are preset second length, it is possible to reduce the waste to space mentions
The compression efficiency of high block number evidence, simplifies the index to metadata.
It although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with
A variety of variations, modification, replacement can be carried out to these embodiments without departing from the principles and spirit of the present invention by understanding
And modification, the scope of the present invention is defined by the appended.
Claims (8)
1. the compression method of a kind of video, image data, which is characterized in that including:
Receive the block number evidence to be compressed according to video, the image of default first length input;
To the block number according to first time data compression is carried out, compressed compression blocks data are obtained, wherein the first time data
Compression is to be compressed using the first compression algorithm by extracting characteristic information in from block number to be compressed;
Intermediate data is constructed according to the characteristic information, second of data is carried out to the intermediate data using the second compression algorithm
Compression;
Second of compressed data is subjected to linking arrangement according to compression sequence in preset multiple physical volumes, is connected
Compression blocks data;The linking compression blocks data are allocated to the data block that multiple length are preset second length, so as to be
System carries out space release as unit of the data block.
2. the compression method of video according to claim 1, image data, it is characterised in that:It is described to receive according to default
The first length input block number evidence to be compressed, receive polishing read by way of according to preset first length input video
And/or the block number evidence to be compressed of image.
3. the compression method of video according to claim 1, image data, it is characterised in that:Carry out first number
It include tuple information according to compressed compression blocks data, it is described to extract characteristic information from the first time compressed data, specifically
Including:The characteristic information is extracted from tuple information, wherein characteristic information includes field information, length information, character information
With figure product information.
4. the compression method of video according to claim 1, image data, it is characterised in that:First compression algorithm
For dictionary compression algorithm.
5. the compression method of video according to claim 1, image data, it is characterised in that:According to the characteristic information
Intermediate data is constructed, specifically includes and the non-matching field is constructed using the field information, using the offset information structure
The Matching Offsets is made, and the matching length is constructed using the length information.
6. the compression method of video according to claim 4, image data, it is characterised in that:Second compression algorithm
Including prime compression algorithm and rear class compression algorithm, wherein the contraction principle and the first compression algorithm of the prime compression algorithm
Contraction principle it is identical, when the method also includes detecting that the second compressed data is accessed, using the rear class compression algorithm
Corresponding decompression algorithm decompresses second compressed data, obtains the intermediate data;
The intermediate data is decompressed using the prime compression algorithm corresponding decompression algorithm, obtains the initial number
According to;Wherein, second compressed data is compressed to obtain using the second compression algorithm to the intermediate data.
7. the compression method of video according to claim 1, image data, it is characterised in that:By the linking compression blocks
Data are allocated to the data block that multiple length are preset second length, and system is carried out space as unit of the data block and released
It puts.
8. the compression method of video according to claim 7, image data, it is characterised in that:The system is with data block
Carrying out space release for unit includes judging whether the corresponding relationship changes for each data block;If it is,
Determine that each linking compression blocks data in the data block are invalid block data;The data block is subjected to space release.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810624300.5A CN108848383A (en) | 2018-06-16 | 2018-06-16 | A kind of compression method of video, image data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810624300.5A CN108848383A (en) | 2018-06-16 | 2018-06-16 | A kind of compression method of video, image data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108848383A true CN108848383A (en) | 2018-11-20 |
Family
ID=64202212
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810624300.5A Pending CN108848383A (en) | 2018-06-16 | 2018-06-16 | A kind of compression method of video, image data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108848383A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110475117A (en) * | 2019-09-26 | 2019-11-19 | 北京迈格威科技有限公司 | Method, apparatus, electronic equipment and the computer storage medium of compression of images |
CN113326001A (en) * | 2021-05-20 | 2021-08-31 | 锐掣(杭州)科技有限公司 | Data processing method, device, apparatus, system, medium, and program |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101588498A (en) * | 2009-06-23 | 2009-11-25 | 硅谷数模半导体(北京)有限公司 | Video image data compression and decompression method and device |
US20120078861A1 (en) * | 2009-04-03 | 2012-03-29 | I-CES Innovative Compression Engineering Solution | Method for processing a digital file notably of the image, video and/or audio type |
CN107888197A (en) * | 2017-10-31 | 2018-04-06 | 华为技术有限公司 | A kind of data compression method and device |
CN107947799A (en) * | 2017-11-28 | 2018-04-20 | 郑州云海信息技术有限公司 | A kind of data compression method and apparatus |
-
2018
- 2018-06-16 CN CN201810624300.5A patent/CN108848383A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120078861A1 (en) * | 2009-04-03 | 2012-03-29 | I-CES Innovative Compression Engineering Solution | Method for processing a digital file notably of the image, video and/or audio type |
CN101588498A (en) * | 2009-06-23 | 2009-11-25 | 硅谷数模半导体(北京)有限公司 | Video image data compression and decompression method and device |
CN107888197A (en) * | 2017-10-31 | 2018-04-06 | 华为技术有限公司 | A kind of data compression method and device |
CN107947799A (en) * | 2017-11-28 | 2018-04-20 | 郑州云海信息技术有限公司 | A kind of data compression method and apparatus |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110475117A (en) * | 2019-09-26 | 2019-11-19 | 北京迈格威科技有限公司 | Method, apparatus, electronic equipment and the computer storage medium of compression of images |
CN113326001A (en) * | 2021-05-20 | 2021-08-31 | 锐掣(杭州)科技有限公司 | Data processing method, device, apparatus, system, medium, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2016200550B2 (en) | Encoding program, decompression program, compression method, decompression method, compression device and decompression device | |
US10116325B2 (en) | Data compression/decompression device | |
CN105009067B (en) | Managing operations on units of stored data | |
CN107947799B (en) | Data compression method and device | |
CN104462141B (en) | Method, system and the storage engines device of a kind of data storage and inquiry | |
CN101783788A (en) | File compression method, file compression device, file decompression method, file decompression device, compressed file searching method and compressed file searching device | |
US8189912B2 (en) | Efficient histogram storage | |
CN101206618A (en) | Fusion memory device and method | |
CN111125033B (en) | Space recycling method and system based on full flash memory array | |
CN106849956B (en) | Compression method, decompression method, device and data processing system | |
KR20150125010A (en) | Managing operations on stored data units | |
CN105191144A (en) | Compression device, compression method, decompression device, decompression method, and information processing system | |
CN108848383A (en) | A kind of compression method of video, image data | |
US9520896B1 (en) | Non-transitory computer-readable recording medium, encoding method, encoding device, decoding method, and decoding device | |
US6320523B1 (en) | Method and apparatus for reducing the time required for compressing data | |
US10601442B2 (en) | Memory compression method and apparatus | |
KR20150126667A (en) | Managing operations on stored data units | |
CN111061428B (en) | Data compression method and device | |
CN115438114B (en) | Storage format conversion method, system, device, electronic equipment and storage medium | |
WO2018068250A1 (en) | Method and device for data processing, chip and camera | |
US8463759B2 (en) | Method and system for compressing data | |
US20160226516A1 (en) | Non-transitory computer-readable recording medium, compression method, decompression method, compression device, and decompression device | |
CN109271463B (en) | Method for recovering inodb compressed data of MySQL database | |
CN110311687A (en) | A kind of time series data lossless compression method based on Integrated Algorithm | |
US11561738B2 (en) | Memory system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181120 |
|
RJ01 | Rejection of invention patent application after publication |