CN102684705B - Method and device for data compression - Google Patents

Method and device for data compression Download PDF

Info

Publication number
CN102684705B
CN102684705B CN201210174964.9A CN201210174964A CN102684705B CN 102684705 B CN102684705 B CN 102684705B CN 201210174964 A CN201210174964 A CN 201210174964A CN 102684705 B CN102684705 B CN 102684705B
Authority
CN
China
Prior art keywords
data
compressed
compression
configuration
data format
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.)
Active
Application number
CN201210174964.9A
Other languages
Chinese (zh)
Other versions
CN102684705A (en
Inventor
阮卫挺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510219225.0A priority Critical patent/CN104796155B/en
Priority to CN201210174964.9A priority patent/CN102684705B/en
Publication of CN102684705A publication Critical patent/CN102684705A/en
Application granted granted Critical
Publication of CN102684705B publication Critical patent/CN102684705B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for data compression. The device comprises a calling module for calling a compression data statistic table, a selection module and a compression module, wherein one-to-one corresponding relations among data format, compression configuration and compression effect information are stored in the compression data statistic table; the selection module is used for acquiring corresponding compression effect information from the compression data statistic table according to the data format of data to be compressed and the compression mode selected by a user and selecting the compression configuration corresponding to the compression mode according to the compression effect information, and the compression mode comprises a compression speed priority mode and a compression volume priority mode; the compression module is used for compressing the data to be compressed according to the compression configuration and acquiring a compressed data packet. Based on the technical scheme of the method and the device for data compression, the most appropriate compression configuration can be automatically matched for users according to the requirements of the users, so that the purposes of having the fastest compression speed or minimal compression volume and improving the use experience of the users can be achieved.

Description

Data compression method and device
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of data compression method and device.
Background technology
In the prior art, tool of compression changes file content and data by certain compression algorithm, makes data take less memory space.Particularly, ordinary file generally all comprises certain repeating data, these data repeated often occupy the memory space of many times, tool of compression needs these repeating datas in locating file, by suitable algorithm, data are rebuild, allow multiple repeating data only take a memory space, when decompressing, reduced by file after compression by corresponding decompression algorithm, this compression algorithm generally belongs to Lossless Compression again.Such as, in text, comprise multiple identical word " People's Republic of China (PRC) ", after being compressed by tool of compression, only need take a memory space and store, thus reach the object reducing file.
In addition, tool of compression can not only help user to save space, also multiple file can be broken into a compressed data packets, to facilitate user ID, transmit and share simultaneously.At present, in prior art, there is many moneys tool of compression, such as: winzip tool of compression, winrar tool of compression, 7-zip tool of compression etc.; The compressed format corresponding with tool of compression also has multiple, such as: rar form, zip form, 7z form, cab form etc.
Above-mentioned each tool of compression and compressed format have features.Such as: the advantage of zip form uses extensively, and compression speed is fast, but compression ratio is less; Rar form is usually high than the compression ratio of zip form, but compression speed is slower, and winrar tool of compression can compress special optimization algorithm by executive program for text, sound and image on 32 and 64 Intel (Intel) microprocessors, further increases compression ratio; 7z form usually than zip form and rar format compression rate all high, simultaneously compression time also than zip form and rar form all long.
Domestic consumer, when using compressed software, only needs to pack to multiple file fast sometimes, the requirement not too much to compression ratio; Sometimes user is when considering the needing of transmission, higher requirement is had to compression ratio, but for the requirement that compression time is not too much, Fig. 1 is the schematic diagram using compressed software to carry out parameter configuration in prior art, as shown in Figure 1, user is when using compressed software, dialog box comprises compressed file format option, prompting user selects corresponding compression algorithm, but, professional knowledge about above-mentioned compressed software is not understood for domestic consumer, and therefore, domestic consumer does not know that how configuring compression algorithm could obtain suitable compressed file.
Summary of the invention
The invention provides a kind of data compression method and device, can not according to the problem needing to select suitable compression algorithm of oneself owing to lacking professional knowledge to solve user in prior art.
The invention provides a kind of data compression method, comprising: call packed data statistical form, wherein, in packed data statistical form, preserve the one-to-one relationship between data format, compressed configuration and compression effectiveness information; From packed data statistical form, corresponding compression effectiveness information is obtained according to the compact model that data format and the user of data to be compressed select, and the compressed configuration corresponding with compact model according to compression effectiveness Information Selection, wherein, compact model comprises: compression speed mode of priority and compression volume mode of priority; Treat packed data according to compressed configuration to compress, obtain compressed data packets.
Preferably, compression effectiveness information comprises: compression time.
Preferably, from packed data statistical form, corresponding compression effectiveness information is obtained according to the compact model that data format and the user of data to be compressed select, and the compressed configuration corresponding with compact model according to compression effectiveness Information Selection specifically comprises: when the compact model that user selects is compression speed mode of priority, obtain the data format of data to be compressed; The compression time of data format under different compressed configuration is obtained from packed data statistical form; The fastest compressed configuration of compression speed is obtained according to compression time.
Preferably, before calling packed data statistical form, said method also comprises: according to the data format of data to be compressed, treats packed data and filters, and filters out by compressed data, obtain not by compressed data,
Preferably, treat after packed data compresses according to compressed configuration, method also comprises: by being directly stored in compressed data packets by compressed data of filtering out.
Preferably, compression effectiveness information comprises: compressed data packets size.
Preferably, from packed data statistical form, corresponding compression effectiveness information is obtained according to the compact model that data format and the user of data to be compressed select, and the compressed configuration corresponding with compact model according to compression effectiveness Information Selection specifically comprises: when the compact model that user selects is compression volume mode of priority, obtain the data format of data to be compressed; The compressed data packets size of data format under different compressed configuration is obtained from packed data statistical form; According to the compressed configuration that compressed data packets acquiring size compressed data packets volume is minimum.
Preferably, compressed configuration comprises: compression algorithm and compression parameters.
Preferably, data to be compressed comprise the data of one or more different data format; Treat packed data according to compressed configuration to compress, obtain compressed data packets and specifically comprise: the compressed configuration corresponding according to each different data format is treated the data of each different data format in packed data respectively and compressed, obtain compressed data packets.
Present invention also offers a kind of data compression device, comprising: calling module, for calling packed data statistical form, wherein, in packed data statistical form, preserving the one-to-one relationship between data format, compressed configuration and compression effectiveness information; Select module, compact model for selecting according to data format and the user of data to be compressed obtains corresponding compression effectiveness information from packed data statistical form, and the compressed configuration corresponding with compact model according to compression effectiveness Information Selection, wherein, compact model comprises: compression speed mode of priority and compression volume mode of priority; Compression module, compresses for treating packed data according to compressed configuration, obtains compressed data packets.
Preferably, compression effectiveness information comprises: compression time.
Preferably, select module specifically for: when user select compact model be compression speed mode of priority, obtain the data format of data to be compressed; The compression time of data format under different compressed configuration is obtained from packed data statistical form; The fastest compressed configuration of compression speed is obtained according to compression time.
Preferably, said apparatus also comprises: filtering module, before calling packed data statistical form at calling module, according to the data format of data to be compressed, treat packed data to filter, filter out by compressed data, obtain not by compressed data; Memory module, for treat after packed data compresses according to compressed configuration at compression module, by being directly stored in compressed data packets by compressed data of filtering out.
Preferably, compression effectiveness information comprises: compressed data packets size.
Preferably, select module specifically for: when user select compact model be compression volume mode of priority, obtain the data format of data to be compressed; The compressed data packets size of data format under different compressed configuration is obtained from packed data statistical form; According to the compressed configuration that compressed data packets acquiring size compressed data packets volume is minimum.
Preferably, compressed configuration comprises: compression algorithm and compression parameters.
Preferably, data to be compressed comprise the data of one or more different data format; Compression module specifically for: the compressed configuration corresponding according to each different data format is treated the data of each different data format in packed data respectively and is compressed, obtain compressed data packets.
Beneficial effect of the present invention is as follows:
The compressed configuration data to user corresponding with the compact model that user selects by the Intelligent Matching when compressed file are compressed, solving user in prior art can not according to the problem needing to select suitable compression algorithm of oneself owing to lacking professional knowledge, the technical scheme of the embodiment of the present invention can according to the needs of user, automatically for user mates most suitable compressed configuration, thus reaching the object that compression speed is the fastest or compression volume is minimum, the use sense that improve user is subject to.
Accompanying drawing explanation
Fig. 1 is the schematic diagram using compressed software to carry out parameter configuration in prior art;
Fig. 2 is the flow chart of the data compression method of the embodiment of the present invention;
Fig. 3 is the structural representation of the data compression device of the embodiment of the present invention.
Embodiment
Can not according to the problem needing to select suitable compression algorithm of oneself owing to lacking professional knowledge in order to solve user in prior art, the invention provides a kind of data compression method and device, the technical scheme of the embodiment of the present invention can according to the compact model of user's selection, automatically for user selects suitable compressed configuration, thus reach the compression object of user.Below in conjunction with accompanying drawing and embodiment, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, do not limit the present invention.
Embodiment of the method
According to embodiments of the invention, provide a kind of data compression method, Fig. 2 is the flow chart of the data compression method of the embodiment of the present invention, as shown in Figure 2, comprises following process according to the data compression method of the embodiment of the present invention:
Step 201, calls packed data statistical form, wherein, preserves the one-to-one relationship between data format, compressed configuration and compression effectiveness information in packed data statistical form.
Preferably, above-mentioned compressed configuration comprises: compression algorithm and compression parameters; Above-mentioned compression effectiveness information comprises: compression time and compressed data packets size.In actual applications, compression algorithm comprises: the cab compression algorithm etc. of the zip compression algorithm that the rar compression algorithm that compressed data packets is rar form, compressed data packets are zip form, compressed data packets to be the 7z compression algorithm of 7z form and compressed data packets be cab form.Compression parameters comprises: whether encrypt, solid (Solid) compression parameters and compression after whether delete the parameters such as source file.
In actual applications, packed data statistical form be in a large amount of experiments to various different file format (namely, above-mentioned data format) performance under different compression algorithms carries out adding up obtaining, in packed data statistical form, comprise the statistics of different compressed configuration in speed (calculating of speed carries out under same hardware environment) and compression ratio two, during for compressing file, the most suitable compressed configuration of Intelligent Matching provides foundation, thus reaches fastest or the object of compression ratio minimum (after compression, volume is minimum).It should be noted that, in embodiments of the present invention, the computational methods of compression ratio are: compression ratio=compressed data packets size/size of data to be compressed.As shown in table 1 according to the packed data statistical form of the embodiment of the present invention:
Table 1
It should be noted that, each data in table 1 are only and illustrate, are not the actual experimental data recorded.
Step 202, from packed data statistical form, corresponding compression effectiveness information is obtained according to the compact model that data format and the user of data to be compressed select, and the compressed configuration corresponding with compact model according to compression effectiveness Information Selection, wherein, compact model comprises: compression speed mode of priority and compression volume mode of priority;
When the compact model that user selects is compression speed mode of priority, step 202 specifically comprises following process:
1, obtain the data format of data to be compressed, such as, data format is .gif;
2, from packed data statistical form, obtain the compression time of this data format under different compressed configuration, such as, as shown in table 1, when data format is .gif, under rar compression algorithm, compression time is 5s, and under zip compression algorithm, compression time is 2s; In actual applications, statistics in packed data statistical form is all compress the statistics that data that front size is 1M carry out for benchmark, but, when carrying out data compression, the size needing the data of compression is indefinite, in actual applications, only can be as the criterion with the compression time added up in packed data statistical form and compare, also the anticipated compression deadline of current data to be compressed can be calculated according to volume ratio, and with this anticipated compression deadline for benchmark compares.
3, obtain the fastest compressed configuration of compression speed according to compression time, such as, when data format is .gif, the compression time obtained from table 1 is respectively 5s and 2s, the zip compression algorithm of compressed configuration corresponding to 2s that compression speed is the fastest.
By above-mentioned process, user can be helped to select optimum compressed configuration intelligently thus realize the fastest object of compression speed.
In embodiments of the present invention, compression speed mode of priority is not give no thought to compressing file rate, but calculates under the prerequisite being standard with compress mode, under the prerequisite that sacrifice compression ratio is not very large, obtain the fastest speed.Be implemented as follows:
Experimentally add up, for the data to be compressed of most of form, what compression speed was the fastest is zip compression algorithm, and for a part by the data such as picture, audio-video document, document compressed, then compression ratio when compressing is very high, when the high threshold value to pre-setting of compression ratio (such as, threshold value is 98%) time, intelligence can skip these file types under compression speed mode of priority, that is, above-mentioned file not compressed.
Particularly, when the compact model that user selects is compression speed mode of priority, before calling packed data statistical form, first according to the data format of data to be compressed, treat packed data to filter, filter out by compressed data (such as, by the data such as picture, audio-video document, document compressed), obtain not by compressed data.Subsequently, step 201 is not performed by compressed data to be compressed to what obtain.Such as: the technical scheme of the embodiment of the present invention automatically skips the file of rmvb form (or skipping compressed alternative document), alternative document is adopted to the zip compression algorithm of standard.
When the compact model that user selects is compression volume mode of priority, step 202 specifically comprises following process:
1, the data format of data to be compressed is obtained; Such as, data format is .gif;
2, from packed data statistical form, obtain the compressed data packets size of data format under different compressed configuration; Such as, as shown in table 1, when data format is .gif, under rar compression algorithm, compressed data packets size is 7M, and under zip compression algorithm, compressed data packets size is 9M; In actual applications, statistics in packed data statistical form is all compress data that front size is 1M to be as the criterion the statistics of carrying out, but, when carrying out data compression, the size of data to be compressed is indefinite, in actual applications, can only with the compressed data packets size of adding up in packed data statistical form for benchmark compares, also the anticipated compression data package size of current data to be compressed can be calculated according to volume ratio, and with this anticipated compression data package size for benchmark compares.
3, according to the compressed configuration that compressed data packets acquiring size compressed data packets volume is minimum.Such as, the compressed data packets size obtained from table 1 is respectively 7M and 9M, the rar compression algorithm of compressed configuration corresponding to 7M that compressed data packets is minimum.
It should be noted that, experimentally add up, solid compression parameters can allow compression ratio lower, therefore, the experiment statistics in packed data statistical form be all the data of solid compression.And for most of formatted file, what compression ratio was the highest is all 7z form, and only have the file types such as indivedual picture, audio-video document, document, the compression ratio of rar form is even better.Such as, the technical scheme of the embodiment of the present invention uses rar compression algorithm for data types such as indivedual picture, audio-video document, documents, and configure solid compression parameters and compress, 7z compression algorithm is adopted to alternative document, and configures solid compression parameters and compress.
By above-mentioned process, user can be helped to select optimum compressed configuration intelligently thus realize the minimum object of compressed data packets.
Preferably, in embodiments of the present invention, user can also manually select compressed configuration.
Step 203, treats packed data according to compressed configuration and compresses, and obtains compressed data packets.
It should be noted that, if before calling packed data statistical form, treat packed data and carried out filter operation, so, after treating packed data and compressing, need being directly stored in this compressed data packets by compressed data of filtering out.
It should be noted that, data to be compressed can comprise the data of one or more different data format, therefore, in actual applications, need from packed data statistical form, obtain the compressed configuration corresponding respectively with each data format in data to be compressed, when data to be compressed are compressed, need the compressed configuration corresponding according to each different data format to treat the data of each different data format in packed data and compress respectively, obtain compressed data packets.
In sum, by means of the technical scheme of the embodiment of the present invention, the compressed configuration data to user corresponding with the compact model that user selects by the Intelligent Matching when compressed file are compressed, solving user in prior art can not according to the problem needing to select suitable compression algorithm of oneself owing to lacking professional knowledge, the technical scheme of the embodiment of the present invention can according to the needs of user, automatically for user mates most suitable compressed configuration, thus reaching the object that compression speed is the fastest or compression volume is minimum, the use sense that improve user is subject to.
Device embodiment
According to embodiments of the invention, provide a kind of data compression device, Fig. 3 is the structural representation of the data compression device of the embodiment of the present invention, as shown in Figure 3, data compression device according to the embodiment of the present invention comprises: calling module 30, selection module 32 and compression module 34, be described in detail the modules of the embodiment of the present invention below.
Calling module 30, for calling packed data statistical form, wherein, preserves the one-to-one relationship between data format, compressed configuration and compression effectiveness information in packed data statistical form;
Preferably, above-mentioned compressed configuration comprises: compression algorithm and compression parameters; Above-mentioned compression effectiveness information comprises: compression time and compressed data packets size.In actual applications, compression algorithm comprises: the cab compression algorithm etc. of the zip compression algorithm that the rar compression algorithm that compressed data packets is rar form, compressed data packets are zip form, compressed data packets to be the 7z compression algorithm of 7z form and compressed data packets be cab form.Compression parameters comprises: whether encrypt, solid (Solid) compression parameters and compression after whether delete the parameters such as source file.
In actual applications, packed data statistical form be in a large amount of experiments to various different file format (namely, above-mentioned data format) performance under different compression algorithms carries out adding up obtaining, in packed data statistical form, comprise the statistics of different compressed configuration in speed (calculating of speed carries out under same hardware environment) and compression ratio two, during for compressing file, the most suitable compressed configuration of Intelligent Matching provides foundation, thus reaches fastest or the object of compression ratio minimum (after compression, volume is minimum).It should be noted that, in embodiments of the present invention, the computational methods of compression ratio are: compression ratio=compressed data packets size/size of data to be compressed.As shown in table 1 according to the packed data statistical form of the embodiment of the present invention:
Table 1
Data format (counts before compression Compressed configuration Compression time Compressed data packets size
Be 10M according to size)
.gif Rar compression algorithm 5s 7M
.gif Zip compression algorithm 2s 9M
…… …… …… ……
.txt Rar compression algorithm 4s 7.5M
…… …… …… ……
It should be noted that, each data in table 1 are only and illustrate, are not the actual experimental data recorded.
Select module 32, compact model for selecting according to data format and the user of data to be compressed obtains corresponding compression effectiveness information from packed data statistical form, and the compressed configuration corresponding with compact model according to compression effectiveness Information Selection, wherein, compact model comprises: compression speed mode of priority and compression volume mode of priority;
When user select compact model be compression speed mode of priority, select module 32 specifically for:
1, obtain the data format of data to be compressed, such as, data format is .gif;
2, from packed data statistical form, obtain the compression time of this data format under different compressed configuration, such as, as shown in table 1, when data format is .gif, under rar compression algorithm, compression time is 5s, and under zip compression algorithm, compression time is 2s; In actual applications, statistics in packed data statistical form is all compress the statistics that data that front size is 1M carry out for benchmark, but, when carrying out data compression, the size needing the data of compression is indefinite, in actual applications, only can be as the criterion with the compression time added up in packed data statistical form and compare, also the anticipated compression deadline of current data to be compressed can be calculated according to volume ratio, and with this anticipated compression deadline for benchmark compares.
3, obtain the fastest compressed configuration of compression speed according to compression time, such as, when data format is .gif, the compression time obtained from table 1 is respectively 5s and 2s, the zip compression algorithm of compressed configuration corresponding to 2s that compression speed is the fastest.
By above-mentioned process, user can be helped to select optimum compressed configuration intelligently thus realize the fastest object of compression speed.
In embodiments of the present invention, compression speed mode of priority is not give no thought to compressing file rate, but calculates under the prerequisite being standard with compress mode, under the prerequisite that sacrifice compression ratio is not very large, obtain the fastest speed.Be implemented as follows:
Experimentally add up, for the data to be compressed of most of form, what compression speed was the fastest is zip compression algorithm, and for a part by the data such as picture, audio-video document, document compressed, then compression ratio when compressing is very high, when the high threshold value to pre-setting of compression ratio (such as, threshold value is 98%) time, intelligence can skip these file types under compression speed mode of priority, that is, above-mentioned file not compressed.
Preferably, the device according to the embodiment of the present invention also comprises: filtering module and memory module, particularly:
Filtering module, compact model for selecting when user is compression speed mode of priority, before calling module 30 calls packed data statistical form, first according to the data format of data to be compressed, treat packed data to filter, filter out by compressed data (such as, by the data such as picture, audio-video document, document compressed), obtain not by compressed data.Subsequently, to the treatment step not performed calling module 30 by compressed data to be compressed obtained.Such as: filtering module automatically skips the file (or skipping compressed alternative document) of rmvb form, alternative document is adopted to the zip compression algorithm of standard.
Memory module, for treating after packed data compresses at compression module 34, by being directly stored in compressed data packets by compressed data of filtering out.
When user select compact model be compression volume mode of priority, select module 32 specifically for:
1, the data format of data to be compressed is obtained; Such as, data format is .gif;
2, from packed data statistical form, obtain the compressed data packets size of data format under different compressed configuration; Such as, as shown in table 1, when data format is .gif, under rar compression algorithm, compressed data packets size is 7M, and under zip compression algorithm, compressed data packets size is 9M; In actual applications, statistics in packed data statistical form is all compress data that front size is 1M to be as the criterion the statistics of carrying out, but, when carrying out data compression, the size of data to be compressed is indefinite, in actual applications, can only with the compressed data packets size of adding up in packed data statistical form for benchmark compares, also the anticipated compression data package size of current data to be compressed can be calculated according to volume ratio, and with this anticipated compression data package size for benchmark compares.
3, according to the compressed configuration that compressed data packets acquiring size compressed data packets volume is minimum.Such as, the compressed data packets size obtained from table 1 is respectively 7M and 9M, the rar compression algorithm of compressed configuration corresponding to 7M that compressed data packets is minimum.
It should be noted that, experimentally add up, solid compression parameters can allow compression ratio lower, therefore, the experiment statistics in packed data statistical form be all the data of solid compression.And for most of formatted file, what compression ratio was the highest is all 7z form, and only have the file types such as indivedual picture, audio-video document, document, the compression ratio of rar form is even better.Such as, the technical scheme of the embodiment of the present invention uses rar compression algorithm for data types such as indivedual picture, audio-video document, documents, and configure solid compression parameters and compress, 7z compression algorithm is adopted to alternative document, and configures solid compression parameters and compress.
By above-mentioned process, user can be helped to select optimum compressed configuration intelligently thus realize the minimum object of compressed data packets.
Preferably, in embodiments of the present invention, custom block can also be comprised, for determining compressed configuration according to manually arranging of user.
Compression module 34, for compressing data according to compressed configuration, obtains compressed data packets.
It should be noted that, data to be compressed can comprise the data of one or more different data format, therefore, in actual applications, module 32 is selected to need from packed data statistical form, obtain the compressed configuration corresponding respectively with each data format in data to be compressed, when data to be compressed are compressed, compression module 34 needs the compressed configuration corresponding according to each different data format to treat the data of each different data format in packed data to compress respectively, obtains compressed data packets.
In sum, by means of the technical scheme of the embodiment of the present invention, the compressed configuration data to user corresponding with the compact model that user selects by the Intelligent Matching when compressed file are compressed, solving user in prior art can not according to the problem needing to select suitable compression algorithm of oneself owing to lacking professional knowledge, the technical scheme of the embodiment of the present invention can according to the needs of user, automatically for user mates most suitable compressed configuration, thus reaching the object that compression speed is the fastest or compression volume is minimum, the use sense that improve user is subject to.
Although be example object, disclose the preferred embodiments of the present invention, it is also possible for those skilled in the art will recognize various improvement, increase and replacement, and therefore, scope of the present invention should be not limited to above-described embodiment.

Claims (10)

1. a data compression device, is characterized in that, comprising:
Calling module, for calling packed data statistical form, wherein, preserves the one-to-one relationship between data format, compressed configuration and compression effectiveness information in described packed data statistical form; Described compressed configuration comprises: compression algorithm and compression parameters; Described compression effectiveness information comprises: compression time or compressed data packets size;
Select module, compact model for selecting according to data format and the user of data to be compressed obtains corresponding compression effectiveness information from described packed data statistical form, and automatically select the compressed configuration corresponding with described compact model according to described compression effectiveness information, wherein, described compact model comprises: compression speed mode of priority and compression volume mode of priority;
Compression module, for compressing described data to be compressed according to described compressed configuration, obtains compressed data packets.
2. device as claimed in claim 1, is characterized in that,
Described selection module specifically for: when user select described compact model be compression speed mode of priority, obtain the data format of described data to be compressed; The compression time of described data format under different compressed configuration is obtained from described packed data statistical form; The fastest compressed configuration of compression speed is obtained according to described compression time.
3. device as claimed in claim 2, it is characterized in that, described device also comprises:
Filtering module, before calling described packed data statistical form at described calling module, according to the data format of described data to be compressed, filters described data to be compressed, filters out by compressed data, obtains not by compressed data;
Memory module, after compressing described data to be compressed according to described compressed configuration at described compression module, is directly stored in described compressed data packets by compressed data described in filtering out.
4. device as claimed in claim 1, is characterized in that, described selection module specifically for: when the described compact model that user selects is compression volume mode of priority, obtain the data format of described data to be compressed; The compressed data packets size of described data format under different compressed configuration is obtained from described packed data statistical form; According to the compressed configuration that described compressed data packets acquiring size compressed data packets volume is minimum.
5. the device according to any one of Claims 1-4, is characterized in that, described data to be compressed comprise the data of one or more different data format;
Described compression module specifically for: the compressed configuration corresponding according to each different data format is compressed the data of each different data format in described data to be compressed respectively, obtains described compressed data packets.
6. a data compression method, is characterized in that, comprising:
Call packed data statistical form, wherein, in described packed data statistical form, preserve the one-to-one relationship between data format, compressed configuration and compression effectiveness information; Described compressed configuration comprises: compression algorithm and compression parameters; Described compression effectiveness information comprises: compression time or compressed data packets size;
From described packed data statistical form, corresponding compression effectiveness information is obtained according to the compact model that data format and the user of data to be compressed select, and automatically select the compressed configuration corresponding with described compact model according to described compression effectiveness information, wherein, described compact model comprises: compression speed mode of priority and compression volume mode of priority;
According to described compressed configuration, described data to be compressed are compressed, obtain compressed data packets.
7. method as claimed in claim 6, is characterized in that,
From described packed data statistical form, obtain corresponding compression effectiveness information according to the compact model that data format and the user of data to be compressed select, and the compressed configuration corresponding with described compact model according to described compression effectiveness Information Selection specifically comprises:
When the described compact model that user selects is compression speed mode of priority, obtain the data format of described data to be compressed;
The compression time of described data format under different compressed configuration is obtained from described packed data statistical form;
The fastest compressed configuration of compression speed is obtained according to described compression time.
8. method as claimed in claim 7, is characterized in that,
Before calling described packed data statistical form, described method also comprises:
According to the data format of described data to be compressed, described data to be compressed are filtered, filter out by compressed data, obtain not by compressed data;
After compressing described data to be compressed according to described compressed configuration, described method also comprises:
Directly be stored in described compressed data packets by compressed data described in filtering out.
9. method as claimed in claim 6, it is characterized in that, from described packed data statistical form, obtain corresponding compression effectiveness information according to the compact model that data format and the user of data to be compressed select, and the compressed configuration corresponding with described compact model according to described compression effectiveness Information Selection specifically comprises:
When the described compact model that user selects is compression volume mode of priority, obtain the data format of described data to be compressed;
The compressed data packets size of described data format under different compressed configuration is obtained from described packed data statistical form;
According to the compressed configuration that described compressed data packets acquiring size compressed data packets volume is minimum.
10. the method according to any one of claim 6 to 9, is characterized in that, described data to be compressed comprise the data of one or more different data format;
According to described compressed configuration, described data to be compressed are compressed, obtain compressed data packets and specifically comprise:
The compressed configuration corresponding according to each different data format is compressed the data of each different data format in described data to be compressed respectively, obtains described compressed data packets.
CN201210174964.9A 2012-05-30 2012-05-30 Method and device for data compression Active CN102684705B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510219225.0A CN104796155B (en) 2012-05-30 2012-05-30 Data compression method and apparatus
CN201210174964.9A CN102684705B (en) 2012-05-30 2012-05-30 Method and device for data compression

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210174964.9A CN102684705B (en) 2012-05-30 2012-05-30 Method and device for data compression

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201510219225.0A Division CN104796155B (en) 2012-05-30 2012-05-30 Data compression method and apparatus

Publications (2)

Publication Number Publication Date
CN102684705A CN102684705A (en) 2012-09-19
CN102684705B true CN102684705B (en) 2015-06-03

Family

ID=46816151

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201210174964.9A Active CN102684705B (en) 2012-05-30 2012-05-30 Method and device for data compression
CN201510219225.0A Active CN104796155B (en) 2012-05-30 2012-05-30 Data compression method and apparatus

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201510219225.0A Active CN104796155B (en) 2012-05-30 2012-05-30 Data compression method and apparatus

Country Status (1)

Country Link
CN (2) CN102684705B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9355613B2 (en) * 2012-10-09 2016-05-31 Mediatek Inc. Data processing apparatus for transmitting/receiving compression-related indication information via display interface and related data processing method
CN104067523B (en) 2013-01-17 2018-03-09 华为技术有限公司 A kind of data package processing method and device
CN104427341B (en) * 2013-08-28 2019-01-15 腾讯科技(深圳)有限公司 A kind of image processing method, device and terminal
CN105718478A (en) * 2014-12-03 2016-06-29 北京奇虎科技有限公司 Data storage method and device
CN105760183A (en) * 2014-12-15 2016-07-13 北京奇虎科技有限公司 File processing method, device, and communication system
US10313256B2 (en) * 2015-05-21 2019-06-04 Intel Corporation Apparatus and methods for adaptive data compression
CN107341113B (en) * 2016-04-29 2020-05-26 龙芯中科技术有限公司 Cache compression method and device
CN106027615A (en) * 2016-05-10 2016-10-12 乐视控股(北京)有限公司 Object storage method and system
CN106936441B (en) * 2017-02-27 2020-08-21 深圳国泰安教育技术有限公司 Data compression method and device
CN107124559B (en) * 2017-06-19 2019-08-13 成都优孚达信息技术有限公司 A kind of communication data compression method
CN108427704B (en) * 2018-01-05 2022-08-09 平安科技(深圳)有限公司 Compression tool calling method and device and storage medium
CN108492339B (en) * 2018-03-28 2021-06-01 腾讯科技(深圳)有限公司 Method and device for acquiring resource compression packet, electronic equipment and storage medium
CN110941596A (en) * 2018-09-21 2020-03-31 北京奇虎科技有限公司 Disk space release method and device, computing equipment and computer storage medium
CN112311720B (en) * 2019-07-23 2022-10-14 腾讯科技(深圳)有限公司 Data transmission method and device
CN111526151A (en) * 2020-04-28 2020-08-11 网易(杭州)网络有限公司 Data transmission method and device, electronic equipment and storage medium
CN111817722A (en) * 2020-07-09 2020-10-23 北京奥星贝斯科技有限公司 Data compression method and device and computer equipment
CN113038139B (en) * 2021-03-25 2023-05-12 贵州电网有限责任公司 Image compression method applied to machine inspection picture uploading
CN113850055A (en) * 2021-09-29 2021-12-28 北京有竹居网络技术有限公司 Data processing method, device, storage medium and product

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731364A (en) * 2005-08-05 2006-02-08 北京九州软件有限公司 Method for compression and search of database backup data

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5467087A (en) * 1992-12-18 1995-11-14 Apple Computer, Inc. High speed lossless data compression system
CN100566421C (en) * 2003-06-19 2009-12-02 松下电器产业株式会社 Dispensing device, image processing system and image processing method
CN1584875B (en) * 2004-06-01 2011-08-10 北京九州软件有限公司 Ergodic compressing and decompressing method for batched computer document
US7420992B1 (en) * 2005-03-17 2008-09-02 Packeteer, Inc. Adaptive network traffic compression mechanism including dynamic selection of compression algorithms
KR20070009312A (en) * 2005-07-15 2007-01-18 엘지전자 주식회사 Data compression apparatus and method
CN101355364A (en) * 2008-09-08 2009-01-28 北大方正集团有限公司 Method and apparatus for compressing and decompressing file
CN102255692A (en) * 2011-07-14 2011-11-23 电信科学技术研究院 Data compression method and equipment
CN102437894B (en) * 2011-11-04 2015-01-28 百度在线网络技术(北京)有限公司 Method, device and equipment for compressing information to be sent

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1731364A (en) * 2005-08-05 2006-02-08 北京九州软件有限公司 Method for compression and search of database backup data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
四大压缩高手终极比拼——网络文件传输该选谁;www.itxiaobai.com;《cfan爱好者》;20110128;第1-6页 *

Also Published As

Publication number Publication date
CN104796155B (en) 2019-03-01
CN104796155A (en) 2015-07-22
CN102684705A (en) 2012-09-19

Similar Documents

Publication Publication Date Title
CN102684705B (en) Method and device for data compression
CN102761339B (en) Data compression method and device
CN102761540B (en) Data compression method, device and system and server
KR20200105432A (en) Methods and apparatus to compress data
CN105260319A (en) Cleaning method and cleaning system for mobile terminal
JP6404410B2 (en) Method and apparatus for decoding a signal
CN105280187A (en) Family emotion management device and method
WO2021077744A1 (en) Image classification method, apparatus and device, and computer readable storage medium
CN104239130B (en) Control method and terminal for responding to operation instruction by human-computer interaction interface
CN106899894A (en) The adaptive stream media method of dynamic optimization, device and server
US9552813B2 (en) Self-adaptive intelligent voice device and method
CN104219739B (en) Traffic rate method of adjustment and hotspot
CN105323593A (en) Multimedia transcoding scheduling method and multimedia transcoding scheduling device
CN102999626A (en) Data compression/decompression device, as well as method and system thereof
CN107872673A (en) A kind of method and device of Intelligent Dynamic regulation video encoder
CN106970837B (en) Information processing method and electronic equipment
KR20220003104A (en) Methods, devices and computer program products for lossless data compression and decompression
CN105872552A (en) Intelligent processing method for prolonging video storage time of video monitoring system
CN105338371A (en) Multimedia transcoding scheduling method and apparatus
US20200242467A1 (en) Calculation method and calculation device for sparse neural network, electronic device, computer readable storage medium, and computer program product
CN104732979A (en) Processing method and device of audio data
CN106155597B (en) High-speed data transmission method and device
CN106131030A (en) The distribution method of a kind of high-speed data and device
CN103034702A (en) Device, method and system for data compression/decompression
CN103067523A (en) Method and system of file downloading of mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
ASS Succession or assignment of patent right

Owner name: BEIJING QIHU TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: QIZHI SOFTWARE (BEIJING) CO., LTD.

Effective date: 20120910

Owner name: QIZHI SOFTWARE (BEIJING) CO., LTD.

Effective date: 20120910

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100016 CHAOYANG, BEIJING TO: 100088 XICHENG, BEIJING

TA01 Transfer of patent application right

Effective date of registration: 20120910

Address after: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park)

Applicant after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Applicant after: Qizhi software (Beijing) Co.,Ltd.

Address before: The 4 layer 100016 unit of Beijing city Chaoyang District Jiuxianqiao Road No. 14 Building C

Applicant before: Qizhi software (Beijing) Co.,Ltd.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220718

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right